changed: remove GET_PROP_VALUE macro usage

This commit is contained in:
Arne Morten Kvarving
2020-08-27 09:13:30 +02:00
parent 70805ca1d4
commit 914053ac3c
30 changed files with 111 additions and 111 deletions

View File

@@ -83,7 +83,7 @@ SET_SCALAR_PROP(EbosTypeTag, NewtonTolerance, 1e-1);
SET_SCALAR_PROP(EbosTypeTag, EclNewtonRelaxedVolumeFraction, 0.05); SET_SCALAR_PROP(EbosTypeTag, EclNewtonRelaxedVolumeFraction, 0.05);
// the maximum volumetric error of a cell in the relaxed region // 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 // 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 // reservoir. this is scaled by the pore volume of the reservoir, i.e., larger reservoirs

View File

@@ -44,11 +44,11 @@ private:
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::waterCompIdx> type; /*disabledCompIdx=*/FluidSystem::waterCompIdx> type;
}; };

View File

@@ -44,11 +44,11 @@ private:
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@@ -46,11 +46,11 @@ private:
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@@ -106,7 +106,7 @@ class EclBaseVanguard : public BaseVanguard<TypeTag>
using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>; using Simulator = GetPropType<TypeTag, Properties::Simulator>;
enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) }; enum { enableExperiments = getPropValue<TypeTag, Properties::EnableExperiments>() };
public: public:
using Grid = GetPropType<TypeTag, Properties::Grid>; using Grid = GetPropType<TypeTag, Properties::Grid>;

View File

@@ -71,9 +71,9 @@ class EclEquilInitializer
enum { waterCompIdx = FluidSystem::waterCompIdx }; enum { waterCompIdx = FluidSystem::waterCompIdx };
enum { dimWorld = GridView::dimensionworld }; enum { dimWorld = GridView::dimensionworld };
enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) }; enum { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) }; enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
enum { enableBrine = GET_PROP_VALUE(TypeTag, EnableBrine) }; enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
public: public:
// NB: setting the enableEnergy argument to true enables storage of enthalpy and // NB: setting the enableEnergy argument to true enables storage of enthalpy and

View File

@@ -111,8 +111,8 @@ class EclTransExtensiveQuantities
enum { dimWorld = GridView::dimensionworld }; enum { dimWorld = GridView::dimensionworld };
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx }; enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
enum { numPhases = FluidSystem::numPhases }; enum { numPhases = FluidSystem::numPhases };
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) }; enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) }; enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
typedef Opm::MathToolbox<Evaluation> Toolbox; typedef Opm::MathToolbox<Evaluation> Toolbox;
typedef Dune::FieldVector<Scalar, dimWorld> DimVector; typedef Dune::FieldVector<Scalar, dimWorld> DimVector;

View File

@@ -67,7 +67,7 @@ class EclNewtonMethod : public BlackOilNewtonMethod<TypeTag>
using Linearizer = GetPropType<TypeTag, Properties::Linearizer>; using Linearizer = GetPropType<TypeTag, Properties::Linearizer>;
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>; 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 contiSolventEqIdx = Indices::contiSolventEqIdx;
static constexpr int contiPolymerEqIdx = Indices::contiPolymerEqIdx; static constexpr int contiPolymerEqIdx = Indices::contiPolymerEqIdx;
@@ -175,7 +175,7 @@ public:
// in the case of a volumetric formulation, the residual in the above is // in the case of a volumetric formulation, the residual in the above is
// per cubic meter // per cubic meter
if (GET_PROP_VALUE(TypeTag, UseVolumetricResidual)) { if (getPropValue<TypeTag, Properties::UseVolumetricResidual>()) {
tmpError *= dofVolume; tmpError *= dofVolume;
tmpError2 *= dofVolume; tmpError2 *= dofVolume;
} }

View File

