Skip to content

Commit

Permalink
move setup of extractors to separate method
Browse files Browse the repository at this point in the history
  • Loading branch information
akva2 committed Feb 21, 2025
1 parent 5bdc61a commit b334c89
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 84 deletions.
2 changes: 2 additions & 0 deletions opm/simulators/flow/DamarisWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,14 @@ class DamarisWriter : public EclGenericWriter<GetPropType<TypeTag, Properties::G
OPM_BEGIN_PARALLEL_TRY_CATCH();
{
OPM_TIMEBLOCK(prepareCellBasedData);
damarisOutputModule_->setupExtractors();
for (const auto& elem : elements(gridView, Dune::Partitions::interior)) {
elemCtx.updatePrimaryStencil(elem);
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);

damarisOutputModule_->processElement(elemCtx);
}
damarisOutputModule_->clearExtractors();
}
if(!simulator_.model().linearizer().getFlowsInfo().empty()){
OPM_TIMEBLOCK(prepareFlowsData);
Expand Down
3 changes: 2 additions & 1 deletion opm/simulators/flow/EclWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,14 @@ class EclWriter : public EclGenericWriter<GetPropType<TypeTag, Properties::Grid>
OPM_TIMEBLOCK(prepareCellBasedData);

this->outputModule_->prepareDensityAccumulation();

this->outputModule_->setupExtractors();
for (const auto& elem : elements(gridView, Dune::Partitions::interior)) {
elemCtx.updatePrimaryStencil(elem);
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);

this->outputModule_->processElement(elemCtx);
}
this->outputModule_->clearExtractors();

this->outputModule_->accumulateDensityParallel();
}
Expand Down
Loading

0 comments on commit b334c89

Please sign in to comment.