changed: remove GET_PROP_VALUE macro usage

This commit is contained in:
Arne Morten Kvarving
2020-08-27 13:01:51 +02:00
parent 70805ca1d4
commit 914053ac3c
30 changed files with 111 additions and 111 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ SET_SCALAR_PROP(EbosTypeTag, NewtonTolerance, 1e-1);
SET_SCALAR_PROP(EbosTypeTag, EclNewtonRelaxedVolumeFraction, 0.05);
// the maximum volumetric error of a cell in the relaxed region
SET_SCALAR_PROP(EbosTypeTag, EclNewtonRelaxedTolerance, 1e6*GET_PROP_VALUE(TypeTag, NewtonTolerance));
SET_SCALAR_PROP(EbosTypeTag, EclNewtonRelaxedTolerance, 1e6*getPropValue<TypeTag, Properties::NewtonTolerance>());
// the tolerated amount of "incorrect" amount of oil per time step for the complete
// reservoir. this is scaled by the pore volume of the reservoir, i.e., larger reservoirs
+5 -5
View File
@@ -44,11 +44,11 @@ private:
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent),
GET_PROP_VALUE(TypeTag, EnablePolymer),
GET_PROP_VALUE(TypeTag, EnableEnergy),
GET_PROP_VALUE(TypeTag, EnableFoam),
GET_PROP_VALUE(TypeTag, EnableBrine),
typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
getPropValue<TypeTag, Properties::EnablePolymer>(),
getPropValue<TypeTag, Properties::EnableEnergy>(),
getPropValue<TypeTag, Properties::EnableFoam>(),
getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::waterCompIdx> type;
};
+5 -5
View File
@@ -44,11 +44,11 @@ private:
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent),
GET_PROP_VALUE(TypeTag, EnablePolymer),
GET_PROP_VALUE(TypeTag, EnableEnergy),
GET_PROP_VALUE(TypeTag, EnableFoam),
GET_PROP_VALUE(TypeTag, EnableBrine),
typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
getPropValue<TypeTag, Properties::EnablePolymer>(),
getPropValue<TypeTag, Properties::EnableEnergy>(),
getPropValue<TypeTag, Properties::EnableFoam>(),
getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
};
+5 -5
View File
@@ -46,11 +46,11 @@ private:
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent),
GET_PROP_VALUE(TypeTag, EnablePolymer),
GET_PROP_VALUE(TypeTag, EnableEnergy),
GET_PROP_VALUE(TypeTag, EnableFoam),
GET_PROP_VALUE(TypeTag, EnableBrine),
typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
getPropValue<TypeTag, Properties::EnablePolymer>(),
getPropValue<TypeTag, Properties::EnableEnergy>(),
getPropValue<TypeTag, Properties::EnableFoam>(),
getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
};
+1 -1
View File
@@ -106,7 +106,7 @@ class EclBaseVanguard : public BaseVanguard<TypeTag>
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) };
enum { enableExperiments = getPropValue<TypeTag, Properties::EnableExperiments>() };
public:
using Grid = GetPropType<TypeTag, Properties::Grid>;
+3 -3
View File
@@ -71,9 +71,9 @@ class EclEquilInitializer
enum { waterCompIdx = FluidSystem::waterCompIdx };
enum { dimWorld = GridView::dimensionworld };
enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
enum { enableBrine = GET_PROP_VALUE(TypeTag, EnableBrine) };
enum { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() };
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
public:
// NB: setting the enableEnergy argument to true enables storage of enthalpy and
+2 -2
View File
@@ -111,8 +111,8 @@ class EclTransExtensiveQuantities
enum { dimWorld = GridView::dimensionworld };
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
enum { numPhases = FluidSystem::numPhases };
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
typedef Opm::MathToolbox<Evaluation> Toolbox;
typedef Dune::FieldVector<Scalar, dimWorld> DimVector;
+2 -2
View File
@@ -67,7 +67,7 @@ class EclNewtonMethod : public BlackOilNewtonMethod<TypeTag>
using Linearizer = GetPropType<TypeTag, Properties::Linearizer>;
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
static const unsigned numEq = GET_PROP_VALUE(TypeTag, NumEq);
static const unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
static constexpr int contiSolventEqIdx = Indices::contiSolventEqIdx;
static constexpr int contiPolymerEqIdx = Indices::contiPolymerEqIdx;
@@ -175,7 +175,7 @@ public:
// in the case of a volumetric formulation, the residual in the above is
// per cubic meter
if (GET_PROP_VALUE(TypeTag, UseVolumetricResidual)) {
if (getPropValue<TypeTag, Properties::UseVolumetricResidual>()) {
tmpError *= dofVolume;
tmpError2 *= dofVolume;
}
+5 -5
View File
@@ -88,7 +88,7 @@ class EclOutputBlackOilModule
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
enum { gasCompIdx = FluidSystem::gasCompIdx };
enum { oilCompIdx = FluidSystem::oilCompIdx };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
typedef std::vector<Scalar> ScalarBuffer;
typedef std::vector<std::string> StringBuffer;
@@ -326,13 +326,13 @@ public:
rstKeywords["RV"] = 0;
}
if (GET_PROP_VALUE(TypeTag, EnableSolvent))
if (getPropValue<TypeTag, Properties::EnableSolvent>())
sSol_.resize(bufferSize, 0.0);
if (GET_PROP_VALUE(TypeTag, EnablePolymer))
if (getPropValue<TypeTag, Properties::EnablePolymer>())
cPolymer_.resize(bufferSize, 0.0);
if (GET_PROP_VALUE(TypeTag, EnableFoam))
if (getPropValue<TypeTag, Properties::EnableFoam>())
cFoam_.resize(bufferSize, 0.0);
if (GET_PROP_VALUE(TypeTag, EnableBrine))
if (getPropValue<TypeTag, Properties::EnableBrine>())
cSalt_.resize(bufferSize, 0.0);
if (simulator_.problem().vapparsActive())
+5 -5
View File
@@ -100,8 +100,8 @@ class EclPeacemanWell : public BaseAuxiliaryModule<TypeTag>
// convenient access to the number of phases and the number of
// components
static const unsigned numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
static const unsigned numPhases = GET_PROP_VALUE(TypeTag, NumPhases);
static const unsigned numComponents = getPropValue<TypeTag, Properties::NumComponents>();
static const unsigned numPhases = getPropValue<TypeTag, Properties::NumPhases>();
// convenient access to the phase and component indices. If the compiler bails out
// here, you're probably using an incompatible fluid system. This class has only been
@@ -114,13 +114,13 @@ class EclPeacemanWell : public BaseAuxiliaryModule<TypeTag>
static const unsigned waterCompIdx = FluidSystem::waterCompIdx;
static const unsigned gasCompIdx = FluidSystem::gasCompIdx;
static const unsigned numModelEq = GET_PROP_VALUE(TypeTag, NumEq);
static const unsigned numModelEq = getPropValue<TypeTag, Properties::NumEq>();
static const unsigned conti0EqIdx = GetPropType<TypeTag, Properties::Indices>::conti0EqIdx;
static const unsigned contiEnergyEqIdx = GetPropType<TypeTag, Properties::Indices>::contiEnergyEqIdx;
static constexpr unsigned historySize = GET_PROP_VALUE(TypeTag, TimeDiscHistorySize);
static constexpr unsigned historySize = getPropValue<TypeTag, Properties::TimeDiscHistorySize>();
static constexpr bool enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy);
static constexpr bool enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>();
typedef Opm::CompositionalFluidState<Scalar, FluidSystem, /*storeEnthalpy=*/true> FluidState;
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
+16 -16
View File
@@ -344,7 +344,7 @@ SET_INT_PROP(EclBaseProblem, RestartWritingInterval, 0xffffff); // disable
// as default if experimental mode is enabled.
SET_BOOL_PROP(EclBaseProblem,
EclEnableDriftCompensation,
GET_PROP_VALUE(TypeTag, EnableExperiments));
getPropValue<TypeTag, Properties::EnableExperiments>());
// By default, we enable the debugging checks if we're compiled in debug mode
SET_BOOL_PROP(EclBaseProblem, EnableDebuggingChecks, true);
@@ -405,19 +405,19 @@ class EclProblem : public GetPropType<TypeTag, Properties::BaseProblem>
enum { dimWorld = GridView::dimensionworld };
// copy some indices for convenience
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { numPhases = FluidSystem::numPhases };
enum { numComponents = FluidSystem::numComponents };
enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) };
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) };
enum { enablePolymer = GET_PROP_VALUE(TypeTag, EnablePolymer) };
enum { enableBrine = GET_PROP_VALUE(TypeTag, EnableBrine) };
enum { enablePolymerMolarWeight = GET_PROP_VALUE(TypeTag, EnablePolymerMW) };
enum { enableFoam = GET_PROP_VALUE(TypeTag, EnableFoam) };
enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
enum { enableThermalFluxBoundaries = GET_PROP_VALUE(TypeTag, EnableThermalFluxBoundaries) };
enum { enableApiTracking = GET_PROP_VALUE(TypeTag, EnableApiTracking) };
enum { enableExperiments = getPropValue<TypeTag, Properties::EnableExperiments>() };
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
enum { enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>() };
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
enum { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() };
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
enum { enableThermalFluxBoundaries = getPropValue<TypeTag, Properties::EnableThermalFluxBoundaries>() };
enum { enableApiTracking = getPropValue<TypeTag, Properties::EnableApiTracking>() };
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
@@ -705,7 +705,7 @@ public:
updatePffDofData_();
if (GET_PROP_VALUE(TypeTag, EnablePolymer)) {
if (getPropValue<TypeTag, Properties::EnablePolymer>()) {
const auto& vanguard = this->simulator().vanguard();
const auto& gridView = vanguard.gridView();
int numElements = gridView.size(/*codim=*/0);
@@ -846,7 +846,7 @@ public:
const bool invalidateFromMaxOilSat = updateMaxOilSaturation_();
const bool doInvalidate = invalidateFromHyst || invalidateFromMaxOilSat;
if (GET_PROP_VALUE(TypeTag, EnablePolymer))
if (getPropValue<TypeTag, Properties::EnablePolymer>())
updateMaxPolymerAdsorption_();
// set up the wells for the next episode.
@@ -955,7 +955,7 @@ public:
void endTimeStep()
{
#ifndef NDEBUG
if (GET_PROP_VALUE(TypeTag, EnableDebuggingChecks)) {
if (getPropValue<(TypeTag, Properties::EnableDebuggingChecks>()) {
// in debug mode, we don't care about performance, so we check if the model does
// the right thing (i.e., the mass change inside the whole reservoir must be
// equivalent to the fluxes over the grid's boundaries plus the source rates
@@ -983,7 +983,7 @@ public:
for (unsigned globalDofIdx = 0; globalDofIdx < residual.size(); globalDofIdx ++) {
drift_[globalDofIdx] = residual[globalDofIdx];
drift_[globalDofIdx] *= simulator.timeStepSize();
if (GET_PROP_VALUE(TypeTag, UseVolumetricResidual))
if (getPropValue<TypeTag, Properties::UseVolumetricResidual>())
drift_[globalDofIdx] *= this->model().dofTotalVolume(globalDofIdx);
}
}
+1 -1
View File
@@ -70,7 +70,7 @@ class EclThresholdPressure
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) };
enum { enableExperiments = getPropValue<TypeTag, Properties::EnableExperiments>() };
enum { numPhases = FluidSystem::numPhases };
public:
+1 -1
View File
@@ -72,7 +72,7 @@ class EclTracerModel
typedef Opm::DenseAd::Evaluation<Scalar,1> TracerEvaluation;
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { numPhases = FluidSystem::numPhases };
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
+1 -1
View File
@@ -73,7 +73,7 @@ class EclTransmissibility
using ElementMapper = GetPropType<TypeTag, Properties::ElementMapper>;
using Intersection = typename GridView::Intersection;
static const bool enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy);
static const bool enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>();
// Grid and world dimension
enum { dimWorld = GridView::dimensionworld };
+1 -1
View File
@@ -74,7 +74,7 @@ class EclWellManager
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { numPhases = FluidSystem::numPhases };
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
+2 -2
View File
@@ -164,8 +164,8 @@ class EclWriter
typedef std::vector<Scalar> ScalarBuffer;
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) };
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) };
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
public:
+1 -1
View File
@@ -72,7 +72,7 @@ namespace Opm {
using GridView = GetPropType<TypeTag, Properties::GridView>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
static const int vtkFormat = GET_PROP_VALUE(TypeTag, VtkOutputFormat);
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
typedef Opm::VtkMultiWriter<GridView, vtkFormat> VtkMultiWriter;