@@ -88,7 +88,7 @@ class EclOutputBlackOilModule
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx }; enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
enum { gasCompIdx = FluidSystem::gasCompIdx }; enum { gasCompIdx = FluidSystem::gasCompIdx };
enum { oilCompIdx = FluidSystem::oilCompIdx }; 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<Scalar> ScalarBuffer;
typedef std::vector<std::string> StringBuffer; typedef std::vector<std::string> StringBuffer;
@@ -326,13 +326,13 @@ public:
rstKeywords["RV"] = 0; rstKeywords["RV"] = 0;
} }
if (GET_PROP_VALUE(TypeTag, EnableSolvent)) if (getPropValue<TypeTag, Properties::EnableSolvent>())
sSol_.resize(bufferSize, 0.0); sSol_.resize(bufferSize, 0.0);
if (GET_PROP_VALUE(TypeTag, EnablePolymer)) if (getPropValue<TypeTag, Properties::EnablePolymer>())
cPolymer_.resize(bufferSize, 0.0); cPolymer_.resize(bufferSize, 0.0);
if (GET_PROP_VALUE(TypeTag, EnableFoam)) if (getPropValue<TypeTag, Properties::EnableFoam>())
cFoam_.resize(bufferSize, 0.0); cFoam_.resize(bufferSize, 0.0);
if (GET_PROP_VALUE(TypeTag, EnableBrine)) if (getPropValue<TypeTag, Properties::EnableBrine>())
cSalt_.resize(bufferSize, 0.0); cSalt_.resize(bufferSize, 0.0);
if (simulator_.problem().vapparsActive()) if (simulator_.problem().vapparsActive())

View File

@@ -100,8 +100,8 @@ class EclPeacemanWell : public BaseAuxiliaryModule<TypeTag>
// convenient access to the number of phases and the number of // convenient access to the number of phases and the number of
// components // components
static const unsigned numComponents = GET_PROP_VALUE(TypeTag, NumComponents); static const unsigned numComponents = getPropValue<TypeTag, Properties::NumComponents>();
static const unsigned numPhases = GET_PROP_VALUE(TypeTag, NumPhases); static const unsigned numPhases = getPropValue<TypeTag, Properties::NumPhases>();
// convenient access to the phase and component indices. If the compiler bails out // 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 // 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 waterCompIdx = FluidSystem::waterCompIdx;
static const unsigned gasCompIdx = FluidSystem::gasCompIdx; 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 conti0EqIdx = GetPropType<TypeTag, Properties::Indices>::conti0EqIdx;
static const unsigned contiEnergyEqIdx = GetPropType<TypeTag, Properties::Indices>::contiEnergyEqIdx; 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 Opm::CompositionalFluidState<Scalar, FluidSystem, /*storeEnthalpy=*/true> FluidState;
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix; typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;

View File

@@ -344,7 +344,7 @@ SET_INT_PROP(EclBaseProblem, RestartWritingInterval, 0xffffff); // disable
// as default if experimental mode is enabled. // as default if experimental mode is enabled.
SET_BOOL_PROP(EclBaseProblem, SET_BOOL_PROP(EclBaseProblem,
EclEnableDriftCompensation, EclEnableDriftCompensation,
GET_PROP_VALUE(TypeTag, EnableExperiments)); getPropValue<TypeTag, Properties::EnableExperiments>());
// By default, we enable the debugging checks if we're compiled in debug mode // By default, we enable the debugging checks if we're compiled in debug mode
SET_BOOL_PROP(EclBaseProblem, EnableDebuggingChecks, true); SET_BOOL_PROP(EclBaseProblem, EnableDebuggingChecks, true);
@@ -405,19 +405,19 @@ class EclProblem : public GetPropType<TypeTag, Properties::BaseProblem>
enum { dimWorld = GridView::dimensionworld }; enum { dimWorld = GridView::dimensionworld };
// copy some indices for convenience // copy some indices for convenience
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { numPhases = FluidSystem::numPhases }; enum { numPhases = FluidSystem::numPhases };
enum { numComponents = FluidSystem::numComponents }; enum { numComponents = FluidSystem::numComponents };
enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) }; enum { enableExperiments = getPropValue<TypeTag, Properties::EnableExperiments>() };
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) }; enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
enum { enablePolymer = GET_PROP_VALUE(TypeTag, EnablePolymer) }; enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
enum { enableBrine = GET_PROP_VALUE(TypeTag, EnableBrine) }; enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
enum { enablePolymerMolarWeight = GET_PROP_VALUE(TypeTag, EnablePolymerMW) }; enum { enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>() };
enum { enableFoam = GET_PROP_VALUE(TypeTag, EnableFoam) }; enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) }; enum { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) }; enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
enum { enableThermalFluxBoundaries = GET_PROP_VALUE(TypeTag, EnableThermalFluxBoundaries) }; enum { enableThermalFluxBoundaries = getPropValue<TypeTag, Properties::EnableThermalFluxBoundaries>() };
enum { enableApiTracking = GET_PROP_VALUE(TypeTag, EnableApiTracking) }; enum { enableApiTracking = getPropValue<TypeTag, Properties::EnableApiTracking>() };
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx }; enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx }; enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx }; enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
@@ -705,7 +705,7 @@ public:
updatePffDofData_(); updatePffDofData_();
if (GET_PROP_VALUE(TypeTag, EnablePolymer)) { if (getPropValue<TypeTag, Properties::EnablePolymer>()) {
const auto& vanguard = this->simulator().vanguard(); const auto& vanguard = this->simulator().vanguard();
const auto& gridView = vanguard.gridView(); const auto& gridView = vanguard.gridView();
int numElements = gridView.size(/*codim=*/0); int numElements = gridView.size(/*codim=*/0);
@@ -846,7 +846,7 @@ public:
const bool invalidateFromMaxOilSat = updateMaxOilSaturation_(); const bool invalidateFromMaxOilSat = updateMaxOilSaturation_();
const bool doInvalidate = invalidateFromHyst || invalidateFromMaxOilSat; const bool doInvalidate = invalidateFromHyst || invalidateFromMaxOilSat;
if (GET_PROP_VALUE(TypeTag, EnablePolymer)) if (getPropValue<TypeTag, Properties::EnablePolymer>())
updateMaxPolymerAdsorption_(); updateMaxPolymerAdsorption_();
// set up the wells for the next episode. // set up the wells for the next episode.
@@ -955,7 +955,7 @@ public:
void endTimeStep() void endTimeStep()
{ {
#ifndef NDEBUG #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 // 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 // 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 // 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 ++) { for (unsigned globalDofIdx = 0; globalDofIdx < residual.size(); globalDofIdx ++) {
drift_[globalDofIdx] = residual[globalDofIdx]; drift_[globalDofIdx] = residual[globalDofIdx];
drift_[globalDofIdx] *= simulator.timeStepSize(); drift_[globalDofIdx] *= simulator.timeStepSize();
if (GET_PROP_VALUE(TypeTag, UseVolumetricResidual)) if (getPropValue<TypeTag, Properties::UseVolumetricResidual>())
drift_[globalDofIdx] *= this->model().dofTotalVolume(globalDofIdx); drift_[globalDofIdx] *= this->model().dofTotalVolume(globalDofIdx);
} }
} }

