Merge pull request #4550 from akva2/janitoring

Some janitoring
This commit is contained in:
Bård Skaflestad 2023-03-24 15:48:15 +01:00 committed by GitHub
commit 86cfa6dc3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 35 deletions

View File

@ -28,15 +28,19 @@
#define EWOMS_ECL_OUTPUT_BLACK_OIL_MODULE_HH #define EWOMS_ECL_OUTPUT_BLACK_OIL_MODULE_HH
#include <opm/common/Exceptions.hpp> #include <opm/common/Exceptions.hpp>
#include <opm/common/TimingMacros.hpp>
#include <opm/common/OpmLog/OpmLog.hpp> #include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/models/blackoil/blackoilproperties.hh> #include <opm/material/common/Valgrind.hpp>
#include <opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp>
#include <opm/material/fluidstates/BlackOilFluidState.hpp>
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
#include <opm/models/blackoil/blackoilproperties.hh>
#include <opm/models/discretization/common/fvbaseproperties.hh>
#include <opm/models/utils/parametersystem.hh> #include <opm/models/utils/parametersystem.hh>
#include <opm/models/utils/propertysystem.hh> #include <opm/models/utils/propertysystem.hh>
#include <opm/material/common/Valgrind.hpp>
#include <opm/output/data/Cells.hpp> #include <opm/output/data/Cells.hpp>
#include <opm/output/eclipse/EclipseIO.hpp> #include <opm/output/eclipse/EclipseIO.hpp>
#include <opm/output/eclipse/Inplace.hpp> #include <opm/output/eclipse/Inplace.hpp>
@ -585,7 +589,7 @@ public:
void processElementFlows(const ElementContext& elemCtx) void processElementFlows(const ElementContext& elemCtx)
{ {
OPM_TIMEBLOCK_LOCAL(processElementBlockData); OPM_TIMEBLOCK_LOCAL(processElementBlockData);
if (!std::is_same<Discretization, EcfvDiscretization<TypeTag>>::value) if (!std::is_same_v<Discretization, EcfvDiscretization<TypeTag>>)
return; return;
const auto& problem = elemCtx.simulator().problem(); const auto& problem = elemCtx.simulator().problem();
@ -857,7 +861,6 @@ public:
} }
} }
/*! /*!
* \brief Capture connection fluxes, particularly to account for inter-region flows. * \brief Capture connection fluxes, particularly to account for inter-region flows.
* *
@ -1003,12 +1006,14 @@ public:
} }
} }
void updateFluidInPlace(const ElementContext& elemCtx){ void updateFluidInPlace(const ElementContext& elemCtx)
{
for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) { for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) {
updateFluidInPlace_(elemCtx, dofIdx); updateFluidInPlace_(elemCtx, dofIdx);
} }
} }
void updateFluidInPlace(unsigned globalDofIdx,const IntensiveQuantities& intQuants, double totVolume){ void updateFluidInPlace(unsigned globalDofIdx,const IntensiveQuantities& intQuants, double totVolume)
{
this->updateFluidInPlace_(globalDofIdx, intQuants, totVolume); this->updateFluidInPlace_(globalDofIdx, intQuants, totVolume);
} }
private: private:
@ -1022,7 +1027,8 @@ private:
return candidate == parallelWells.end() || *candidate != value; return candidate == parallelWells.end() || *candidate != value;
} }
void updateFluidInPlace_(const ElementContext& elemCtx, unsigned dofIdx){ void updateFluidInPlace_(const ElementContext& elemCtx, unsigned dofIdx)
{
const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0); const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0);
unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0); unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);
const auto totVolume = elemCtx.simulator().model().dofTotalVolume(globalDofIdx); const auto totVolume = elemCtx.simulator().model().dofTotalVolume(globalDofIdx);
@ -1295,7 +1301,7 @@ private:
} }
const Simulator& simulator_; const Simulator& simulator_;
}; };
} // namespace Opm } // namespace Opm

View File

@ -105,6 +105,6 @@ namespace Details {
template std::pair<double,double> cellZMinMax(const Dune::cpgrid::Entity<0>& element); template std::pair<double,double> cellZMinMax(const Dune::cpgrid::Entity<0>& element);
} }
}
} // namespace EQUIL } // namespace EQUIL
// namespace Opm } // namespace Opm