mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove macro EWOMS_GET_PARAM
This commit is contained in:
@@ -311,16 +311,16 @@ public:
|
|||||||
|
|
||||||
eps_ = 1e-6;
|
eps_ = 1e-6;
|
||||||
|
|
||||||
temperatureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow);
|
temperatureLow_ = Parameters::get<TypeTag, Properties::FluidSystemTemperatureLow>();
|
||||||
temperatureHigh_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh);
|
temperatureHigh_ = Parameters::get<TypeTag, Properties::FluidSystemTemperatureHigh>();
|
||||||
nTemperature_ = EWOMS_GET_PARAM(TypeTag, unsigned, FluidSystemNumTemperature);
|
nTemperature_ = Parameters::get<TypeTag, Properties::FluidSystemNumTemperature>();
|
||||||
|
|
||||||
pressureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemPressureLow);
|
pressureLow_ = Parameters::get<TypeTag, Properties::FluidSystemPressureLow>();
|
||||||
pressureHigh_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemPressureHigh);
|
pressureHigh_ = Parameters::get<TypeTag, Properties::FluidSystemPressureHigh>();
|
||||||
nPressure_ = EWOMS_GET_PARAM(TypeTag, unsigned, FluidSystemNumPressure);
|
nPressure_ = Parameters::get<TypeTag, Properties::FluidSystemNumPressure>();
|
||||||
|
|
||||||
maxDepth_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxDepth);
|
maxDepth_ = Parameters::get<TypeTag, Properties::MaxDepth>();
|
||||||
temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
|
temperature_ = Parameters::get<TypeTag, Properties::Temperature>();
|
||||||
|
|
||||||
// initialize the tables of the fluid system
|
// initialize the tables of the fluid system
|
||||||
// FluidSystem::init();
|
// FluidSystem::init();
|
||||||
@@ -404,7 +404,7 @@ public:
|
|||||||
std::string name() const
|
std::string name() const
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << EWOMS_GET_PARAM(TypeTag, std::string, SimulationName)
|
oss << Parameters::get<TypeTag, Properties::SimulationName>()
|
||||||
<< "_" << Model::name();
|
<< "_" << Model::name();
|
||||||
if (getPropValue<TypeTag, Properties::EnableEnergy>())
|
if (getPropValue<TypeTag, Properties::EnableEnergy>())
|
||||||
oss << "_ni";
|
oss << "_ni";
|
||||||
|
@@ -353,7 +353,7 @@ public:
|
|||||||
explicit CO2PTProblem(Simulator& simulator)
|
explicit CO2PTProblem(Simulator& simulator)
|
||||||
: ParentType(simulator)
|
: ParentType(simulator)
|
||||||
{
|
{
|
||||||
const Scalar epi_len = EWOMS_GET_PARAM(TypeTag, Scalar, EpisodeLength);
|
const Scalar epi_len = Parameters::get<TypeTag, Properties::EpisodeLength>();
|
||||||
simulator.setEpisodeLength(epi_len);
|
simulator.setEpisodeLength(epi_len);
|
||||||
FluidSystem::init();
|
FluidSystem::init();
|
||||||
using CompParm = typename FluidSystem::ComponentParam;
|
using CompParm = typename FluidSystem::ComponentParam;
|
||||||
@@ -371,7 +371,7 @@ public:
|
|||||||
|
|
||||||
void initPetrophysics()
|
void initPetrophysics()
|
||||||
{
|
{
|
||||||
temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
|
temperature_ = Parameters::get<TypeTag, Properties::Temperature>();
|
||||||
K_ = this->toDimMatrix_(9.869232667160131e-14);
|
K_ = this->toDimMatrix_(9.869232667160131e-14);
|
||||||
|
|
||||||
porosity_ = 0.1;
|
porosity_ = 0.1;
|
||||||
@@ -422,7 +422,7 @@ public:
|
|||||||
std::string name() const
|
std::string name() const
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << EWOMS_GET_PARAM(TypeTag, std::string, SimulationName);
|
oss << Parameters::get<TypeTag, Properties::SimulationName>();
|
||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ public:
|
|||||||
// the old one.
|
// the old one.
|
||||||
void endEpisode()
|
void endEpisode()
|
||||||
{
|
{
|
||||||
Scalar epi_len = EWOMS_GET_PARAM(TypeTag, Scalar, EpisodeLength);
|
Scalar epi_len = Parameters::get<TypeTag, Properties::EpisodeLength>();
|
||||||
this->simulator().startNextEpisode(epi_len);
|
this->simulator().startNextEpisode(epi_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -507,7 +507,7 @@ public:
|
|||||||
{
|
{
|
||||||
int spatialIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
int spatialIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
||||||
int inj = 0;
|
int inj = 0;
|
||||||
int prod = EWOMS_GET_PARAM(TypeTag, unsigned, CellsX) - 1;
|
int prod = Parameters::get<TypeTag, Properties::CellsX>() - 1;
|
||||||
if (spatialIdx == inj || spatialIdx == prod) {
|
if (spatialIdx == inj || spatialIdx == prod) {
|
||||||
return 1.0;
|
return 1.0;
|
||||||
} else {
|
} else {
|
||||||
@@ -558,7 +558,7 @@ private:
|
|||||||
// p0 = 75e5
|
// p0 = 75e5
|
||||||
// T0 = 423.25
|
// T0 = 423.25
|
||||||
int inj = 0;
|
int inj = 0;
|
||||||
int prod = EWOMS_GET_PARAM(TypeTag, unsigned, CellsX) - 1;
|
int prod = Parameters::get<TypeTag, Properties::CellsX>() - 1;
|
||||||
int spatialIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
int spatialIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
||||||
ComponentVector comp;
|
ComponentVector comp;
|
||||||
comp[0] = Evaluation::createVariable(0.5, 1);
|
comp[0] = Evaluation::createVariable(0.5, 1);
|
||||||
@@ -573,7 +573,7 @@ private:
|
|||||||
sat[0] = 1.0;
|
sat[0] = 1.0;
|
||||||
sat[1] = 1.0 - sat[0];
|
sat[1] = 1.0 - sat[0];
|
||||||
|
|
||||||
Scalar p0 = EWOMS_GET_PARAM(TypeTag, Scalar, Initialpressure);
|
Scalar p0 = Parameters::get<TypeTag, Properties::Initialpressure>();
|
||||||
|
|
||||||
//\Note, for an AD variable, if we multiply it with 2, the derivative will also be scalced with 2,
|
//\Note, for an AD variable, if we multiply it with 2, the derivative will also be scalced with 2,
|
||||||
//\Note, so we should not do it.
|
//\Note, so we should not do it.
|
||||||
|
@@ -558,7 +558,7 @@ private:
|
|||||||
auto& fs = initialFluidState_;
|
auto& fs = initialFluidState_;
|
||||||
fs.setPressure(wettingPhaseIdx, /*pressure=*/1e5);
|
fs.setPressure(wettingPhaseIdx, /*pressure=*/1e5);
|
||||||
|
|
||||||
Scalar Sw = EWOMS_GET_PARAM(TypeTag, Scalar, InitialWaterSaturation);
|
Scalar Sw = Parameters::get<TypeTag, Properties::InitialWaterSaturation>();
|
||||||
fs.setSaturation(wettingPhaseIdx, Sw);
|
fs.setSaturation(wettingPhaseIdx, Sw);
|
||||||
fs.setSaturation(nonWettingPhaseIdx, 1 - Sw);
|
fs.setSaturation(nonWettingPhaseIdx, 1 - Sw);
|
||||||
|
|
||||||
|
@@ -240,20 +240,20 @@ public:
|
|||||||
|
|
||||||
eps_ = 1.0e-3;
|
eps_ = 1.0e-3;
|
||||||
|
|
||||||
lensLowerLeft_[0] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftX);
|
lensLowerLeft_[0] = Parameters::get<TypeTag, Properties::LensLowerLeftX>();
|
||||||
if (dim > 1)
|
if (dim > 1)
|
||||||
lensLowerLeft_[1] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
|
lensLowerLeft_[1] = Parameters::get<TypeTag, Properties::LensLowerLeftY>();
|
||||||
if (dim > 2)
|
if (dim > 2)
|
||||||
lensLowerLeft_[2] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
|
lensLowerLeft_[2] = Parameters::get<TypeTag, Properties::LensLowerLeftY>();
|
||||||
|
|
||||||
lensUpperRight_[0] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightX);
|
lensUpperRight_[0] = Parameters::get<TypeTag, Properties::LensUpperRightX>();
|
||||||
if (dim > 1)
|
if (dim > 1)
|
||||||
lensUpperRight_[1] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightY);
|
lensUpperRight_[1] = Parameters::get<TypeTag, Properties::LensUpperRightY>();
|
||||||
if (dim > 2)
|
if (dim > 2)
|
||||||
lensUpperRight_[2] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightY);
|
lensUpperRight_[2] = Parameters::get<TypeTag, Properties::LensUpperRightY>();
|
||||||
|
|
||||||
intrinsicPerm_ = this->toDimMatrix_(EWOMS_GET_PARAM(TypeTag, Scalar, Permeability));
|
intrinsicPerm_ = this->toDimMatrix_(Parameters::get<TypeTag, Properties::Permeability>());
|
||||||
intrinsicPermLens_ = this->toDimMatrix_(EWOMS_GET_PARAM(TypeTag, Scalar, PermeabilityLens));
|
intrinsicPermLens_ = this->toDimMatrix_(Parameters::get<TypeTag, Properties::PermeabilityLens>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@@ -321,14 +321,14 @@ public:
|
|||||||
FluidSystem::init();
|
FluidSystem::init();
|
||||||
|
|
||||||
temperature_ = 273.15 + 20; // -> 20°C
|
temperature_ = 273.15 + 20; // -> 20°C
|
||||||
lensLowerLeft_[0] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftX);
|
lensLowerLeft_[0] = Parameters::get<TypeTag, Properties::LensLowerLeftX>();
|
||||||
lensLowerLeft_[1] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
|
lensLowerLeft_[1] = Parameters::get<TypeTag, Properties::LensLowerLeftY>();
|
||||||
lensUpperRight_[0] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightX);
|
lensUpperRight_[0] = Parameters::get<TypeTag, Properties::LensUpperRightX>();
|
||||||
lensUpperRight_[1] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightY);
|
lensUpperRight_[1] = Parameters::get<TypeTag, Properties::LensUpperRightY>();
|
||||||
|
|
||||||
if (dimWorld == 3) {
|
if (dimWorld == 3) {
|
||||||
lensLowerLeft_[2] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftZ);
|
lensLowerLeft_[2] = Parameters::get<TypeTag, Properties::LensLowerLeftZ>();
|
||||||
lensUpperRight_[2] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightZ);
|
lensUpperRight_[2] = Parameters::get<TypeTag, Properties::LensUpperRightZ>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// residual saturations
|
// residual saturations
|
||||||
|
@@ -262,9 +262,9 @@ public:
|
|||||||
{
|
{
|
||||||
ParentType::finishInit();
|
ParentType::finishInit();
|
||||||
|
|
||||||
temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
|
temperature_ = Parameters::get<TypeTag, Properties::Temperature>();
|
||||||
maxDepth_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxDepth);
|
maxDepth_ = Parameters::get<TypeTag, Properties::MaxDepth>();
|
||||||
wellWidth_ = EWOMS_GET_PARAM(TypeTag, Scalar, WellWidth);
|
wellWidth_ = Parameters::get<TypeTag, Properties::WellWidth>();
|
||||||
|
|
||||||
std::vector<std::pair<Scalar, Scalar> > Bo = {
|
std::vector<std::pair<Scalar, Scalar> > Bo = {
|
||||||
{ 101353, 1.062 },
|
{ 101353, 1.062 },
|
||||||
|
@@ -155,17 +155,17 @@ class BlackOilNewtonMethod : public GetPropType<TypeTag, Properties::DiscNewtonM
|
|||||||
public:
|
public:
|
||||||
BlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
BlackOilNewtonMethod(Simulator& simulator) : ParentType(simulator)
|
||||||
{
|
{
|
||||||
priVarOscilationThreshold_ = EWOMS_GET_PARAM(TypeTag, Scalar, PriVarOscilationThreshold);
|
priVarOscilationThreshold_ = Parameters::get<TypeTag, Properties::PriVarOscilationThreshold>();
|
||||||
dpMaxRel_ = EWOMS_GET_PARAM(TypeTag, Scalar, DpMaxRel);
|
dpMaxRel_ = Parameters::get<TypeTag, Properties::DpMaxRel>();
|
||||||
dsMax_ = EWOMS_GET_PARAM(TypeTag, Scalar, DsMax);
|
dsMax_ = Parameters::get<TypeTag, Properties::DsMax>();
|
||||||
projectSaturations_ = EWOMS_GET_PARAM(TypeTag, bool, ProjectSaturations);
|
projectSaturations_ = Parameters::get<TypeTag, Properties::ProjectSaturations>();
|
||||||
maxTempChange_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxTemperatureChange);
|
maxTempChange_ = Parameters::get<TypeTag, Properties::MaxTemperatureChange>();
|
||||||
tempMax_ = EWOMS_GET_PARAM(TypeTag, Scalar, TemperatureMax);
|
tempMax_ = Parameters::get<TypeTag, Properties::TemperatureMax>();
|
||||||
tempMin_ = EWOMS_GET_PARAM(TypeTag, Scalar, TemperatureMin);
|
tempMin_ = Parameters::get<TypeTag, Properties::TemperatureMin>();
|
||||||
pressMax_ = EWOMS_GET_PARAM(TypeTag, Scalar, PressureMax);
|
pressMax_ = Parameters::get<TypeTag, Properties::PressureMax>();
|
||||||
pressMin_ = EWOMS_GET_PARAM(TypeTag, Scalar, PressureMin);
|
pressMin_ = Parameters::get<TypeTag, Properties::PressureMin>();
|
||||||
waterSaturationMax_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaximumWaterSaturation);
|
waterSaturationMax_ = Parameters::get<TypeTag, Properties::MaximumWaterSaturation>();
|
||||||
waterOnlyThreshold_ = EWOMS_GET_PARAM(TypeTag, Scalar, WaterOnlyThreshold);
|
waterOnlyThreshold_ = Parameters::get<TypeTag, Properties::WaterOnlyThreshold>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@@ -212,7 +212,7 @@ public:
|
|||||||
static void init()
|
static void init()
|
||||||
{
|
{
|
||||||
// TODO: these parameters have undocumented non-trivial dependencies
|
// TODO: these parameters have undocumented non-trivial dependencies
|
||||||
pressureScale_ = EWOMS_GET_PARAM(TypeTag, double, PressureScale);
|
pressureScale_ = Parameters::get<TypeTag, Properties::PressureScale>();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void registerParameters()
|
static void registerParameters()
|
||||||
|
@@ -1368,7 +1368,7 @@ public:
|
|||||||
Valgrind::CheckDefined(solventPGrad);
|
Valgrind::CheckDefined(solventPGrad);
|
||||||
|
|
||||||
// correct the pressure gradients by the gravitational acceleration
|
// correct the pressure gradients by the gravitational acceleration
|
||||||
if (EWOMS_GET_PARAM(TypeTag, bool, EnableGravity)) {
|
if (Parameters::get<TypeTag, Properties::EnableGravity>()) {
|
||||||
// estimate the gravitational acceleration at a given SCV face
|
// estimate the gravitational acceleration at a given SCV face
|
||||||
// using the arithmetic mean
|
// using the arithmetic mean
|
||||||
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
||||||
|
@@ -214,7 +214,7 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// correct the pressure gradients by the gravitational acceleration
|
// correct the pressure gradients by the gravitational acceleration
|
||||||
if (EWOMS_GET_PARAM(TypeTag, bool, EnableGravity)) {
|
if (Parameters::get<TypeTag, Properties::EnableGravity>()) {
|
||||||
// estimate the gravitational acceleration at a given SCV face
|
// estimate the gravitational acceleration at a given SCV face
|
||||||
// using the arithmetic mean
|
// using the arithmetic mean
|
||||||
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
||||||
@@ -364,7 +364,7 @@ protected:
|
|||||||
K_ = intQuantsIn.intrinsicPermeability();
|
K_ = intQuantsIn.intrinsicPermeability();
|
||||||
|
|
||||||
// correct the pressure gradients by the gravitational acceleration
|
// correct the pressure gradients by the gravitational acceleration
|
||||||
if (EWOMS_GET_PARAM(TypeTag, bool, EnableGravity)) {
|
if (Parameters::get<TypeTag, Properties::EnableGravity>()) {
|
||||||
// estimate the gravitational acceleration at a given SCV face
|
// estimate the gravitational acceleration at a given SCV face
|
||||||
// using the arithmetic mean
|
// using the arithmetic mean
|
||||||
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
const auto& gIn = elemCtx.problem().gravity(elemCtx, i, timeIdx);
|
||||||
|
@@ -395,7 +395,7 @@ private:
|
|||||||
void init_()
|
void init_()
|
||||||
{
|
{
|
||||||
gravity_ = 0.0;
|
gravity_ = 0.0;
|
||||||
if (EWOMS_GET_PARAM(TypeTag, bool, EnableGravity))
|
if (Parameters::get<TypeTag, Properties::EnableGravity>())
|
||||||
gravity_[dimWorld-1] = -9.81;
|
gravity_[dimWorld-1] = -9.81;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -132,7 +132,7 @@ public:
|
|||||||
DiscreteFractureModel(Simulator& simulator)
|
DiscreteFractureModel(Simulator& simulator)
|
||||||
: ParentType(simulator)
|
: ParentType(simulator)
|
||||||
{
|
{
|
||||||
if (EWOMS_GET_PARAM(TypeTag, bool, EnableIntensiveQuantityCache)) {
|
if (Parameters::get<TypeTag, Properties::EnableIntensiveQuantityCache>()) {
|
||||||
throw std::runtime_error("The discrete fracture model does not work in conjunction "
|
throw std::runtime_error("The discrete fracture model does not work in conjunction "
|
||||||
"with intensive quantities caching");
|
"with intensive quantities caching");
|
||||||
}
|
}
|
||||||
|
@@ -453,10 +453,10 @@ public:
|
|||||||
, newtonMethod_(simulator)
|
, newtonMethod_(simulator)
|
||||||
, localLinearizer_(ThreadManager::maxThreads())
|
, localLinearizer_(ThreadManager::maxThreads())
|
||||||
, linearizer_(new Linearizer())
|
, linearizer_(new Linearizer())
|
||||||
, enableGridAdaptation_( EWOMS_GET_PARAM(TypeTag, bool, EnableGridAdaptation) )
|
, enableGridAdaptation_(Parameters::get<TypeTag, Properties::EnableGridAdaptation>() )
|
||||||
, enableIntensiveQuantityCache_(EWOMS_GET_PARAM(TypeTag, bool, EnableIntensiveQuantityCache))
|
, enableIntensiveQuantityCache_(Parameters::get<TypeTag, Properties::EnableIntensiveQuantityCache>())
|
||||||
, enableStorageCache_(EWOMS_GET_PARAM(TypeTag, bool, EnableStorageCache))
|
, enableStorageCache_(Parameters::get<TypeTag, Properties::EnableStorageCache>())
|
||||||
, enableThermodynamicHints_(EWOMS_GET_PARAM(TypeTag, bool, EnableThermodynamicHints))
|
, enableThermodynamicHints_(Parameters::get<TypeTag, Properties::EnableThermodynamicHints>())
|
||||||
{
|
{
|
||||||
bool isEcfv = std::is_same<Discretization, EcfvDiscretization<TypeTag> >::value;
|
bool isEcfv = std::is_same<Discretization, EcfvDiscretization<TypeTag> >::value;
|
||||||
if (enableGridAdaptation_ && !isEcfv)
|
if (enableGridAdaptation_ && !isEcfv)
|
||||||
@@ -464,7 +464,7 @@ public:
|
|||||||
"element-centered finite volume discretization (is: "
|
"element-centered finite volume discretization (is: "
|
||||||
+Dune::className<Discretization>()+")");
|
+Dune::className<Discretization>()+")");
|
||||||
|
|
||||||
enableStorageCache_ = EWOMS_GET_PARAM(TypeTag, bool, EnableStorageCache);
|
enableStorageCache_ = Parameters::get<TypeTag, Properties::EnableStorageCache>();
|
||||||
|
|
||||||
PrimaryVariables::init();
|
PrimaryVariables::init();
|
||||||
size_t numDof = asImp_().numGridDof();
|
size_t numDof = asImp_().numGridDof();
|
||||||
|
@@ -95,7 +95,7 @@ public:
|
|||||||
{
|
{
|
||||||
// remember the simulator object
|
// remember the simulator object
|
||||||
simulatorPtr_ = &simulator;
|
simulatorPtr_ = &simulator;
|
||||||
enableStorageCache_ = EWOMS_GET_PARAM(TypeTag, bool, EnableStorageCache);
|
enableStorageCache_ = Parameters::get<TypeTag, Properties::EnableStorageCache>();
|
||||||
stashedDofIdx_ = -1;
|
stashedDofIdx_ = -1;
|
||||||
focusDofIdx_ = -1;
|
focusDofIdx_ = -1;
|
||||||
}
|
}
|
||||||
|
@@ -335,7 +335,7 @@ protected:
|
|||||||
* \brief Returns the numeric difference method which is applied.
|
* \brief Returns the numeric difference method which is applied.
|
||||||
*/
|
*/
|
||||||
static int numericDifferenceMethod_()
|
static int numericDifferenceMethod_()
|
||||||
{ return EWOMS_GET_PARAM(TypeTag, int, NumericDifferenceMethod); }
|
{ return Parameters::get<TypeTag, Properties::NumericDifferenceMethod>(); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Resize all internal attributes to the size of the
|
* \brief Resize all internal attributes to the size of the
|
||||||
|
@@ -141,12 +141,12 @@ public:
|
|||||||
if (enableVtkOutput_()) {
|
if (enableVtkOutput_()) {
|
||||||
bool asyncVtkOutput =
|
bool asyncVtkOutput =
|
||||||
simulator_.gridView().comm().size() == 1 &&
|
simulator_.gridView().comm().size() == 1 &&
|
||||||
EWOMS_GET_PARAM(TypeTag, bool, EnableAsyncVtkOutput);
|
Parameters::get<TypeTag, Properties::EnableAsyncVtkOutput>();
|
||||||
|
|
||||||
// asynchonous VTK output currently does not work in conjunction with grid
|
// asynchonous VTK output currently does not work in conjunction with grid
|
||||||
// adaptivity because the async-IO code assumes that the grid stays
|
// adaptivity because the async-IO code assumes that the grid stays
|
||||||
// constant. complain about that case.
|
// constant. complain about that case.
|
||||||
bool enableGridAdaptation = EWOMS_GET_PARAM(TypeTag, bool, EnableGridAdaptation);
|
bool enableGridAdaptation = Parameters::get<TypeTag, Properties::EnableGridAdaptation>();
|
||||||
if (asyncVtkOutput && enableGridAdaptation)
|
if (asyncVtkOutput && enableGridAdaptation)
|
||||||
throw std::runtime_error("Asynchronous VTK output currently cannot be used "
|
throw std::runtime_error("Asynchronous VTK output currently cannot be used "
|
||||||
"at the same time as grid adaptivity");
|
"at the same time as grid adaptivity");
|
||||||
@@ -203,9 +203,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
std::string outputDir() const
|
std::string outputDir() const
|
||||||
{
|
{
|
||||||
std::string outputDir = EWOMS_GET_PARAM(TypeTag, std::string, OutputDir);
|
std::string outputDir = Parameters::get<TypeTag, Properties::OutputDir>();
|
||||||
|
|
||||||
if (outputDir == "")
|
if (outputDir.empty())
|
||||||
outputDir = ".";
|
outputDir = ".";
|
||||||
|
|
||||||
// TODO: replace this by std::filesystem once we require c++-2017
|
// TODO: replace this by std::filesystem once we require c++-2017
|
||||||
@@ -559,14 +559,14 @@ public:
|
|||||||
* \brief Returns the minimum allowable size of a time step.
|
* \brief Returns the minimum allowable size of a time step.
|
||||||
*/
|
*/
|
||||||
Scalar minTimeStepSize() const
|
Scalar minTimeStepSize() const
|
||||||
{ return EWOMS_GET_PARAM(TypeTag, Scalar, MinTimeStepSize); }
|
{ return Parameters::get<TypeTag, Properties::MinTimeStepSize>(); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns the maximum number of subsequent failures for the time integration
|
* \brief Returns the maximum number of subsequent failures for the time integration
|
||||||
* before giving up.
|
* before giving up.
|
||||||
*/
|
*/
|
||||||
unsigned maxTimeIntegrationFailures() const
|
unsigned maxTimeIntegrationFailures() const
|
||||||
{ return EWOMS_GET_PARAM(TypeTag, unsigned, MaxTimeStepDivisions); }
|
{ return Parameters::get<TypeTag, Properties::MaxTimeStepDivisions>(); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns if we should continue with a non-converged solution instead of
|
* \brief Returns if we should continue with a non-converged solution instead of
|
||||||
@@ -574,7 +574,7 @@ public:
|
|||||||
* step size.
|
* step size.
|
||||||
*/
|
*/
|
||||||
bool continueOnConvergenceError() const
|
bool continueOnConvergenceError() const
|
||||||
{ return EWOMS_GET_PARAM(TypeTag, unsigned, ContinueOnConvergenceError); }
|
{ return Parameters::get<TypeTag, Properties::ContinueOnConvergenceError>(); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Impose the next time step size to be used externally.
|
* \brief Impose the next time step size to be used externally.
|
||||||
@@ -592,7 +592,7 @@ public:
|
|||||||
if (nextTimeStepSize_ > 0.0)
|
if (nextTimeStepSize_ > 0.0)
|
||||||
return nextTimeStepSize_;
|
return nextTimeStepSize_;
|
||||||
|
|
||||||
Scalar dtNext = std::min(EWOMS_GET_PARAM(TypeTag, Scalar, MaxTimeStepSize),
|
Scalar dtNext = std::min(Parameters::get<TypeTag, Properties::MaxTimeStepSize>(),
|
||||||
newtonMethod().suggestTimeStepSize(simulator().timeStepSize()));
|
newtonMethod().suggestTimeStepSize(simulator().timeStepSize()));
|
||||||
|
|
||||||
if (dtNext < simulator().maxTimeStepSize()
|
if (dtNext < simulator().maxTimeStepSize()
|
||||||
@@ -811,7 +811,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool enableVtkOutput_() const
|
bool enableVtkOutput_() const
|
||||||
{ return EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput); }
|
{ return Parameters::get<TypeTag, Properties::EnableVtkOutput>(); }
|
||||||
|
|
||||||
//! Returns the implementation of the problem (i.e. static polymorphism)
|
//! Returns the implementation of the problem (i.e. static polymorphism)
|
||||||
Implementation& asImp_()
|
Implementation& asImp_()
|
||||||
|
@@ -122,7 +122,7 @@ public:
|
|||||||
: jacobian_()
|
: jacobian_()
|
||||||
{
|
{
|
||||||
simulatorPtr_ = 0;
|
simulatorPtr_ = 0;
|
||||||
separateSparseSourceTerms_ = EWOMS_GET_PARAM(TypeTag, bool, SeparateSparseSourceTerms);
|
separateSparseSourceTerms_ = Parameters::get<TypeTag, Properties::SeparateSparseSourceTerms>();
|
||||||
}
|
}
|
||||||
|
|
||||||
~TpfaLinearizer()
|
~TpfaLinearizer()
|
||||||
|
@@ -106,7 +106,7 @@ public:
|
|||||||
|
|
||||||
const auto& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
|
const auto& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
|
||||||
const auto& problem = elemCtx.problem();
|
const auto& problem = elemCtx.problem();
|
||||||
Scalar flashTolerance = EWOMS_GET_PARAM(TypeTag, Scalar, FlashTolerance);
|
Scalar flashTolerance = Parameters::get<TypeTag, Properties::FlashTolerance>();
|
||||||
|
|
||||||
// extract the total molar densities of the components
|
// extract the total molar densities of the components
|
||||||
ComponentVector cTotal;
|
ComponentVector cTotal;
|
||||||
|
@@ -100,18 +100,18 @@ public:
|
|||||||
for (unsigned i = 0; i < dimWorld; ++i)
|
for (unsigned i = 0; i < dimWorld; ++i)
|
||||||
cellRes[i] = 0;
|
cellRes[i] = 0;
|
||||||
|
|
||||||
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
|
upperRight[0] = Parameters::get<TypeTag, Properties::DomainSizeX>();
|
||||||
cellRes[0] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsX);
|
cellRes[0] = Parameters::get<TypeTag, Properties::CellsX>();
|
||||||
if (dimWorld > 1) {
|
if (dimWorld > 1) {
|
||||||
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
|
upperRight[1] = Parameters::get<TypeTag, Properties::DomainSizeY>();
|
||||||
cellRes[1] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsY);
|
cellRes[1] = Parameters::get<TypeTag, Properties::CellsY>();
|
||||||
}
|
}
|
||||||
if (dimWorld > 2) {
|
if (dimWorld > 2) {
|
||||||
upperRight[2] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeZ);
|
upperRight[2] = Parameters::get<TypeTag, Properties::DomainSizeZ>();
|
||||||
cellRes[2] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsZ);
|
cellRes[2] = Parameters::get<TypeTag, Properties::CellsZ>();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned numRefinements = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
unsigned numRefinements = Parameters::get<TypeTag, Properties::GridGlobalRefinements>();
|
||||||
cubeGrid_ = Dune::StructuredGridFactory<Grid>::createCubeGrid(lowerLeft, upperRight, cellRes);
|
cubeGrid_ = Dune::StructuredGridFactory<Grid>::createCubeGrid(lowerLeft, upperRight, cellRes);
|
||||||
cubeGrid_->globalRefine(static_cast<int>(numRefinements));
|
cubeGrid_->globalRefine(static_cast<int>(numRefinements));
|
||||||
|
|
||||||
|
@@ -75,8 +75,8 @@ public:
|
|||||||
DgfVanguard(Simulator& simulator)
|
DgfVanguard(Simulator& simulator)
|
||||||
: ParentType(simulator)
|
: ParentType(simulator)
|
||||||
{
|
{
|
||||||
const std::string dgfFileName = EWOMS_GET_PARAM(TypeTag, std::string, GridFile);
|
const std::string dgfFileName = Parameters::get<TypeTag, Properties::GridFile>();
|
||||||
unsigned numRefinments = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
unsigned numRefinments = Parameters::get<TypeTag, Properties::GridGlobalRefinements>();
|
||||||
|
|
||||||
{
|
{
|
||||||
// create DGF GridPtr from a dgf file
|
// create DGF GridPtr from a dgf file
|
||||||
|
@@ -59,24 +59,24 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void registerParameters()
|
static void registerParameters()
|
||||||
{
|
{
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements,
|
Parameters::registerParam<TypeTag, Properties::GridGlobalRefinements>
|
||||||
"The number of global refinements of the grid "
|
("The number of global refinements of the grid "
|
||||||
"executed after it was loaded");
|
"executed after it was loaded");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeX,
|
Parameters::registerParam<TypeTag, Properties::DomainSizeX>
|
||||||
"The size of the domain in x direction");
|
("The size of the domain in x direction");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, unsigned, CellsX,
|
Parameters::registerParam<TypeTag, Properties::CellsX>
|
||||||
"The number of intervalls in x direction");
|
("The number of intervalls in x direction");
|
||||||
if (dimWorld > 1) {
|
if (dimWorld > 1) {
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeY,
|
Parameters::registerParam<TypeTag, Properties::DomainSizeY>
|
||||||
"The size of the domain in y direction");
|
("The size of the domain in y direction");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, unsigned, CellsY,
|
Parameters::registerParam<TypeTag, Properties::CellsY>
|
||||||
"The number of intervalls in y direction");
|
("The number of intervalls in y direction");
|
||||||
}
|
}
|
||||||
if (dimWorld > 2) {
|
if (dimWorld > 2) {
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ,
|
Parameters::registerParam<TypeTag, Properties::DomainSizeZ>
|
||||||
"The size of the domain in z direction");
|
("The size of the domain in z direction");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, unsigned, CellsZ,
|
Parameters::registerParam<TypeTag, Properties::CellsZ>
|
||||||
"The number of intervalls in z direction");
|
("The number of intervalls in z direction");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,24 +91,24 @@ public:
|
|||||||
GlobalPosition lowerLeft;
|
GlobalPosition lowerLeft;
|
||||||
|
|
||||||
lowerLeft[0] = 0.0;
|
lowerLeft[0] = 0.0;
|
||||||
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
|
upperRight[0] = Parameters::get<TypeTag, Properties::DomainSizeX>();
|
||||||
cellRes[0] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsX);
|
cellRes[0] = Parameters::get<TypeTag, Properties::CellsX>();
|
||||||
if (dimWorld > 1) {
|
if (dimWorld > 1) {
|
||||||
lowerLeft[1] = 0.0;
|
lowerLeft[1] = 0.0;
|
||||||
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
|
upperRight[1] = Parameters::get<TypeTag, Properties::DomainSizeY>();
|
||||||
cellRes[1] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsY);
|
cellRes[1] = Parameters::get<TypeTag, Properties::CellsY>();
|
||||||
}
|
}
|
||||||
if (dimWorld > 2) {
|
if (dimWorld > 2) {
|
||||||
lowerLeft[2] = 0.0;
|
lowerLeft[2] = 0.0;
|
||||||
upperRight[2] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeZ);
|
upperRight[2] = Parameters::get<TypeTag, Properties::DomainSizeZ>();
|
||||||
cellRes[2] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsZ);
|
cellRes[2] = Parameters::get<TypeTag, Properies::CellsZ>();
|
||||||
}
|
}
|
||||||
|
|
||||||
simplexGrid_ = Dune::StructuredGridFactory<Grid>::createSimplexGrid(lowerLeft,
|
simplexGrid_ = Dune::StructuredGridFactory<Grid>::createSimplexGrid(lowerLeft,
|
||||||
upperRight,
|
upperRight,
|
||||||
cellRes);
|
cellRes);
|
||||||
|
|
||||||
unsigned numRefinments = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
unsigned numRefinments = Parameters::get<TypeTag, Properties::GridGlobalRefinements>();
|
||||||
simplexGrid_->globalRefine(numRefinments);
|
simplexGrid_->globalRefine(numRefinments);
|
||||||
|
|
||||||
this->finalizeInit_();
|
this->finalizeInit_();
|
||||||
|
@@ -139,14 +139,14 @@ public:
|
|||||||
Dune::FieldVector<GridScalar, dim> upperRight;
|
Dune::FieldVector<GridScalar, dim> upperRight;
|
||||||
Dune::FieldVector<GridScalar, dim> lowerLeft( 0 );
|
Dune::FieldVector<GridScalar, dim> lowerLeft( 0 );
|
||||||
|
|
||||||
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
|
upperRight[0] = Parameters::get<TypeTag, Properties::DomainSizeX>();
|
||||||
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
|
upperRight[1] = Parameters::get<TypeTag, Properties::DomainSizeY>();
|
||||||
|
|
||||||
cellRes[0] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsX);
|
cellRes[0] = Parameters::get<TypeTag, Properties::CellsX>();
|
||||||
cellRes[1] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsY);
|
cellRes[1] = Parameters::get<TypeTag, Properties::CellsY>();
|
||||||
if (dim == 3) {
|
if (dim == 3) {
|
||||||
upperRight[2] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeZ);
|
upperRight[2] = Parameters::get<TypeTag, Properties::DomainSizeZ>();
|
||||||
cellRes[2] = EWOMS_GET_PARAM(TypeTag, unsigned, CellsZ);
|
cellRes[2] = Parameters::get<TypeTag, Properties::CellsZ>();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::stringstream dgffile;
|
std::stringstream dgffile;
|
||||||
@@ -165,7 +165,7 @@ public:
|
|||||||
// use DGF parser to create a grid from interval block
|
// use DGF parser to create a grid from interval block
|
||||||
gridPtr_.reset( Dune::GridPtr< Grid >( dgffile ).release() );
|
gridPtr_.reset( Dune::GridPtr< Grid >( dgffile ).release() );
|
||||||
|
|
||||||
unsigned numRefinements = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
unsigned numRefinements = Parameters::get<TypeTag, Properties::GridGlobalRefinements>();
|
||||||
gridPtr_->globalRefine(static_cast<int>(numRefinements));
|
gridPtr_->globalRefine(static_cast<int>(numRefinements));
|
||||||
|
|
||||||
this->finalizeInit_();
|
this->finalizeInit_();
|
||||||
|
@@ -52,11 +52,11 @@ class UnstructuredGridVanguard : public BaseVanguard<TypeTag> {
|
|||||||
* unstructured grid simulator vanguard.
|
* unstructured grid simulator vanguard.
|
||||||
*/
|
*/
|
||||||
static void registerParameters() {
|
static void registerParameters() {
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements,
|
Parameters::registerParam<TypeTag, Properties::GridGlobalRefinements>
|
||||||
"The number of global refinements of the grid "
|
("The number of global refinements of the grid "
|
||||||
"executed after it was loaded");
|
"executed after it was loaded");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, std::string, GridFile,
|
Parameters::registerParam<TypeTag, Properties::GridFile>,
|
||||||
"The file name of the file to load");
|
("The file name of the file to load");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -64,8 +64,8 @@ class UnstructuredGridVanguard : public BaseVanguard<TypeTag> {
|
|||||||
*/
|
*/
|
||||||
UnstructuredGridVanguard(Simulator& simulator) : ParentType(simulator){
|
UnstructuredGridVanguard(Simulator& simulator) : ParentType(simulator){
|
||||||
#ifdef HAVE_OPM_GRID
|
#ifdef HAVE_OPM_GRID
|
||||||
const std::string gridFileName = EWOMS_GET_PARAM(TypeTag, std::string, GridFile);
|
const std::string gridFileName = Parameters::get<TypeTag, Properties::GridFile>();
|
||||||
unsigned numRefinments = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
|
unsigned numRefinments = Parameters::get<TypeTag, Properties::GridGlobalRefinements>();
|
||||||
|
|
||||||
const char* c_str = gridFileName.c_str();
|
const char* c_str = gridFileName.c_str();
|
||||||
|
|
||||||
|
@@ -130,7 +130,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void allocBuffers()
|
void allocBuffers()
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!enableEnergy)
|
if (!enableEnergy)
|
||||||
@@ -152,7 +152,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!enableEnergy)
|
if (!enableEnergy)
|
||||||
@@ -212,25 +212,25 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool rockInternalEnergyOutput_()
|
static bool rockInternalEnergyOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteRockInternalEnergy);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteRockInternalEnergy>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool totalThermalConductivityOutput_()
|
static bool totalThermalConductivityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteTotalThermalConductivity);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteTotalThermalConductivity>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool fluidInternalEnergiesOutput_()
|
static bool fluidInternalEnergiesOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFluidInternalEnergies);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFluidInternalEnergies>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool fluidEnthalpiesOutput_()
|
static bool fluidEnthalpiesOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFluidEnthalpies);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFluidEnthalpies>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -134,7 +134,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void allocBuffers()
|
void allocBuffers()
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!enableMICP)
|
if (!enableMICP)
|
||||||
@@ -158,7 +158,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!enableMICP)
|
if (!enableMICP)
|
||||||
@@ -223,31 +223,31 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool microbialConcentrationOutput_()
|
static bool microbialConcentrationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteMicrobialConcentration);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteMicrobialConcentration>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool oxygenConcentrationOutput_()
|
static bool oxygenConcentrationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteOxygenConcentration);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteOxygenConcentration>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ureaConcentrationOutput_()
|
static bool ureaConcentrationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteUreaConcentration);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteUreaConcentration>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool biofilmConcentrationOutput_()
|
static bool biofilmConcentrationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteBiofilmConcentration);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteBiofilmConcentration>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool calciteConcentrationOutput_()
|
static bool calciteConcentrationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteCalciteConcentration);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteCalciteConcentration>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -216,7 +216,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) {
|
for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) {
|
||||||
@@ -344,67 +344,67 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool gasDissolutionFactorOutput_()
|
static bool gasDissolutionFactorOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteGasDissolutionFactor);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteGasDissolutionFactor>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool oilVaporizationFactorOutput_()
|
static bool oilVaporizationFactorOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteOilVaporizationFactor);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteOilVaporizationFactor>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool oilFormationVolumeFactorOutput_()
|
static bool oilFormationVolumeFactorOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteOilFormationVolumeFactor);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteOilFormationVolumeFactor>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gasFormationVolumeFactorOutput_()
|
static bool gasFormationVolumeFactorOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteGasFormationVolumeFactor);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteGasFormationVolumeFactor>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool waterFormationVolumeFactorOutput_()
|
static bool waterFormationVolumeFactorOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteWaterFormationVolumeFactor);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteWaterFormationVolumeFactor>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool oilSaturationPressureOutput_()
|
static bool oilSaturationPressureOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteOilSaturationPressure);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteOilSaturationPressure>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gasSaturationPressureOutput_()
|
static bool gasSaturationPressureOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteGasSaturationPressure);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteGasSaturationPressure>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool saturatedOilGasDissolutionFactorOutput_()
|
static bool saturatedOilGasDissolutionFactorOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSaturatedOilGasDissolutionFactor);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSaturatedOilGasDissolutionFactor>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool saturatedGasOilVaporizationFactorOutput_()
|
static bool saturatedGasOilVaporizationFactorOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSaturatedGasOilVaporizationFactor);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSaturatedGasOilVaporizationFactor>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool saturationRatiosOutput_()
|
static bool saturationRatiosOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSaturationRatios);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSaturationRatios>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool primaryVarsMeaningOutput_()
|
static bool primaryVarsMeaningOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePrimaryVarsMeaning);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePrimaryVarsMeaning>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -143,7 +143,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void allocBuffers()
|
void allocBuffers()
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!enablePolymer)
|
if (!enablePolymer)
|
||||||
@@ -169,7 +169,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!enablePolymer)
|
if (!enablePolymer)
|
||||||
@@ -239,37 +239,37 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool polymerConcentrationOutput_()
|
static bool polymerConcentrationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePolymerConcentration);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePolymerConcentration>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool polymerDeadPoreVolumeOutput_()
|
static bool polymerDeadPoreVolumeOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePolymerDeadPoreVolume);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePolymerDeadPoreVolume>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool polymerRockDensityOutput_()
|
static bool polymerRockDensityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePolymerRockDensity);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePolymerRockDensity>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool polymerAdsorptionOutput_()
|
static bool polymerAdsorptionOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePolymerAdsorption);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePolymerAdsorption>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool polymerViscosityCorrectionOutput_()
|
static bool polymerViscosityCorrectionOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePolymerViscosityCorrection);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePolymerViscosityCorrection>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool waterViscosityCorrectionOutput_()
|
static bool waterViscosityCorrectionOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePolymerViscosityCorrection);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePolymerViscosityCorrection>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -136,7 +136,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void allocBuffers()
|
void allocBuffers()
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!enableSolvent)
|
if (!enableSolvent)
|
||||||
@@ -160,7 +160,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!enableSolvent)
|
if (!enableSolvent)
|
||||||
@@ -224,31 +224,31 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool solventSaturationOutput_()
|
static bool solventSaturationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSolventSaturation);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSolventSaturation>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool solventRswOutput_()
|
static bool solventRswOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSolventRsw);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSolventRsw>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool solventDensityOutput_()
|
static bool solventDensityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSolventDensity);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSolventDensity>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool solventViscosityOutput_()
|
static bool solventViscosityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSolventViscosity);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSolventViscosity>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool solventMobilityOutput_()
|
static bool solventMobilityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSolventMobility);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSolventMobility>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -170,7 +170,7 @@ public:
|
|||||||
{
|
{
|
||||||
using Toolbox = MathToolbox<Evaluation>;
|
using Toolbox = MathToolbox<Evaluation>;
|
||||||
|
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
||||||
@@ -256,43 +256,43 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool massFracOutput_()
|
static bool massFracOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteMassFractions);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteMassFractions>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool moleFracOutput_()
|
static bool moleFracOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteMoleFractions);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteMoleFractions>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool totalMassFracOutput_()
|
static bool totalMassFracOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteTotalMassFractions);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteTotalMassFractions>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool totalMoleFracOutput_()
|
static bool totalMoleFracOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteTotalMoleFractions);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteTotalMoleFractions>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool molarityOutput_()
|
static bool molarityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteMolarities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteMolarities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool fugacityOutput_()
|
static bool fugacityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFugacities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFugacities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool fugacityCoeffOutput_()
|
static bool fugacityCoeffOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFugacityCoeffs);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFugacityCoeffs>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -138,7 +138,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
||||||
@@ -184,19 +184,19 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool tortuosityOutput_()
|
static bool tortuosityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteTortuosities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteTortuosities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool diffusionCoefficientOutput_()
|
static bool diffusionCoefficientOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteDiffusionCoefficients);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteDiffusionCoefficients>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool effectiveDiffusionCoefficientOutput_()
|
static bool effectiveDiffusionCoefficientOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteEffectiveDiffusionCoefficients);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteEffectiveDiffusionCoefficients>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -190,7 +190,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto& fractureMapper = elemCtx.simulator().vanguard().fractureMapper();
|
const auto& fractureMapper = elemCtx.simulator().vanguard().fractureMapper();
|
||||||
@@ -318,43 +318,43 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool saturationOutput_()
|
static bool saturationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFractureSaturations);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFractureSaturations>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool mobilityOutput_()
|
static bool mobilityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFractureMobilities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFractureMobilities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool relativePermeabilityOutput_()
|
static bool relativePermeabilityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFractureRelativePermeabilities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFractureRelativePermeabilities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool porosityOutput_()
|
static bool porosityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFracturePorosity);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFracturePorosity>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool intrinsicPermeabilityOutput_()
|
static bool intrinsicPermeabilityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFractureIntrinsicPermeabilities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFractureIntrinsicPermeabilities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool volumeFractionOutput_()
|
static bool volumeFractionOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFractureVolumeFraction);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFractureVolumeFraction>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool velocityOutput_()
|
static bool velocityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFractureFilterVelocities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFractureFilterVelocities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -148,7 +148,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
||||||
@@ -194,25 +194,25 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool solidInternalEnergyOutput_()
|
static bool solidInternalEnergyOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSolidInternalEnergy);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSolidInternalEnergy>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool thermalConductivityOutput_()
|
static bool thermalConductivityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteThermalConductivity);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteThermalConductivity>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool enthalpyOutput_()
|
static bool enthalpyOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteEnthalpies);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteEnthalpies>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool internalEnergyOutput_()
|
static bool internalEnergyOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteInternalEnergies);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteInternalEnergies>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -238,7 +238,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto& problem = elemCtx.problem();
|
const auto& problem = elemCtx.problem();
|
||||||
@@ -418,73 +418,73 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool extrusionFactorOutput_()
|
static bool extrusionFactorOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteExtrusionFactor);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteExtrusionFactor>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool pressureOutput_()
|
static bool pressureOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePressures);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePressures>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool densityOutput_()
|
static bool densityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteDensities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteDensities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool saturationOutput_()
|
static bool saturationOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteSaturations);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteSaturations>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool mobilityOutput_()
|
static bool mobilityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteMobilities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteMobilities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool relativePermeabilityOutput_()
|
static bool relativePermeabilityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteRelativePermeabilities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteRelativePermeabilities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool viscosityOutput_()
|
static bool viscosityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteViscosities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteViscosities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool averageMolarMassOutput_()
|
static bool averageMolarMassOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteAverageMolarMasses);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteAverageMolarMasses>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool porosityOutput_()
|
static bool porosityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePorosity);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePorosity>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool intrinsicPermeabilityOutput_()
|
static bool intrinsicPermeabilityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteIntrinsicPermeabilities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteIntrinsicPermeabilities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool velocityOutput_()
|
static bool velocityOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteFilterVelocities);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteFilterVelocities>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool potentialGradientOutput_()
|
static bool potentialGradientOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePotentialGradients);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePotentialGradients>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -103,7 +103,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
||||||
@@ -133,7 +133,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool phasePresenceOutput_()
|
static bool phasePresenceOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePhasePresence);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePhasePresence>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -122,7 +122,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void processElement(const ElementContext& elemCtx)
|
void processElement(const ElementContext& elemCtx)
|
||||||
{
|
{
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto& elementMapper = elemCtx.model().elementMapper();
|
const auto& elementMapper = elemCtx.model().elementMapper();
|
||||||
@@ -168,17 +168,17 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool primaryVarsOutput_()
|
static bool primaryVarsOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWritePrimaryVars);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWritePrimaryVars>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
static bool processRankOutput_()
|
static bool processRankOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteProcessRank);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteProcessRank>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
static bool dofIndexOutput_()
|
static bool dofIndexOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteDofIndex);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteDofIndex>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -125,7 +125,7 @@ public:
|
|||||||
{
|
{
|
||||||
using Toolbox = MathToolbox<Evaluation>;
|
using Toolbox = MathToolbox<Evaluation>;
|
||||||
|
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
||||||
@@ -162,13 +162,13 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool LOutput_()
|
static bool LOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteLiquidMoleFractions);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteLiquidMoleFractions>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool equilConstOutput_()
|
static bool equilConstOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteEquilibriumConstants);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteEquilibriumConstants>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -109,7 +109,7 @@ public:
|
|||||||
{
|
{
|
||||||
using Toolbox = MathToolbox<Evaluation>;
|
using Toolbox = MathToolbox<Evaluation>;
|
||||||
|
|
||||||
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
|
if (!Parameters::get<TypeTag, Properties::EnableVtkOutput>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
for (unsigned i = 0; i < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++i) {
|
||||||
@@ -139,7 +139,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
static bool temperatureOutput_()
|
static bool temperatureOutput_()
|
||||||
{
|
{
|
||||||
static bool val = EWOMS_GET_PARAM(TypeTag, bool, VtkWriteTemperature);
|
static bool val = Parameters::get<TypeTag, Properties::VtkWriteTemperature>();
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -117,10 +117,10 @@ protected:
|
|||||||
|
|
||||||
// make sure that the error never grows beyond the maximum
|
// make sure that the error never grows beyond the maximum
|
||||||
// allowed one
|
// allowed one
|
||||||
if (this->error_ > EWOMS_GET_PARAM(TypeTag, Scalar, NewtonMaxError))
|
if (this->error_ > Parameters::get<TypeTag, Properties::NewtonMaxError>())
|
||||||
throw Opm::NumericalProblem("Newton: Error "+std::to_string(double(this->error_))+
|
throw Opm::NumericalProblem("Newton: Error "+std::to_string(double(this->error_))+
|
||||||
+ " is larger than maximum allowed error of "
|
+ " is larger than maximum allowed error of "
|
||||||
+ std::to_string(double(EWOMS_GET_PARAM(TypeTag, Scalar, NewtonMaxError))));
|
+ std::to_string(Parameters::get<TypeTag, Properties::NewtonMaxError>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@@ -139,7 +139,7 @@ public:
|
|||||||
{
|
{
|
||||||
lastError_ = 1e100;
|
lastError_ = 1e100;
|
||||||
error_ = 1e100;
|
error_ = 1e100;
|
||||||
tolerance_ = EWOMS_GET_PARAM(TypeTag, Scalar, NewtonTolerance);
|
tolerance_ = Parameters::get<TypeTag, Properties::NewtonTolerance>();
|
||||||
|
|
||||||
numIterations_ = 0;
|
numIterations_ = 0;
|
||||||
}
|
}
|
||||||
@@ -529,7 +529,7 @@ protected:
|
|||||||
*/
|
*/
|
||||||
bool verbose_() const
|
bool verbose_() const
|
||||||
{
|
{
|
||||||
return EWOMS_GET_PARAM(TypeTag, bool, NewtonVerbose) && (comm_.rank() == 0);
|
return Parameters::get<TypeTag, Properties::NewtonVerbose>() && (comm_.rank() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -542,7 +542,7 @@ protected:
|
|||||||
{
|
{
|
||||||
numIterations_ = 0;
|
numIterations_ = 0;
|
||||||
|
|
||||||
if (EWOMS_GET_PARAM(TypeTag, bool, NewtonWriteConvergence))
|
if (Parameters::get<TypeTag, Properties::NewtonWriteConvergence>())
|
||||||
convergenceWriter_.beginTimeStep();
|
convergenceWriter_.beginTimeStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -594,7 +594,7 @@ protected:
|
|||||||
{
|
{
|
||||||
const auto& constraintsMap = model().linearizer().constraintsMap();
|
const auto& constraintsMap = model().linearizer().constraintsMap();
|
||||||
lastError_ = error_;
|
lastError_ = error_;
|
||||||
Scalar newtonMaxError = EWOMS_GET_PARAM(TypeTag, Scalar, NewtonMaxError);
|
Scalar newtonMaxError = Parameters::get<TypeTag, Properties::NewtonMaxError>();
|
||||||
|
|
||||||
// calculate the error as the maximum weighted tolerance of
|
// calculate the error as the maximum weighted tolerance of
|
||||||
// the solution's residual
|
// the solution's residual
|
||||||
@@ -759,7 +759,7 @@ protected:
|
|||||||
void writeConvergence_(const SolutionVector& currentSolution,
|
void writeConvergence_(const SolutionVector& currentSolution,
|
||||||
const GlobalEqVector& solutionUpdate)
|
const GlobalEqVector& solutionUpdate)
|
||||||
{
|
{
|
||||||
if (EWOMS_GET_PARAM(TypeTag, bool, NewtonWriteConvergence)) {
|
if (Parameters::get<TypeTag, Properties::NewtonWriteConvergence>()) {
|
||||||
convergenceWriter_.beginIteration();
|
convergenceWriter_.beginIteration();
|
||||||
convergenceWriter_.writeFields(currentSolution, solutionUpdate);
|
convergenceWriter_.writeFields(currentSolution, solutionUpdate);
|
||||||
convergenceWriter_.endIteration();
|
convergenceWriter_.endIteration();
|
||||||
@@ -831,7 +831,7 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void end_()
|
void end_()
|
||||||
{
|
{
|
||||||
if (EWOMS_GET_PARAM(TypeTag, bool, NewtonWriteConvergence))
|
if (Parameters::get<TypeTag, Properties::NewtonWriteConvergence>())
|
||||||
convergenceWriter_.endTimeStep();
|
convergenceWriter_.endTimeStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -853,10 +853,10 @@ protected:
|
|||||||
|
|
||||||
// optimal number of iterations we want to achieve
|
// optimal number of iterations we want to achieve
|
||||||
int targetIterations_() const
|
int targetIterations_() const
|
||||||
{ return EWOMS_GET_PARAM(TypeTag, int, NewtonTargetIterations); }
|
{ return Parameters::get<TypeTag, Properties::NewtonTargetIterations>(); }
|
||||||
// maximum number of iterations we do before giving up
|
// maximum number of iterations we do before giving up
|
||||||
int maxIterations_() const
|
int maxIterations_() const
|
||||||
{ return EWOMS_GET_PARAM(TypeTag, int, NewtonMaxIterations); }
|
{ return Parameters::get<TypeTag, Properties::NewtonMaxIterations>(); }
|
||||||
|
|
||||||
static bool enableConstraints_()
|
static bool enableConstraints_()
|
||||||
{ return getPropValue<TypeTag, Properties::EnableConstraints>(); }
|
{ return getPropValue<TypeTag, Properties::EnableConstraints>(); }
|
||||||
|
@@ -78,7 +78,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (queryCommandLineParameter)
|
if (queryCommandLineParameter)
|
||||||
{
|
{
|
||||||
numThreads_ = EWOMS_GET_PARAM(TypeTag, int, ThreadsPerProcess);
|
numThreads_ = Parameters::get<TypeTag, Properties::ThreadsPerProcess>();
|
||||||
|
|
||||||
// some safety checks. This is pretty ugly macro-magic, but so what?
|
// some safety checks. This is pretty ugly macro-magic, but so what?
|
||||||
#if !defined(_OPENMP)
|
#if !defined(_OPENMP)
|
||||||
|
@@ -107,9 +107,9 @@ public:
|
|||||||
const auto& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
|
const auto& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
|
||||||
const auto& problem = elemCtx.problem();
|
const auto& problem = elemCtx.problem();
|
||||||
|
|
||||||
const Scalar flashTolerance = EWOMS_GET_PARAM(TypeTag, Scalar, FlashTolerance);
|
const Scalar flashTolerance = Parameters::get<TypeTag, Properties::FlashTolerance>();
|
||||||
const int flashVerbosity = EWOMS_GET_PARAM(TypeTag, int, FlashVerbosity);
|
const int flashVerbosity = Parameters::get<TypeTag, Properties::FlashVerbosity>();
|
||||||
const std::string flashTwoPhaseMethod = EWOMS_GET_PARAM(TypeTag, std::string, FlashTwoPhaseMethod);
|
const std::string flashTwoPhaseMethod = Parameters::get<TypeTag, Properties::FlashTwoPhaseMethod>();
|
||||||
|
|
||||||
// extract the total molar densities of the components
|
// extract the total molar densities of the components
|
||||||
ComponentVector z(0.);
|
ComponentVector z(0.);
|
||||||
|
@@ -275,7 +275,7 @@ public:
|
|||||||
PvsModel(Simulator& simulator)
|
PvsModel(Simulator& simulator)
|
||||||
: ParentType(simulator)
|
: ParentType(simulator)
|
||||||
{
|
{
|
||||||
verbosity_ = EWOMS_GET_PARAM(TypeTag, int, PvsVerbosity);
|
verbosity_ = Parameters::get<TypeTag, Properties::PvsVerbosity>();
|
||||||
numSwitched_ = 0;
|
numSwitched_ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,24 +56,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
/*!
|
|
||||||
* \ingroup Parameter
|
|
||||||
*
|
|
||||||
* \brief Retrieve a runtime parameter.
|
|
||||||
*
|
|
||||||
* The default value is specified via the property system.
|
|
||||||
*
|
|
||||||
* Example:
|
|
||||||
*
|
|
||||||
* \code
|
|
||||||
* // Retrieves scalar value UpwindWeight, default
|
|
||||||
* // is taken from the property UpwindWeight
|
|
||||||
* EWOMS_GET_PARAM(TypeTag, Scalar, UpwindWeight);
|
|
||||||
* \endcode
|
|
||||||
*/
|
|
||||||
#define EWOMS_GET_PARAM(TypeTag, ParamType, ParamName) \
|
|
||||||
(::Opm::Parameters::get<TypeTag, Properties::ParamName>())
|
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
namespace Parameters {
|
namespace Parameters {
|
||||||
|
|
||||||
@@ -96,7 +78,21 @@ struct ParamInfo
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// forward declaration
|
/*!
|
||||||
|
* \ingroup Parameter
|
||||||
|
*
|
||||||
|
* \brief Retrieve a runtime parameter.
|
||||||
|
*
|
||||||
|
* The default value is specified via the property system.
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
*
|
||||||
|
* \code
|
||||||
|
* // Retrieves value UpwindWeight, default
|
||||||
|
* // is taken from the property UpwindWeight
|
||||||
|
* ::Opm::Parameters::get<TypeTag, Properties::UpwindWeight>();
|
||||||
|
* \endcode
|
||||||
|
*/
|
||||||
template <class TypeTag, template<class,class> class Property>
|
template <class TypeTag, template<class,class> class Property>
|
||||||
auto get(bool errorIfNotRegistered = true);
|
auto get(bool errorIfNotRegistered = true);
|
||||||
|
|
||||||
|
@@ -129,11 +129,11 @@ public:
|
|||||||
timeStepIdx_ = 0;
|
timeStepIdx_ = 0;
|
||||||
startTime_ = 0.0;
|
startTime_ = 0.0;
|
||||||
time_ = 0.0;
|
time_ = 0.0;
|
||||||
endTime_ = EWOMS_GET_PARAM(TypeTag, Scalar, EndTime);
|
endTime_ = Parameters::get<TypeTag, Properties::EndTime>();
|
||||||
timeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize);
|
timeStepSize_ = Parameters::get<TypeTag, Properties::InitialTimeStepSize>();
|
||||||
assert(timeStepSize_ > 0);
|
assert(timeStepSize_ > 0);
|
||||||
const std::string& predetTimeStepFile =
|
const std::string& predetTimeStepFile =
|
||||||
EWOMS_GET_PARAM(TypeTag, std::string, PredeterminedTimeStepsFile);
|
Parameters::get<TypeTag, Properties::PredeterminedTimeStepsFile>();
|
||||||
if (!predetTimeStepFile.empty()) {
|
if (!predetTimeStepFile.empty()) {
|
||||||
std::ifstream is(predetTimeStepFile);
|
std::ifstream is(predetTimeStepFile);
|
||||||
while (!is.eof()) {
|
while (!is.eof()) {
|
||||||
@@ -649,7 +649,7 @@ public:
|
|||||||
TimerGuard writeTimerGuard(writeTimer_);
|
TimerGuard writeTimerGuard(writeTimer_);
|
||||||
|
|
||||||
setupTimer_.start();
|
setupTimer_.start();
|
||||||
Scalar restartTime = EWOMS_GET_PARAM(TypeTag, Scalar, RestartTime);
|
Scalar restartTime = Parameters::get<TypeTag, Properties::RestartTime>();
|
||||||
if (restartTime > -1e30) {
|
if (restartTime > -1e30) {
|
||||||
// try to restart a previous simulation
|
// try to restart a previous simulation
|
||||||
time_ = restartTime;
|
time_ = restartTime;
|
||||||
|
@@ -318,7 +318,7 @@ static inline int start(int argc, char **argv, bool registerParams=true)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// read the initial time step and the end time
|
// read the initial time step and the end time
|
||||||
Scalar endTime = EWOMS_GET_PARAM(TypeTag, Scalar, EndTime);
|
Scalar endTime = Parameters::get<TypeTag, Properties::EndTime>();
|
||||||
if (endTime < -1e50) {
|
if (endTime < -1e50) {
|
||||||
if (myRank == 0)
|
if (myRank == 0)
|
||||||
Parameters::printUsage<TypeTag>(argv[0],
|
Parameters::printUsage<TypeTag>(argv[0],
|
||||||
@@ -326,7 +326,7 @@ static inline int start(int argc, char **argv, bool registerParams=true)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Scalar initialTimeStepSize = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize);
|
Scalar initialTimeStepSize = Parameters::get<TypeTag, Properties::InitialTimeStepSize>();
|
||||||
if (initialTimeStepSize < -1e50) {
|
if (initialTimeStepSize < -1e50) {
|
||||||
if (myRank == 0)
|
if (myRank == 0)
|
||||||
Parameters::printUsage<TypeTag>(argv[0],
|
Parameters::printUsage<TypeTag>(argv[0],
|
||||||
@@ -354,7 +354,7 @@ static inline int start(int argc, char **argv, bool registerParams=true)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// print the parameters if requested
|
// print the parameters if requested
|
||||||
int printParams = EWOMS_GET_PARAM(TypeTag, int, PrintParameters);
|
int printParams = Parameters::get<TypeTag, Properties::PrintParameters>();
|
||||||
if (myRank == 0) {
|
if (myRank == 0) {
|
||||||
std::string endParametersSeparator("# [end of parameters]\n");
|
std::string endParametersSeparator("# [end of parameters]\n");
|
||||||
if (printParams) {
|
if (printParams) {
|
||||||
@@ -378,7 +378,7 @@ static inline int start(int argc, char **argv, bool registerParams=true)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// print the properties if requested
|
// print the properties if requested
|
||||||
int printProps = EWOMS_GET_PARAM(TypeTag, int, PrintProperties);
|
int printProps = Parameters::get<TypeTag, Properties::PrintProperties>();
|
||||||
if (printProps && myRank == 0) {
|
if (printProps && myRank == 0) {
|
||||||
if (printProps == 1 || !isatty(fileno(stdout)))
|
if (printProps == 1 || !isatty(fileno(stdout)))
|
||||||
Properties::printValues<TypeTag>(std::cout);
|
Properties::printValues<TypeTag>(std::cout);
|
||||||
|
@@ -80,8 +80,8 @@ namespace Linear {
|
|||||||
\
|
\
|
||||||
void prepare(IstlMatrix& matrix) \
|
void prepare(IstlMatrix& matrix) \
|
||||||
{ \
|
{ \
|
||||||
int order = EWOMS_GET_PARAM(TypeTag, int, PreconditionerOrder); \
|
int order = Parameters::get<TypeTag, Properties::PreconditionerOrder>(); \
|
||||||
Scalar relaxationFactor = EWOMS_GET_PARAM(TypeTag, Scalar, PreconditionerRelaxation); \
|
Scalar relaxationFactor = Parameters::get<TypeTag, Properties::PreconditionerRelaxation>(); \
|
||||||
seqPreCond_ = new SequentialPreconditioner(matrix, order, \
|
seqPreCond_ = new SequentialPreconditioner(matrix, order, \
|
||||||
relaxationFactor); \
|
relaxationFactor); \
|
||||||
} \
|
} \
|
||||||
@@ -122,7 +122,7 @@ namespace Linear {
|
|||||||
void prepare(OverlappingMatrix& matrix) \
|
void prepare(OverlappingMatrix& matrix) \
|
||||||
{ \
|
{ \
|
||||||
Scalar relaxationFactor = \
|
Scalar relaxationFactor = \
|
||||||
EWOMS_GET_PARAM(TypeTag, Scalar, PreconditionerRelaxation); \
|
Parameters::get<TypeTag, Properties::PreconditionerRelaxation>(); \
|
||||||
seqPreCond_ = new SequentialPreconditioner(matrix, \
|
seqPreCond_ = new SequentialPreconditioner(matrix, \
|
||||||
relaxationFactor); \
|
relaxationFactor); \
|
||||||
} \
|
} \
|
||||||
@@ -168,7 +168,7 @@ public:
|
|||||||
|
|
||||||
void prepare(OverlappingMatrix& matrix)
|
void prepare(OverlappingMatrix& matrix)
|
||||||
{
|
{
|
||||||
Scalar relaxationFactor = EWOMS_GET_PARAM(TypeTag, Scalar, PreconditionerRelaxation);
|
Scalar relaxationFactor = Parameters::get<TypeTag, Properties::PreconditionerRelaxation>();
|
||||||
|
|
||||||
// create the sequential preconditioner.
|
// create the sequential preconditioner.
|
||||||
seqPreCond_ = new SequentialPreconditioner(matrix, relaxationFactor);
|
seqPreCond_ = new SequentialPreconditioner(matrix, relaxationFactor);
|
||||||
|
@@ -77,13 +77,12 @@ namespace Opm::Linear {
|
|||||||
ScalarProduct& parScalarProduct, \
|
ScalarProduct& parScalarProduct, \
|
||||||
Preconditioner& parPreCond) \
|
Preconditioner& parPreCond) \
|
||||||
{ \
|
{ \
|
||||||
Scalar tolerance = EWOMS_GET_PARAM(TypeTag, Scalar, \
|
Scalar tolerance = Parameters::get<TypeTag, Properties::LinearSolverTolerance>(); \
|
||||||
LinearSolverTolerance); \
|
int maxIter = Parameters::get<TypeTag, Properties::LinearSolverMaxIterations>();\
|
||||||
int maxIter = EWOMS_GET_PARAM(TypeTag, int, LinearSolverMaxIterations);\
|
|
||||||
\
|
\
|
||||||
int verbosity = 0; \
|
int verbosity = 0; \
|
||||||
if (parOperator.overlap().myRank() == 0) \
|
if (parOperator.overlap().myRank() == 0) \
|
||||||
verbosity = EWOMS_GET_PARAM(TypeTag, int, LinearSolverVerbosity); \
|
verbosity = Parameters::get<TypeTag, Properties::LinearSolverVerbosity>(); \
|
||||||
solver_ = std::make_shared<RawSolver>(parOperator, parScalarProduct, \
|
solver_ = std::make_shared<RawSolver>(parOperator, parScalarProduct, \
|
||||||
parPreCond, tolerance, maxIter, \
|
parPreCond, tolerance, maxIter, \
|
||||||
verbosity); \
|
verbosity); \
|
||||||
@@ -133,13 +132,13 @@ public:
|
|||||||
ScalarProduct& parScalarProduct,
|
ScalarProduct& parScalarProduct,
|
||||||
Preconditioner& parPreCond)
|
Preconditioner& parPreCond)
|
||||||
{
|
{
|
||||||
Scalar tolerance = EWOMS_GET_PARAM(TypeTag, Scalar, LinearSolverTolerance);
|
Scalar tolerance = Parameters::get<TypeTag, Properties::LinearSolverTolerance>();
|
||||||
int maxIter = EWOMS_GET_PARAM(TypeTag, int, LinearSolverMaxIterations);
|
int maxIter = Parameters::get<TypeTag, Properties::LinearSolverMaxIterations>();
|
||||||
|
|
||||||
int verbosity = 0;
|
int verbosity = 0;
|
||||||
if (parOperator.overlap().myRank() == 0)
|
if (parOperator.overlap().myRank() == 0)
|
||||||
verbosity = EWOMS_GET_PARAM(TypeTag, int, LinearSolverVerbosity);
|
verbosity = Parameters::get<TypeTag, Properties::LinearSolverVerbosity>();
|
||||||
int restartAfter = EWOMS_GET_PARAM(TypeTag, int, GMResRestart);
|
int restartAfter = Parameters::get<TypeTag, Properties::GMResRestart>();
|
||||||
solver_ = std::make_shared<RawSolver>(parOperator,
|
solver_ = std::make_shared<RawSolver>(parOperator,
|
||||||
parScalarProduct,
|
parScalarProduct,
|
||||||
parPreCond,
|
parPreCond,
|
||||||
|
@@ -193,24 +193,24 @@ protected:
|
|||||||
const auto& gridView = this->simulator_.gridView();
|
const auto& gridView = this->simulator_.gridView();
|
||||||
using CCC = CombinedCriterion<OverlappingVector, decltype(gridView.comm())>;
|
using CCC = CombinedCriterion<OverlappingVector, decltype(gridView.comm())>;
|
||||||
|
|
||||||
Scalar linearSolverTolerance = EWOMS_GET_PARAM(TypeTag, Scalar, LinearSolverTolerance);
|
Scalar linearSolverTolerance = Parameters::get<TypeTag, Properties::LinearSolverTolerance>();
|
||||||
Scalar linearSolverAbsTolerance = EWOMS_GET_PARAM(TypeTag, Scalar, LinearSolverAbsTolerance);
|
Scalar linearSolverAbsTolerance = Parameters::get<TypeTag, Properties::LinearSolverAbsTolerance>();
|
||||||
if(linearSolverAbsTolerance < 0.0)
|
if(linearSolverAbsTolerance < 0.0)
|
||||||
linearSolverAbsTolerance = this->simulator_.model().newtonMethod().tolerance()/100.0;
|
linearSolverAbsTolerance = this->simulator_.model().newtonMethod().tolerance()/100.0;
|
||||||
|
|
||||||
convCrit_.reset(new CCC(gridView.comm(),
|
convCrit_.reset(new CCC(gridView.comm(),
|
||||||
/*residualReductionTolerance=*/linearSolverTolerance,
|
/*residualReductionTolerance=*/linearSolverTolerance,
|
||||||
/*absoluteResidualTolerance=*/linearSolverAbsTolerance,
|
/*absoluteResidualTolerance=*/linearSolverAbsTolerance,
|
||||||
EWOMS_GET_PARAM(TypeTag, Scalar, LinearSolverMaxError)));
|
Parameters::get<TypeTag, Properties::LinearSolverMaxError>()));
|
||||||
|
|
||||||
auto bicgstabSolver =
|
auto bicgstabSolver =
|
||||||
std::make_shared<RawLinearSolver>(parPreCond, *convCrit_, parScalarProduct);
|
std::make_shared<RawLinearSolver>(parPreCond, *convCrit_, parScalarProduct);
|
||||||
|
|
||||||
int verbosity = 0;
|
int verbosity = 0;
|
||||||
if (parOperator.overlap().myRank() == 0)
|
if (parOperator.overlap().myRank() == 0)
|
||||||
verbosity = EWOMS_GET_PARAM(TypeTag, int, LinearSolverVerbosity);
|
verbosity = Parameters::get<TypeTag, Properties::LinearSolverVerbosity>();
|
||||||
bicgstabSolver->setVerbosity(verbosity);
|
bicgstabSolver->setVerbosity(verbosity);
|
||||||
bicgstabSolver->setMaxIterations(EWOMS_GET_PARAM(TypeTag, int, LinearSolverMaxIterations));
|
bicgstabSolver->setMaxIterations(Parameters::get<TypeTag, Properties::LinearSolverMaxIterations>());
|
||||||
bicgstabSolver->setLinearOperator(&parOperator);
|
bicgstabSolver->setLinearOperator(&parOperator);
|
||||||
bicgstabSolver->setRhs(this->overlappingb_);
|
bicgstabSolver->setRhs(this->overlappingb_);
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ protected:
|
|||||||
|
|
||||||
int verbosity = 0;
|
int verbosity = 0;
|
||||||
if (this->simulator_.vanguard().gridView().comm().rank() == 0)
|
if (this->simulator_.vanguard().gridView().comm().rank() == 0)
|
||||||
verbosity = EWOMS_GET_PARAM(TypeTag, int, LinearSolverVerbosity);
|
verbosity = Parameters::get<TypeTag, Properties::LinearSolverVerbosity>();
|
||||||
|
|
||||||
using SmootherArgs = typename Dune::Amg::SmootherTraits<ParallelSmoother>::Arguments;
|
using SmootherArgs = typename Dune::Amg::SmootherTraits<ParallelSmoother>::Arguments;
|
||||||
|
|
||||||
@@ -289,7 +289,7 @@ protected:
|
|||||||
// Dune::Amg::FirstDiagonal>>
|
// Dune::Amg::FirstDiagonal>>
|
||||||
using CoarsenCriterion = Dune::Amg::
|
using CoarsenCriterion = Dune::Amg::
|
||||||
CoarsenCriterion<Dune::Amg::SymmetricCriterion<IstlMatrix, Dune::Amg::FrobeniusNorm> >;
|
CoarsenCriterion<Dune::Amg::SymmetricCriterion<IstlMatrix, Dune::Amg::FrobeniusNorm> >;
|
||||||
int coarsenTarget = EWOMS_GET_PARAM(TypeTag, int, AmgCoarsenTarget);
|
int coarsenTarget = Parameters::get<TypeTag, Properties::AmgCoarsenTarget>();
|
||||||
CoarsenCriterion coarsenCriterion(/*maxLevel=*/15, coarsenTarget);
|
CoarsenCriterion coarsenCriterion(/*maxLevel=*/15, coarsenTarget);
|
||||||
coarsenCriterion.setDefaultValuesAnisotropic(GridView::dimension,
|
coarsenCriterion.setDefaultValuesAnisotropic(GridView::dimension,
|
||||||
/*aggregateSizePerDim=*/3);
|
/*aggregateSizePerDim=*/3);
|
||||||
|
@@ -195,7 +195,7 @@ public:
|
|||||||
simulator_.model().dofMapper());
|
simulator_.model().dofMapper());
|
||||||
|
|
||||||
// create the overlapping Jacobian matrix
|
// create the overlapping Jacobian matrix
|
||||||
unsigned overlapSize = EWOMS_GET_PARAM(TypeTag, unsigned, LinearSolverOverlapSize);
|
unsigned overlapSize = Parameters::get<TypeTag, Properties::LinearSolverOverlapSize>();
|
||||||
overlappingMatrix_ = new OverlappingMatrix(M.istlMatrix(),
|
overlappingMatrix_ = new OverlappingMatrix(M.istlMatrix(),
|
||||||
borderListCreator.borderList(),
|
borderListCreator.borderList(),
|
||||||
borderListCreator.blackList(),
|
borderListCreator.blackList(),
|
||||||
|
@@ -136,24 +136,24 @@ protected:
|
|||||||
const auto& gridView = this->simulator_.gridView();
|
const auto& gridView = this->simulator_.gridView();
|
||||||
using CCC = CombinedCriterion<OverlappingVector, decltype(gridView.comm())>;
|
using CCC = CombinedCriterion<OverlappingVector, decltype(gridView.comm())>;
|
||||||
|
|
||||||
Scalar linearSolverTolerance = EWOMS_GET_PARAM(TypeTag, Scalar, LinearSolverTolerance);
|
Scalar linearSolverTolerance = Parameters::get<TypeTag, Properties::LinearSolverTolerance>();
|
||||||
Scalar linearSolverAbsTolerance = EWOMS_GET_PARAM(TypeTag, Scalar, LinearSolverAbsTolerance);
|
Scalar linearSolverAbsTolerance = Parameters::get<TypeTag, Properties::LinearSolverAbsTolerance>();
|
||||||
if(linearSolverAbsTolerance < 0.0)
|
if(linearSolverAbsTolerance < 0.0)
|
||||||
linearSolverAbsTolerance = this->simulator_.model().newtonMethod().tolerance() / 100.0;
|
linearSolverAbsTolerance = this->simulator_.model().newtonMethod().tolerance() / 100.0;
|
||||||
|
|
||||||
convCrit_.reset(new CCC(gridView.comm(),
|
convCrit_.reset(new CCC(gridView.comm(),
|
||||||
/*residualReductionTolerance=*/linearSolverTolerance,
|
/*residualReductionTolerance=*/linearSolverTolerance,
|
||||||
/*absoluteResidualTolerance=*/linearSolverAbsTolerance,
|
/*absoluteResidualTolerance=*/linearSolverAbsTolerance,
|
||||||
EWOMS_GET_PARAM(TypeTag, Scalar, LinearSolverMaxError)));
|
Parameters::get<TypeTag, Properties::LinearSolverMaxError>()));
|
||||||
|
|
||||||
auto bicgstabSolver =
|
auto bicgstabSolver =
|
||||||
std::make_shared<RawLinearSolver>(parPreCond, *convCrit_, parScalarProduct);
|
std::make_shared<RawLinearSolver>(parPreCond, *convCrit_, parScalarProduct);
|
||||||
|
|
||||||
int verbosity = 0;
|
int verbosity = 0;
|
||||||
if (parOperator.overlap().myRank() == 0)
|
if (parOperator.overlap().myRank() == 0)
|
||||||
verbosity = EWOMS_GET_PARAM(TypeTag, int, LinearSolverVerbosity);
|
verbosity = Parameters::get<TypeTag, Properties::LinearSolverVerbosity>();
|
||||||
bicgstabSolver->setVerbosity(verbosity);
|
bicgstabSolver->setVerbosity(verbosity);
|
||||||
bicgstabSolver->setMaxIterations(EWOMS_GET_PARAM(TypeTag, int, LinearSolverMaxIterations));
|
bicgstabSolver->setMaxIterations(Parameters::get<TypeTag, Properties::LinearSolverMaxIterations>());
|
||||||
bicgstabSolver->setLinearOperator(&parOperator);
|
bicgstabSolver->setLinearOperator(&parOperator);
|
||||||
bicgstabSolver->setRhs(this->overlappingb_);
|
bicgstabSolver->setRhs(this->overlappingb_);
|
||||||
|
|
||||||
|
@@ -69,8 +69,8 @@ public:
|
|||||||
|
|
||||||
static void registerParameters()
|
static void registerParameters()
|
||||||
{
|
{
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, int, LinearSolverVerbosity,
|
Parameters::registerParam<TypeTag, Properties::LinearSolverVerbosity>
|
||||||
"The verbosity level of the linear solver");
|
("The verbosity level of the linear solver");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -110,7 +110,7 @@ public:
|
|||||||
{
|
{
|
||||||
Vector bTmp(b);
|
Vector bTmp(b);
|
||||||
|
|
||||||
int verbosity = EWOMS_GET_PARAM(TypeTag, int, LinearSolverVerbosity);
|
int verbosity = Parameters::get<TypeTag, Properties::LinearSolverVerbosity>();
|
||||||
Dune::InverseOperatorResult result;
|
Dune::InverseOperatorResult result;
|
||||||
Dune::SuperLU<Matrix> solver(A, verbosity > 0);
|
Dune::SuperLU<Matrix> solver(A, verbosity > 0);
|
||||||
solver.apply(x, bTmp, result);
|
solver.apply(x, bTmp, result);
|
||||||
|
Reference in New Issue
Block a user