View File

@@ -70,7 +70,7 @@ class EclThresholdPressure
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>; using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
enum { enableExperiments = GET_PROP_VALUE(TypeTag, EnableExperiments) }; enum { enableExperiments = getPropValue<TypeTag, Properties::EnableExperiments>() };
enum { numPhases = FluidSystem::numPhases }; enum { numPhases = FluidSystem::numPhases };
public: public:

View File

@@ -72,7 +72,7 @@ class EclTracerModel
typedef Opm::DenseAd::Evaluation<Scalar,1> TracerEvaluation; 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 { numPhases = FluidSystem::numPhases };
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx }; enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx }; enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };

View File

@@ -73,7 +73,7 @@ class EclTransmissibility
using ElementMapper = GetPropType<TypeTag, Properties::ElementMapper>; using ElementMapper = GetPropType<TypeTag, Properties::ElementMapper>;
using Intersection = typename GridView::Intersection; 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 // Grid and world dimension
enum { dimWorld = GridView::dimensionworld }; enum { dimWorld = GridView::dimensionworld };

View File

@@ -74,7 +74,7 @@ class EclWellManager
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>; using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
using RateVector = GetPropType<TypeTag, Properties::RateVector>; using RateVector = GetPropType<TypeTag, Properties::RateVector>;
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { numPhases = FluidSystem::numPhases }; enum { numPhases = FluidSystem::numPhases };
enum { waterPhaseIdx = FluidSystem::waterPhaseIdx }; enum { waterPhaseIdx = FluidSystem::waterPhaseIdx };
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx }; enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };

View File

@@ -164,8 +164,8 @@ class EclWriter
typedef std::vector<Scalar> ScalarBuffer; typedef std::vector<Scalar> ScalarBuffer;
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) }; enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
enum { enableSolvent = GET_PROP_VALUE(TypeTag, EnableSolvent) }; enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
public: public:

View File

@@ -72,7 +72,7 @@ namespace Opm {
using GridView = GetPropType<TypeTag, Properties::GridView>; using GridView = GetPropType<TypeTag, Properties::GridView>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; 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; typedef Opm::VtkMultiWriter<GridView, vtkFormat> VtkMultiWriter;

View File

@@ -49,11 +49,11 @@ private:
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::waterCompIdx> type; /*disabledCompIdx=*/FluidSystem::waterCompIdx> type;
}; };

View File

