mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-11 15:05:34 -06:00
Make a method that invalidate and updates the intensive quantities
This commit is contained in:
parent
74a59ddabc
commit
6fbea5e41f
@ -765,6 +765,26 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void invalidateAndUpdateIntensiveQuantities(unsigned timeIdx) const
|
||||
{
|
||||
invalidateIntensiveQuantitiesCache(timeIdx);
|
||||
|
||||
// loop over all elements...
|
||||
ThreadedEntityIterator<GridView, /*codim=*/0> threadedElemIt(gridView_);
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
{
|
||||
ElementContext elemCtx(simulator_);
|
||||
ElementIterator elemIt = threadedElemIt.beginParallel();
|
||||
for (; !threadedElemIt.isFinished(elemIt); elemIt = threadedElemIt.increment()) {
|
||||
const Element& elem = *elemIt;
|
||||
elemCtx.updatePrimaryStencil(elem);
|
||||
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Move the intensive quantities for a given time index to the back.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user