EclWellManager: do not use parallelism

the speedup gained by parallelism here are simply not worth the
headaches.

note that `flow` is unaffected by this because it uses
`Opm::BlackoilWellModel`.
This commit is contained in:
Andreas Lauser 2019-03-01 10:36:29 +01:00
parent 43dd9928b4
commit 8e5f1279f3

View File

@ -406,14 +406,11 @@ public:
wells_[wellIdx]->beginIterationPreProcess(); wells_[wellIdx]->beginIterationPreProcess();
// call the accumulation routines // call the accumulation routines
ThreadedEntityIterator<GridView, /*codim=*/0> threadedElemIt(simulator_.vanguard().gridView());
#ifdef _OPENMP
#pragma omp parallel
#endif
{
ElementContext elemCtx(simulator_); ElementContext elemCtx(simulator_);
auto elemIt = threadedElemIt.beginParallel(); const auto gridView = simulator_.vanguard().gridView();
for (; !threadedElemIt.isFinished(elemIt); elemIt = threadedElemIt.increment()) { auto elemIt = gridView.template begin</*codim=*/0>();
const auto& elemEndIt = gridView.template end</*codim=*/0>();
for (; elemIt != elemEndIt; ++elemIt) {
const Element& elem = *elemIt; const Element& elem = *elemIt;
if (elem.partitionType() != Dune::InteriorEntity) if (elem.partitionType() != Dune::InteriorEntity)
continue; continue;
@ -424,7 +421,6 @@ public:
for (size_t wellIdx = 0; wellIdx < wellSize; ++wellIdx) for (size_t wellIdx = 0; wellIdx < wellSize; ++wellIdx)
wells_[wellIdx]->beginIterationAccumulate(elemCtx, /*timeIdx=*/0); wells_[wellIdx]->beginIterationAccumulate(elemCtx, /*timeIdx=*/0);
} }
}
// call the postprocessing routines // call the postprocessing routines
for (size_t wellIdx = 0; wellIdx < wellSize; ++wellIdx) for (size_t wellIdx = 0; wellIdx < wellSize; ++wellIdx)