@@ -49,11 +49,11 @@ private:
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@@ -49,11 +49,11 @@ private:
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@@ -50,11 +50,11 @@ private:
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilTwoPhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@@ -55,8 +55,8 @@ public:
typedef Opm::BlackOilTwoPhaseIndices<0, typedef Opm::BlackOilTwoPhaseIndices<0,
2, 2,
0, 0,
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*disabledCompIdx=*/FluidSystem::gasCompIdx> type; /*disabledCompIdx=*/FluidSystem::gasCompIdx> type;
}; };

View File

@@ -37,11 +37,11 @@ private:
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilOnePhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilOnePhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*enebledCompIdx=*/FluidSystem::waterCompIdx> /*enebledCompIdx=*/FluidSystem::waterCompIdx>
type; type;

View File

@@ -37,11 +37,11 @@ private:
using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>; using FluidSystem = GetPropType<BaseTypeTag, Properties::FluidSystem>;
public: public:
typedef Opm::BlackOilOnePhaseIndices<GET_PROP_VALUE(TypeTag, EnableSolvent), typedef Opm::BlackOilOnePhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
GET_PROP_VALUE(TypeTag, EnablePolymer), getPropValue<TypeTag, Properties::EnablePolymer>(),
GET_PROP_VALUE(TypeTag, EnableEnergy), getPropValue<TypeTag, Properties::EnableEnergy>(),
GET_PROP_VALUE(TypeTag, EnableFoam), getPropValue<TypeTag, Properties::EnableFoam>(),
GET_PROP_VALUE(TypeTag, EnableBrine), getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0, /*PVOffset=*/0,
/*enebledCompIdx=*/FluidSystem::waterCompIdx> /*enebledCompIdx=*/FluidSystem::waterCompIdx>
type; type;

View File

@@ -51,9 +51,9 @@ public:
using RateVector = GetPropType<TypeTag, Properties::RateVector>; using RateVector = GetPropType<TypeTag, Properties::RateVector>;
using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>; using IntensiveQuantities = GetPropType<TypeTag, Properties::IntensiveQuantities>;
enum { enableTemperature = GET_PROP_VALUE(TypeTag, EnableTemperature) }; enum { enableTemperature = getPropValue<TypeTag, Properties::EnableTemperature>() };
enum { enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy) }; enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
enum { enableBrine = GET_PROP_VALUE(TypeTag, EnableBrine) }; enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
static const int numEq = BlackoilIndices::numEq; static const int numEq = BlackoilIndices::numEq;
typedef double Scalar; typedef double Scalar;

View File

