Merge pull request #4885 from hnil/safer_fluid_evaluation

Safer fluid evaluation
This commit is contained in:
Atgeirr Flø Rasmussen 2023-09-26 14:59:05 +02:00 committed by GitHub
commit ffa7bc23ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,8 +61,9 @@ public:
void invalidateAndUpdateIntensiveQuantities(unsigned timeIdx) const
{
this->invalidateIntensiveQuantitiesCache(timeIdx);
this->invalidateIntensiveQuantitiesCache(timeIdx);
OPM_BEGIN_PARALLEL_TRY_CATCH()
// loop over all elements...
ThreadedEntityIterator<GridView, /*codim=*/0> threadedElemIt(this->gridView_);
#ifdef _OPENMP
@ -77,12 +78,14 @@ public:
elemCtx.updatePrimaryIntensiveQuantities(timeIdx);
}
}
OPM_END_PARALLEL_TRY_CATCH("InvalideAndUpdateIntensiveQuantities: state error", this->simulator_.vanguard().grid().comm());
}
void invalidateAndUpdateIntensiveQuantitiesOverlap(unsigned timeIdx) const
{
// loop over all elements
ThreadedEntityIterator<GridView, /*codim=*/0> threadedElemIt(this->gridView_);
OPM_BEGIN_PARALLEL_TRY_CATCH()
#ifdef _OPENMP
#pragma omp parallel
#endif
@ -105,6 +108,7 @@ public:
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
}
}
OPM_END_PARALLEL_TRY_CATCH("InvalideAndUpdateIntensiveQuantitiesOverlap: state error", this->simulator_.vanguard().grid().comm());
}
template <class GridSubDomain>