@@ -164,12 +164,12 @@ namespace Opm {
, phaseUsage_(phaseUsageFromDeck(eclState())) , phaseUsage_(phaseUsageFromDeck(eclState()))
, has_disgas_(FluidSystem::enableDissolvedGas()) , has_disgas_(FluidSystem::enableDissolvedGas())
, has_vapoil_(FluidSystem::enableVaporizedOil()) , has_vapoil_(FluidSystem::enableVaporizedOil())
, has_solvent_(GET_PROP_VALUE(TypeTag, EnableSolvent)) , has_solvent_(getPropValue<TypeTag, Properties::EnableSolvent>())
, has_polymer_(GET_PROP_VALUE(TypeTag, EnablePolymer)) , has_polymer_(getPropValue<TypeTag, Properties::EnablePolymer>())
, has_polymermw_(GET_PROP_VALUE(TypeTag, EnablePolymerMW)) , has_polymermw_(getPropValue<TypeTag, Properties::EnablePolymerMW>())
, has_energy_(GET_PROP_VALUE(TypeTag, EnableEnergy)) , has_energy_(getPropValue<TypeTag, Properties::EnableEnergy>())
, has_foam_(GET_PROP_VALUE(TypeTag, EnableFoam)) , has_foam_(getPropValue<TypeTag, Properties::EnableFoam>())
, has_brine_(GET_PROP_VALUE(TypeTag, EnableBrine)) , has_brine_(getPropValue<TypeTag, Properties::EnableBrine>())
, param_( param ) , param_( param )
, well_model_ (well_model) , well_model_ (well_model)
, terminal_output_ (terminal_output) , terminal_output_ (terminal_output)

View File

@@ -67,7 +67,7 @@ SET_PROP(FlowIstlSolver, SparseMatrixAdapter)
{ {
private: private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
typedef Opm::MatrixBlock<Scalar, numEq, numEq> Block; typedef Opm::MatrixBlock<Scalar, numEq, numEq> Block;
public: public:

View File

@@ -29,8 +29,8 @@ namespace Opm {
BlackoilWellModel<TypeTag>:: BlackoilWellModel<TypeTag>::
BlackoilWellModel(Simulator& ebosSimulator) BlackoilWellModel(Simulator& ebosSimulator)
: ebosSimulator_(ebosSimulator) : ebosSimulator_(ebosSimulator)
, has_solvent_(GET_PROP_VALUE(TypeTag, EnableSolvent)) , has_solvent_(getPropValue<TypeTag, Properties::EnableSolvent>())
, has_polymer_(GET_PROP_VALUE(TypeTag, EnablePolymer)) , has_polymer_(getPropValue<TypeTag, Properties::EnablePolymer>())
{ {
terminal_output_ = false; terminal_output_ = false;
if (ebosSimulator.gridView().comm().rank() == 0) if (ebosSimulator.gridView().comm().rank() == 0)
@@ -350,7 +350,7 @@ namespace Opm {
if (has_polymer_) if (has_polymer_)
{ {
const Grid& grid = ebosSimulator_.vanguard().grid(); const Grid& grid = ebosSimulator_.vanguard().grid();
if (PolymerModule::hasPlyshlog() || GET_PROP_VALUE(TypeTag, EnablePolymerMW) ) { if (PolymerModule::hasPlyshlog() || getPropValue<TypeTag, Properties::EnablePolymerMW>() ) {
computeRepRadiusPerfLength(grid, local_deferredLogger); computeRepRadiusPerfLength(grid, local_deferredLogger);
} }
} }
@@ -446,7 +446,7 @@ namespace Opm {
Opm::DeferredLogger local_deferredLogger; Opm::DeferredLogger local_deferredLogger;
for (const auto& well : well_container_) { for (const auto& well : well_container_) {
if (GET_PROP_VALUE(TypeTag, EnablePolymerMW) && well->isInjector()) { if (getPropValue<TypeTag, Properties::EnablePolymerMW>() && well->isInjector()) {
well->updateWaterThroughput(dt, well_state_); well->updateWaterThroughput(dt, well_state_);
} }
} }

View File

@@ -69,7 +69,7 @@ namespace Opm
static const int SPres = gasoil? 2 : 3; static const int SPres = gasoil? 2 : 3;
/// the number of well equations // TODO: it should have a more general strategy for it /// the number of well equations // TODO: it should have a more general strategy for it
static const int numWellEq = GET_PROP_VALUE(TypeTag, EnablePolymer)? numEq : numEq + 1; static const int numWellEq = getPropValue<TypeTag, Properties::EnablePolymer>() ? numEq : numEq + 1;
using typename Base::Scalar; using typename Base::Scalar;

View File

@@ -91,14 +91,14 @@ namespace Opm
typedef Dune::BlockVector<VectorBlockType> BVector; typedef Dune::BlockVector<VectorBlockType> BVector;
typedef DenseAd::Evaluation<double, /*size=*/numEq> Eval; typedef DenseAd::Evaluation<double, /*size=*/numEq> Eval;
static const bool has_solvent = GET_PROP_VALUE(TypeTag, EnableSolvent); static const bool has_solvent = getPropValue<TypeTag, Properties::EnableSolvent>();
static const bool has_polymer = GET_PROP_VALUE(TypeTag, EnablePolymer); static const bool has_polymer = getPropValue<TypeTag, Properties::EnablePolymer>();
static const bool has_energy = GET_PROP_VALUE(TypeTag, EnableEnergy); static const bool has_energy = getPropValue<TypeTag, Properties::EnableEnergy>();
static const bool has_temperature = GET_PROP_VALUE(TypeTag, EnableTemperature); static const bool has_temperature = getPropValue<TypeTag, Properties::EnableTemperature>();
// flag for polymer molecular weight related // flag for polymer molecular weight related
static const bool has_polymermw = GET_PROP_VALUE(TypeTag, EnablePolymerMW); static const bool has_polymermw = getPropValue<TypeTag, Properties::EnablePolymerMW>();
static const bool has_foam = GET_PROP_VALUE(TypeTag, EnableFoam); static const bool has_foam = getPropValue<TypeTag, Properties::EnableFoam>();
static const bool has_brine = GET_PROP_VALUE(TypeTag, EnableBrine); static const bool has_brine = getPropValue<TypeTag, Properties::EnableBrine>();
static const int contiSolventEqIdx = Indices::contiSolventEqIdx; static const int contiSolventEqIdx = Indices::contiSolventEqIdx;
static const int contiPolymerEqIdx = Indices::contiPolymerEqIdx; static const int contiPolymerEqIdx = Indices::contiPolymerEqIdx;
// index for the polymer molecular weight continuity equation // index for the polymer molecular weight continuity equation