Merge pull request #890 from akva2/remove_ewoms_register_param_macro

Remove ewoms register param macro
This commit is contained in:
Bård Skaflestad 2024-04-05 12:42:27 +02:00 committed by GitHub
commit bdb93b6e62
44 changed files with 475 additions and 479 deletions

View File

@ -373,33 +373,24 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow, Parameters::registerParam<TypeTag, Properties::FluidSystemTemperatureLow>
"The lower temperature [K] for tabulation of the " ("The lower temperature [K] for tabulation of the fluid system");
"fluid system"); Parameters::registerParam<TypeTag, Properties::FluidSystemTemperatureHigh>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh, ("The upper temperature [K] for tabulation of the fluid system");
"The upper temperature [K] for tabulation of the " Parameters::registerParam<TypeTag, Properties::FluidSystemNumTemperature>
"fluid system"); ("The number of intervals between the lower and upper temperature");
EWOMS_REGISTER_PARAM(TypeTag, unsigned, FluidSystemNumTemperature, Parameters::registerParam<TypeTag, Properties::FluidSystemPressureLow>
"The number of intervals between the lower and " ("The lower pressure [Pa] for tabulation of the fluid system");
"upper temperature"); Parameters::registerParam<TypeTag, Properties::FluidSystemPressureHigh>
("The upper pressure [Pa] for tabulation of the fluid system");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemPressureLow, Parameters::registerParam<TypeTag, Properties::FluidSystemNumPressure>
"The lower pressure [Pa] for tabulation of the " ("The number of intervals between the lower and upper pressure");
"fluid system"); Parameters::registerParam<TypeTag, Properties::Temperature>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemPressureHigh, ("The temperature [K] in the reservoir");
"The upper pressure [Pa] for tabulation of the " Parameters::registerParam<TypeTag, Properties::MaxDepth>
"fluid system"); ("The maximum depth [m] of the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, unsigned, FluidSystemNumPressure, Parameters::registerParam<TypeTag, Properties::SimulationName>
"The number of intervals between the lower and " ("The name of the simulation used for the output files");
"upper pressure");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature,
"The temperature [K] in the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxDepth,
"The maximum depth [m] of the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, std::string, SimulationName,
"The name of the simulation used for the output "
"files");
} }
/*! /*!

View File

@ -406,17 +406,14 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature, Parameters::registerParam<TypeTag, Properties::Temperature>
"The temperature [K] in the reservoir"); ("The temperature [K] in the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Initialpressure, Parameters::registerParam<TypeTag, Properties::Initialpressure>
"The initial pressure [Pa s] in the reservoir"); ("The initial pressure [Pa s] in the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, Parameters::registerParam<TypeTag, Properties::SimulationName>
std::string, ("The name of the simulation used for the output files");
SimulationName, Parameters::registerParam<TypeTag, Properties::EpisodeLength>
"The name of the simulation used for the output " ("Time interval [s] for episode length");
"files");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, EpisodeLength,
"Time interval [s] for episode length");
} }
/*! /*!

View File

@ -305,9 +305,8 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, InitialWaterSaturation, Parameters::registerParam<TypeTag, Properties::InitialWaterSaturation>
"The initial saturation in the domain [] of the " ("The initial saturation in the domain [] of the wetting phase");
"wetting phase");
} }
/*! /*!

View File

@ -263,36 +263,29 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftX, Parameters::registerParam<TypeTag, Properties::LensLowerLeftX>
"The x-coordinate of the lens' lower-left corner " ("The x-coordinate of the lens' lower-left corner [m].");
"[m]."); Parameters::registerParam<TypeTag, Properties::LensUpperRightX>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightX, ("The x-coordinate of the lens' upper-right corner [m].");
"The x-coordinate of the lens' upper-right corner "
"[m].");
if (dimWorld > 1) { if (dimWorld > 1) {
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftY, Parameters::registerParam<TypeTag, Properties::LensLowerLeftY>
"The y-coordinate of the lens' lower-left " ("The y-coordinate of the lens' lower-left corner [m].");
"corner [m]."); Parameters::registerParam<TypeTag, Properties::LensUpperRightY>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightY, ("The y-coordinate of the lens' upper-right corner [m].");
"The y-coordinate of the lens' upper-right "
"corner [m].");
} }
if (dimWorld > 2) { if (dimWorld > 2) {
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftZ, Parameters::registerParam<TypeTag, Properties::LensLowerLeftZ>
"The z-coordinate of the lens' lower-left " ("The z-coordinate of the lens' lower-left corner [m].");
"corner [m]."); Parameters::registerParam<TypeTag, Properties::LensUpperRightZ>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightZ, ("The z-coordinate of the lens' upper-right corner [m].");
"The z-coordinate of the lens' upper-right "
"corner [m].");
} }
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Permeability, Parameters::registerParam<TypeTag, Properties::Permeability>
"The intrinsic permeability [m^2] of the ambient " ("The intrinsic permeability [m^2] of the ambient material.");
"material."); Parameters::registerParam<TypeTag, Properties::PermeabilityLens>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, PermeabilityLens, ("The intrinsic permeability [m^2] of the lens.");
"The intrinsic permeability [m^2] of the lens.");
} }
/*! /*!

View File

@ -362,26 +362,20 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftX, Parameters::registerParam<TypeTag, Properties::LensLowerLeftX>
"The x-coordinate of the lens' lower-left corner " ("The x-coordinate of the lens' lower-left corner [m].");
"[m]."); Parameters::registerParam<TypeTag, Properties::LensLowerLeftY>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftY, ("The y-coordinate of the lens' lower-left corner [m].");
"The y-coordinate of the lens' lower-left corner " Parameters::registerParam<TypeTag, Properties::LensUpperRightX>
"[m]."); ("The x-coordinate of the lens' upper-right corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightX, Parameters::registerParam<TypeTag, Properties::LensUpperRightY>
"The x-coordinate of the lens' upper-right corner " ("The y-coordinate of the lens' upper-right corner [m].");
"[m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightY,
"The y-coordinate of the lens' upper-right corner "
"[m].");
if (dimWorld == 3) { if (dimWorld == 3) {
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftZ, Parameters::registerParam<TypeTag, Properties::LensLowerLeftZ>
"The z-coordinate of the lens' lower-left " ("The z-coordinate of the lens' lower-left corner [m].");
"corner [m]."); Parameters::registerParam<TypeTag, Properties::LensUpperRightZ>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightZ, ("The z-coordinate of the lens' upper-right corner [m].");
"The z-coordinate of the lens' upper-right "
"corner [m].");
} }
} }

View File

@ -426,13 +426,13 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature, Parameters::registerParam<TypeTag, Properties::Temperature>
"The temperature [K] in the reservoir"); ("The temperature [K] in the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxDepth, Parameters::registerParam<TypeTag, Properties::MaxDepth>
"The maximum depth [m] of the reservoir"); ("The maximum depth [m] of the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, WellWidth, Parameters::registerParam<TypeTag, Properties::WellWidth>
"The width of producer/injector wells as a fraction of the width" ("The width of producer/injector wells as a fraction of the width"
" of the spatial domain"); " of the spatial domain");
} }
/*! /*!

View File

@ -186,18 +186,29 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DpMaxRel, "Maximum relative change of pressure in a single iteration"); Parameters::registerParam<TypeTag, Properties::DpMaxRel>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DsMax, "Maximum absolute change of any saturation in a single iteration"); ("Maximum relative change of pressure in a single iteration");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, PriVarOscilationThreshold, Parameters::registerParam<TypeTag, Properties::DsMax>
"The threshold value for the primary variable switching conditions after its meaning has switched to hinder oscilations"); ("Maximum absolute change of any saturation in a single iteration");
EWOMS_REGISTER_PARAM(TypeTag,bool, ProjectSaturations, "Option for doing saturation projection"); Parameters::registerParam<TypeTag, Properties::PriVarOscilationThreshold>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxTemperatureChange, "Maximum absolute change of temperature in a single iteration"); ("The threshold value for the primary variable switching conditions "
EWOMS_REGISTER_PARAM(TypeTag, Scalar, TemperatureMax, "Maximum absolute temperature"); "after its meaning has switched to hinder oscilations");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, TemperatureMin, "Minimum absolute temperature"); Parameters::registerParam<TypeTag, Properties::ProjectSaturations>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, PressureMax, "Maximum absolute pressure"); ("Option for doing saturation projection");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, PressureMin, "Minimum absolute pressure"); Parameters::registerParam<TypeTag, Properties::MaxTemperatureChange>
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaximumWaterSaturation, "Maximum water saturation"); ("Maximum absolute change of temperature in a single iteration");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, WaterOnlyThreshold, "Cells with water saturation above or equal is considered one-phase water only"); Parameters::registerParam<TypeTag, Properties::TemperatureMax>
("Maximum absolute temperature");
Parameters::registerParam<TypeTag, Properties::TemperatureMin>
("Minimum absolute temperature");
Parameters::registerParam<TypeTag, Properties::PressureMax>
("Maximum absolute pressure");
Parameters::registerParam<TypeTag, Properties::PressureMin>
("Minimum absolute pressure");
Parameters::registerParam<TypeTag, Properties::MaximumWaterSaturation>
("Maximum water saturation");
Parameters::registerParam<TypeTag, Properties::WaterOnlyThreshold>
("Cells with water saturation above or equal is considered one-phase water only");
} }
/*! /*!

View File

@ -217,7 +217,8 @@ public:
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, double, PressureScale, "Scaling of pressure primary variable"); Parameters::registerParam<TypeTag, Properties::PressureScale>
("Scaling of pressure primary variable");
} }
void setPressureScale(Scalar val) void setPressureScale(Scalar val)

View File

@ -90,8 +90,8 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableGravity, Parameters::registerParam<TypeTag, Properties::EnableGravity>
"Use the gravity correction for the pressure gradients."); ("Use the gravity correction for the pressure gradients.");
} }
/*! /*!

View File

@ -510,12 +510,18 @@ public:
// register runtime parameters of the output modules // register runtime parameters of the output modules
VtkPrimaryVarsModule<TypeTag>::registerParameters(); VtkPrimaryVarsModule<TypeTag>::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableGridAdaptation, "Enable adaptive grid refinement/coarsening"); Parameters::registerParam<TypeTag, Properties::EnableGridAdaptation>
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableVtkOutput, "Global switch for turning on writing VTK files"); ("Enable adaptive grid refinement/coarsening");
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableThermodynamicHints, "Enable thermodynamic hints"); Parameters::registerParam<TypeTag, Properties::EnableVtkOutput>
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableIntensiveQuantityCache, "Turn on caching of intensive quantities"); ("Global switch for turning on writing VTK files");
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableStorageCache, "Store previous storage terms and avoid re-calculating them."); Parameters::registerParam<TypeTag, Properties::EnableThermodynamicHints>
EWOMS_REGISTER_PARAM(TypeTag, std::string, OutputDir, "The directory to which result files are written"); ("Enable thermodynamic hints");
Parameters::registerParam<TypeTag, Properties::EnableIntensiveQuantityCache>
("Turn on caching of intensive quantities");
Parameters::registerParam<TypeTag, Properties::EnableStorageCache>
("Store previous storage terms and avoid re-calculating them.");
Parameters::registerParam<TypeTag, Properties::OutputDir>
("The directory to which result files are written");
} }
/*! /*!

View File

@ -182,9 +182,9 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, int, NumericDifferenceMethod, Parameters::registerParam<TypeTag, Properties::NumericDifferenceMethod>
"The method used for numeric differentiation (-1: backward " ("The method used for numeric differentiation (-1: backward "
"differences, 0: central differences, 1: forward differences)"); "differences, 0: central differences, 1: forward differences)");
} }
/*! /*!

View File

@ -168,19 +168,19 @@ public:
static void registerParameters() static void registerParameters()
{ {
Model::registerParameters(); Model::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxTimeStepSize, Parameters::registerParam<TypeTag, Properties::MaxTimeStepSize>
"The maximum size to which all time steps are limited to [s]"); ("The maximum size to which all time steps are limited to [s]");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MinTimeStepSize, Parameters::registerParam<TypeTag, Properties::MinTimeStepSize>
"The minimum size to which all time steps are limited to [s]"); ("The minimum size to which all time steps are limited to [s]");
EWOMS_REGISTER_PARAM(TypeTag, unsigned, MaxTimeStepDivisions, Parameters::registerParam<TypeTag, Properties::MaxTimeStepDivisions>
"The maximum number of divisions by two of the timestep size " ("The maximum number of divisions by two of the timestep size "
"before the simulation bails out"); "before the simulation bails out");
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableAsyncVtkOutput, Parameters::registerParam<TypeTag, Properties::EnableAsyncVtkOutput>
"Dispatch a separate thread to write the VTK output"); ("Dispatch a separate thread to write the VTK output");
EWOMS_REGISTER_PARAM(TypeTag, bool, ContinueOnConvergenceError, Parameters::registerParam<TypeTag, Properties::ContinueOnConvergenceError>
"Continue with a non-converged solution instead of giving up " ("Continue with a non-converged solution instead of giving up "
"if we encounter a time step size smaller than the minimum time " "if we encounter a time step size smaller than the minimum time "
"step size."); "step size.");
} }
/*! /*!

View File

@ -134,8 +134,8 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, SeparateSparseSourceTerms, Parameters::registerParam<TypeTag, Properties::SeparateSparseSourceTerms>
"Treat well source terms all in one go, instead of on a cell by cell basis."); ("Treat well source terms all in one go, instead of on a cell by cell basis.");
} }
/*! /*!

View File

@ -234,9 +234,9 @@ public:
if (enableEnergy) if (enableEnergy)
Opm::VtkEnergyModule<TypeTag>::registerParameters(); Opm::VtkEnergyModule<TypeTag>::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FlashTolerance, Parameters::registerParam<TypeTag, Properties::FlashTolerance>
"The maximum tolerance for the flash solver to " ("The maximum tolerance for the flash solver to "
"consider the solution converged"); "consider the solution converged");
} }
/*! /*!

View File

@ -66,24 +66,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");
} }
} }

View File

@ -62,11 +62,11 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, std::string, GridFile, Parameters::registerParam<TypeTag,Properties::GridFile>
"The file name of the DGF file to load"); ("The file name of the DGF file to load");
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");
} }
/*! /*!

View File

@ -106,24 +106,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 (dim > 1) { if (dim > 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 (dim > 2) { if (dim > 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");
} }
} }

View File

@ -112,18 +112,16 @@ public:
if (!enableEnergy) if (!enableEnergy)
return; return;
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteRockInternalEnergy, Parameters::registerParam<TypeTag, Properties::VtkWriteRockInternalEnergy>
"Include the volumetric internal energy of rock " ("Include the volumetric internal energy of rock "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteTotalThermalConductivity, Parameters::registerParam<TypeTag, Properties::VtkWriteTotalThermalConductivity>
"Include the total thermal conductivity of the medium and the fluids " ("Include the total thermal conductivity of the medium and the fluids "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFluidInternalEnergies, Parameters::registerParam<TypeTag, Properties::VtkWriteFluidInternalEnergies>
"Include the internal energies of the fluids " ("Include the internal energies of the fluids in the VTK output files");
"in the VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteFluidEnthalpies>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFluidEnthalpies, ("Include the enthalpies of the fluids in the VTK output files");
"Include the enthalpies of the fluids "
"in the VTK output files");
} }
/*! /*!

View File

@ -113,21 +113,19 @@ public:
if (!enableMICP) if (!enableMICP)
return; return;
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteMicrobialConcentration, Parameters::registerParam<TypeTag, Properties::VtkWriteMicrobialConcentration>
"Include the concentration of the microbial component in the water phase " ("Include the concentration of the microbial component in the water phase "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteOxygenConcentration, Parameters::registerParam<TypeTag, Properties::VtkWriteOxygenConcentration>
"Include the concentration of the oxygen component in the water phase " ("Include the concentration of the oxygen component in the water phase "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteUreaConcentration, Parameters::registerParam<TypeTag, Properties::VtkWriteUreaConcentration>
"Include the concentration of the urea component in the water phase " ("Include the concentration of the urea component in the water phase "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteBiofilmConcentration, Parameters::registerParam<TypeTag, Properties::VtkWriteBiofilmConcentration>
"Include the biofilm volume fraction " ("Include the biofilm volume fraction in the VTK output files");
"in the VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteCalciteConcentration>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteCalciteConcentration, ("Include the calcite volume fraction in the VTK output files");
"Include the calcite volume fraction "
"in the VTK output files");
} }
/*! /*!

View File

@ -141,39 +141,38 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteGasDissolutionFactor, Parameters::registerParam<TypeTag, Properties::VtkWriteGasDissolutionFactor>
"Include the gas dissolution factor (R_s) of the observed oil " ("Include the gas dissolution factor (R_s) of the observed oil "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteOilVaporizationFactor, Parameters::registerParam<TypeTag, Properties::VtkWriteOilVaporizationFactor>
"Include the oil vaporization factor (R_v) of the observed gas " ("Include the oil vaporization factor (R_v) of the observed gas "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteOilFormationVolumeFactor, Parameters::registerParam<TypeTag, Properties::VtkWriteOilFormationVolumeFactor>
"Include the oil formation volume factor (B_o) in the " ("Include the oil formation volume factor (B_o) in the VTK output files");
"VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteGasFormationVolumeFactor>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteGasFormationVolumeFactor, ("Include the gas formation volume factor (B_g) in the "
"Include the gas formation volume factor (B_g) in the " "VTK output files");
"VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteWaterFormationVolumeFactor>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteWaterFormationVolumeFactor, ("Include the water formation volume factor (B_w) in the "
"Include the water formation volume factor (B_w) in the " "VTK output files");
"VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteOilSaturationPressure>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteOilSaturationPressure, ("Include the saturation pressure of oil (p_o,sat) in the "
"Include the saturation pressure of oil (p_o,sat) in the " "VTK output files");
"VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteGasSaturationPressure>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteGasSaturationPressure, ("Include the saturation pressure of gas (p_g,sat) in the "
"Include the saturation pressure of gas (p_g,sat) in the " "VTK output files");
"VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteSaturatedOilGasDissolutionFactor>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSaturatedOilGasDissolutionFactor, ("Include the gas dissolution factor (R_s,sat) of gas saturated "
"Include the gas dissolution factor (R_s,sat) of gas saturated " "oil in the VTK output files");
"oil in the VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteSaturatedGasOilVaporizationFactor>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSaturatedGasOilVaporizationFactor, ("Include the oil vaporization factor (R_v,sat) of oil saturated "
"Include the oil vaporization factor (R_v,sat) of oil saturated " "gas in the VTK output files");
"gas in the VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteSaturationRatios>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSaturationRatios, ("Write the ratio of the actually and maximum dissolved component of "
"Write the ratio of the actually and maximum dissolved component of " "the mixtures");
"the mixtures"); Parameters::registerParam<TypeTag, Properties::VtkWritePrimaryVarsMeaning>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePrimaryVarsMeaning, ("Include how the primary variables should be interpreted to the "
"Include how the primary variables should be interpreted to the " "VTK output files");
"VTK output files");
} }
/*! /*!

View File

@ -117,24 +117,24 @@ public:
if (!enablePolymer) if (!enablePolymer)
return; return;
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePolymerConcentration, Parameters::registerParam<TypeTag, Properties::VtkWritePolymerConcentration>
"Include the concentration of the polymer component in the water phase " ("Include the concentration of the polymer component in the water phase "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePolymerDeadPoreVolume, Parameters::registerParam<TypeTag, Properties::VtkWritePolymerDeadPoreVolume>
"Include the fraction of the \"dead\" pore volume " ("Include the fraction of the \"dead\" pore volume "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePolymerRockDensity, Parameters::registerParam<TypeTag, Properties::VtkWritePolymerRockDensity>
"Include the amount of already adsorbed polymer component" ("Include the amount of already adsorbed polymer component"
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePolymerAdsorption, Parameters::registerParam<TypeTag, Properties::VtkWritePolymerAdsorption>
"Include the adsorption rate of the polymer component" ("Include the adsorption rate of the polymer component"
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePolymerViscosityCorrection, Parameters::registerParam<TypeTag, Properties::VtkWritePolymerViscosityCorrection>
"Include the viscosity correction of the polymer component " ("Include the viscosity correction of the polymer component "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteWaterViscosityCorrection, Parameters::registerParam<TypeTag, Properties::VtkWriteWaterViscosityCorrection>
"Include the viscosity correction of the water component " ("Include the viscosity correction of the water component "
"due to polymers in the VTK output files"); "due to polymers in the VTK output files");
} }
/*! /*!

View File

@ -113,21 +113,21 @@ public:
if (!enableSolvent) if (!enableSolvent)
return; return;
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSolventSaturation, Parameters::registerParam<TypeTag, Properties::VtkWriteSolventSaturation>
"Include the \"saturation\" of the solvent component " ("Include the \"saturation\" of the solvent component "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSolventRsw, Parameters::registerParam<TypeTag, Properties::VtkWriteSolventRsw>
"Include the \"dissolved volume in water\" of the solvent component " ("Include the \"dissolved volume in water\" of the solvent component "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSolventDensity, Parameters::registerParam<TypeTag, Properties::VtkWriteSolventDensity>
"Include the \"density\" of the solvent component " ("Include the \"density\" of the solvent component "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSolventViscosity, Parameters::registerParam<TypeTag, Properties::VtkWriteSolventViscosity>
"Include the \"viscosity\" of the solvent component " ("Include the \"viscosity\" of the solvent component "
"in the VTK output files"); "in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSolventMobility, Parameters::registerParam<TypeTag, Properties::VtkWriteSolventMobility>
"Include the \"mobility\" of the solvent component " ("Include the \"mobility\" of the solvent component "
"in the VTK output files"); "in the VTK output files");
} }
/*! /*!

View File

@ -123,20 +123,20 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteMassFractions, Parameters::registerParam<TypeTag, Properties::VtkWriteMassFractions>
"Include mass fractions in the VTK output files"); ("Include mass fractions in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteMoleFractions, Parameters::registerParam<TypeTag, Properties::VtkWriteMoleFractions>
"Include mole fractions in the VTK output files"); ("Include mole fractions in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteTotalMassFractions, Parameters::registerParam<TypeTag, Properties::VtkWriteTotalMassFractions>
"Include total mass fractions in the VTK output files"); ("Include total mass fractions in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteTotalMoleFractions, Parameters::registerParam<TypeTag, Properties::VtkWriteTotalMoleFractions>
"Include total mole fractions in the VTK output files"); ("Include total mole fractions in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteMolarities, Parameters::registerParam<TypeTag, Properties::VtkWriteMolarities>
"Include component molarities in the VTK output files"); ("Include component molarities in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFugacities, Parameters::registerParam<TypeTag, Properties::VtkWriteFugacities>
"Include component fugacities in the VTK output files"); ("Include component fugacities in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFugacityCoeffs, Parameters::registerParam<TypeTag, Properties::VtkWriteFugacityCoeffs>
"Include component fugacity coefficients in the VTK output files"); ("Include component fugacity coefficients in the VTK output files");
} }
/*! /*!

View File

@ -108,16 +108,14 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteTortuosities, Parameters::registerParam<TypeTag, Properties::VtkWriteTortuosities>
"Include the tortuosity for each phase in the VTK " ("Include the tortuosity for each phase in the VTK output files");
"output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteDiffusionCoefficients>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteDiffusionCoefficients, ("Include the molecular diffusion coefficients in "
"Include the molecular diffusion coefficients in " "the VTK output files");
"the VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteEffectiveDiffusionCoefficients>
EWOMS_REGISTER_PARAM(TypeTag, bool, ("Include the effective molecular diffusion "
VtkWriteEffectiveDiffusionCoefficients, "coefficients the medium in the VTK output files");
"Include the effective molecular diffusion "
"coefficients the medium in the VTK output files");
} }
/*! /*!

View File

@ -133,23 +133,22 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFractureSaturations, Parameters::registerParam<TypeTag, Properties::VtkWriteFractureSaturations>
"Include the phase saturations in the VTK output files"); ("Include the phase saturations in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFractureMobilities, Parameters::registerParam<TypeTag, Properties::VtkWriteFractureMobilities>
"Include the phase mobilities in the VTK output files"); ("Include the phase mobilities in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFractureRelativePermeabilities, Parameters::registerParam<TypeTag, Properties::VtkWriteFractureRelativePermeabilities>
"Include the phase relative permeabilities in the " ("Include the phase relative permeabilities in the "
"VTK output files"); "VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFracturePorosity, Parameters::registerParam<TypeTag, Properties::VtkWriteFracturePorosity>
"Include the porosity in the VTK output files"); ("Include the porosity in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFractureIntrinsicPermeabilities, Parameters::registerParam<TypeTag, Properties::VtkWriteFractureIntrinsicPermeabilities>
"Include the intrinsic permeability in the VTK output files"); ("Include the intrinsic permeability in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFractureFilterVelocities, Parameters::registerParam<TypeTag, Properties::VtkWriteFractureFilterVelocities>
"Include in the filter velocities of the phases " ("Include in the filter velocities of the phases in the VTK output files");
"the VTK output files"); Parameters::registerParam<TypeTag, Properties::VtkWriteFractureVolumeFraction>
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFractureVolumeFraction, ("Add the fraction of the total volume which is "
"Add the fraction of the total volume which is " "occupied by fractures in the VTK output");
"occupied by fractures in the VTK output");
} }
/*! /*!

View File

@ -111,18 +111,18 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSolidInternalEnergy, Parameters::registerParam<TypeTag, Properties::VtkWriteSolidInternalEnergy>
"Include the volumetric internal energy of solid" ("Include the volumetric internal energy of solid"
"matrix in the VTK output files"); "matrix in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteThermalConductivity, Parameters::registerParam<TypeTag, Properties::VtkWriteThermalConductivity>
"Include the total thermal conductivity of the" ("Include the total thermal conductivity of the"
"medium in the VTK output files"); "medium in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteEnthalpies, Parameters::registerParam<TypeTag, Properties::VtkWriteEnthalpies>
"Include the specific enthalpy of the phases in " ("Include the specific enthalpy of the phases in "
"the VTK output files"); "the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteInternalEnergies, Parameters::registerParam<TypeTag, Properties::VtkWriteInternalEnergies>
"Include the specific internal energy of the " ("Include the specific internal energy of the "
"phases in the VTK output files"); "phases in the VTK output files");
} }
/*! /*!

View File

@ -162,30 +162,30 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteExtrusionFactor, Parameters::registerParam<TypeTag, Properties::VtkWriteExtrusionFactor>
"Include the extrusion factor of the degrees of freedom into the VTK output files"); ("Include the extrusion factor of the degrees of freedom into the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePressures, Parameters::registerParam<TypeTag, Properties::VtkWritePressures>
"Include the phase pressures in the VTK output files"); ("Include the phase pressures in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteDensities, Parameters::registerParam<TypeTag, Properties::VtkWriteDensities>
"Include the phase densities in the VTK output files"); ("Include the phase densities in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteSaturations, Parameters::registerParam<TypeTag, Properties::VtkWriteSaturations>
"Include the phase saturations in the VTK output files"); ("Include the phase saturations in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteMobilities, Parameters::registerParam<TypeTag, Properties::VtkWriteMobilities>
"Include the phase mobilities in the VTK output files"); ("Include the phase mobilities in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteRelativePermeabilities, Parameters::registerParam<TypeTag, Properties::VtkWriteRelativePermeabilities>
"Include the phase relative permeabilities in the VTK output files"); ("Include the phase relative permeabilities in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteViscosities, Parameters::registerParam<TypeTag, Properties::VtkWriteViscosities>
"Include component phase viscosities in the VTK output files"); ("Include component phase viscosities in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteAverageMolarMasses, Parameters::registerParam<TypeTag, Properties::VtkWriteAverageMolarMasses>
"Include the average phase mass in the VTK output files"); ("Include the average phase mass in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePorosity, Parameters::registerParam<TypeTag, Properties::VtkWritePorosity>
"Include the porosity in the VTK output files"); ("Include the porosity in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteIntrinsicPermeabilities, Parameters::registerParam<TypeTag, Properties::VtkWriteIntrinsicPermeabilities>
"Include the intrinsic permeability in the VTK output files"); ("Include the intrinsic permeability in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteFilterVelocities, Parameters::registerParam<TypeTag, Properties::VtkWriteFilterVelocities>
"Include in the filter velocities of the phases the VTK output files"); ("Include in the filter velocities of the phases the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePotentialGradients, Parameters::registerParam<TypeTag, Properties::VtkWritePotentialGradients>
"Include the phase pressure potential gradients in the VTK output files"); ("Include the phase pressure potential gradients in the VTK output files");
} }
/*! /*!

View File

@ -83,9 +83,9 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePhasePresence, Parameters::registerParam<TypeTag, Properties::VtkWritePhasePresence>
"Include the phase presence pseudo primary " ("Include the phase presence pseudo primary "
"variable in the VTK output files"); "variable in the VTK output files");
} }
/*! /*!

View File

@ -93,12 +93,12 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWritePrimaryVars, Parameters::registerParam<TypeTag, Properties::VtkWritePrimaryVars>
"Include the primary variables into the VTK output files"); ("Include the primary variables into the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteProcessRank, Parameters::registerParam<TypeTag, Properties::VtkWriteProcessRank>
"Include the MPI process rank into the VTK output files"); ("Include the MPI process rank into the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteDofIndex, Parameters::registerParam<TypeTag, Properties::VtkWriteDofIndex>
"Include the index of the degrees of freedom into the VTK output files"); ("Include the index of the degrees of freedom into the VTK output files");
} }
/*! /*!

View File

@ -99,10 +99,10 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteLiquidMoleFractions, Parameters::registerParam<TypeTag, Properties::VtkWriteLiquidMoleFractions>
"Include liquid mole fractions (L) in the VTK output files"); ("Include liquid mole fractions (L) in the VTK output files");
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteEquilibriumConstants, Parameters::registerParam<TypeTag, Properties::VtkWriteEquilibriumConstants>
"Include equilibrium constants (K) in the VTK output files"); ("Include equilibrium constants (K) in the VTK output files");
} }
/*! /*!

View File

@ -88,8 +88,8 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, bool, VtkWriteTemperature, Parameters::registerParam<TypeTag, Properties::VtkWriteTemperature>
"Include the temperature in the VTK output files"); ("Include the temperature in the VTK output files");
} }
/*! /*!

View File

@ -151,25 +151,22 @@ public:
{ {
LinearSolverBackend::registerParameters(); LinearSolverBackend::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, bool, NewtonVerbose, Parameters::registerParam<TypeTag, Properties::NewtonVerbose>
"Specify whether the Newton method should inform " ("Specify whether the Newton method should inform "
"the user about its progress or not"); "the user about its progress or not");
EWOMS_REGISTER_PARAM(TypeTag, bool, NewtonWriteConvergence, Parameters::registerParam<TypeTag, Properties::NewtonWriteConvergence>
"Write the convergence behaviour of the Newton " ("Write the convergence behaviour of the Newton "
"method to a VTK file"); "method to a VTK file");
EWOMS_REGISTER_PARAM(TypeTag, int, NewtonTargetIterations, Parameters::registerParam<TypeTag, Properties::NewtonTargetIterations>
"The 'optimum' number of Newton iterations per " ("The 'optimum' number of Newton iterations per time step");
"time step"); Parameters::registerParam<TypeTag, Properties::NewtonMaxIterations>
EWOMS_REGISTER_PARAM(TypeTag, int, NewtonMaxIterations, ("The maximum number of Newton iterations per time step");
"The maximum number of Newton iterations per time " Parameters::registerParam<TypeTag, Properties::NewtonTolerance>
"step"); ("The maximum raw error tolerated by the Newton"
EWOMS_REGISTER_PARAM(TypeTag, Scalar, NewtonTolerance, "method for considering a solution to be converged");
"The maximum raw error tolerated by the Newton" Parameters::registerParam<TypeTag, Properties::NewtonMaxError>
"method for considering a solution to be " ("The maximum error tolerated by the Newton "
"converged"); "method to which does not cause an abort");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, NewtonMaxError,
"The maximum error tolerated by the Newton "
"method to which does not cause an abort");
} }
/*! /*!

View File

@ -31,6 +31,7 @@
#include <omp.h> #include <omp.h>
#endif #endif
#include <opm/models/discretization/common/fvbaseproperties.hh>
#include <opm/models/utils/parametersystem.hh> #include <opm/models/utils/parametersystem.hh>
#include <opm/models/utils/propertysystem.hh> #include <opm/models/utils/propertysystem.hh>
@ -59,9 +60,9 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, int, ThreadsPerProcess, Parameters::registerParam<TypeTag, Properties::ThreadsPerProcess>
"The maximum number of threads to be instantiated per process " ("The maximum number of threads to be instantiated per process "
"('-1' means 'automatic')"); "('-1' means 'automatic')");
} }
/*! /*!

View File

@ -233,14 +233,14 @@ public:
if (enableEnergy) if (enableEnergy)
Opm::VtkEnergyModule<TypeTag>::registerParameters(); Opm::VtkEnergyModule<TypeTag>::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FlashTolerance, Parameters::registerParam<TypeTag, Properties::FlashTolerance>
"The maximum tolerance for the flash solver to " ("The maximum tolerance for the flash solver to "
"consider the solution converged"); "consider the solution converged");
EWOMS_REGISTER_PARAM(TypeTag, int, FlashVerbosity, Parameters::registerParam<TypeTag, Properties::FlashVerbosity>
"Flash solver verbosity level"); ("Flash solver verbosity level");
EWOMS_REGISTER_PARAM(TypeTag, std::string, FlashTwoPhaseMethod, Parameters::registerParam<TypeTag, Properties::FlashTwoPhaseMethod>
"Method for solving vapor-liquid composition. Available options include:" ("Method for solving vapor-liquid composition. Available options include: "
"ssi, newton, ssi+newton"); "ssi, newton, ssi+newton");
} }
/*! /*!

View File

@ -296,9 +296,9 @@ public:
if (enableEnergy) if (enableEnergy)
Opm::VtkEnergyModule<TypeTag>::registerParameters(); Opm::VtkEnergyModule<TypeTag>::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, int, PvsVerbosity, Parameters::registerParam<TypeTag, Properties::PvsVerbosity>
"The verbosity level of the primary variable " ("The verbosity level of the primary variable "
"switching model"); "switching model");
} }
/*! /*!

View File

@ -41,39 +41,20 @@
#include <dune/common/classname.hh> #include <dune/common/classname.hh>
#include <dune/common/parametertree.hh> #include <dune/common/parametertree.hh>
#include <fstream>
#include <iostream>
#include <list>
#include <map> #include <map>
#include <set> #include <set>
#include <list>
#include <sstream> #include <sstream>
#include <stdexcept>
#include <string> #include <string>
#include <iostream> #include <type_traits>
#include <fstream>
#include <unordered_map> #include <unordered_map>
#include <unistd.h> #include <unistd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
/*!
* \ingroup Parameter
*
* \brief Register a run-time parameter.
*
* In OPM, parameters can only be used after they have been
* registered.
*
* Example:
*
* \code
* // Registers a run-time parameter "UpwindWeight" which has type
* // "Scalar" and the description "Relative weight of the upwind node."
* EWOMS_REGISTER_PARAM(TypeTag, Scalar, UpwindWeight,
* "Relative weight of the upwind node.");
* \endcode
*/
#define EWOMS_REGISTER_PARAM(TypeTag, ParamType, ParamName, Description) \
::Opm::Parameters::registerParam<TypeTag, ParamType>( \
#ParamName, #ParamName, getPropValue<TypeTag, Properties::ParamName>(), Description)
/*! /*!
* \ingroup Parameter * \ingroup Parameter
* *
@ -107,7 +88,6 @@ struct ParamInfo
std::string paramName; std::string paramName;
std::string paramTypeName; std::string paramTypeName;
std::string typeTagName; std::string typeTagName;
std::string propertyName;
std::string usageString; std::string usageString;
std::string compileTimeValue; std::string compileTimeValue;
bool isHidden; bool isHidden;
@ -117,7 +97,6 @@ struct ParamInfo
return other.paramName == paramName return other.paramName == paramName
&& other.paramTypeName == paramTypeName && other.paramTypeName == paramTypeName
&& other.typeTagName == typeTagName && other.typeTagName == typeTagName
&& other.propertyName == propertyName
&& other.usageString == usageString && other.usageString == usageString
&& other.compileTimeValue == compileTimeValue; && other.compileTimeValue == compileTimeValue;
} }
@ -949,7 +928,7 @@ public:
// make sure that the parameter is used consistently. since // make sure that the parameter is used consistently. since
// this is potentially quite expensive, it is only done if // this is potentially quite expensive, it is only done if
// debugging code is not explicitly turned off. // debugging code is not explicitly turned off.
check_(Dune::className<ParamType>(), paramName, paramName); check_(Dune::className<ParamType>(), paramName);
#endif #endif
if (errorIfNotRegistered) { if (errorIfNotRegistered) {
@ -972,13 +951,11 @@ public:
private: private:
struct Blubb struct Blubb
{ {
std::string propertyName;
std::string paramTypeName; std::string paramTypeName;
std::string groupName; std::string groupName;
Blubb& operator=(const Blubb& b) Blubb& operator=(const Blubb& b)
{ {
propertyName = b.propertyName;
paramTypeName = b.paramTypeName; paramTypeName = b.paramTypeName;
groupName = b.groupName; groupName = b.groupName;
return *this; return *this;
@ -986,8 +963,7 @@ private:
}; };
static void check_(const std::string& paramTypeName, static void check_(const std::string& paramTypeName,
const std::string& propertyName, const char* paramName)
const char *paramName)
{ {
using StaticData = std::unordered_map<std::string, Blubb>; using StaticData = std::unordered_map<std::string, Blubb>;
static StaticData staticData; static StaticData staticData;
@ -996,7 +972,6 @@ private:
Blubb *b; Blubb *b;
if (it == staticData.end()) { if (it == staticData.end()) {
Blubb a; Blubb a;
a.propertyName = propertyName;
a.paramTypeName = paramTypeName; a.paramTypeName = paramTypeName;
staticData[paramName] = a; staticData[paramName] = a;
b = &staticData[paramName]; b = &staticData[paramName];
@ -1004,12 +979,6 @@ private:
else else
b = &(it->second); b = &(it->second);
if (b->propertyName != propertyName) {
throw std::logic_error("GET_*_PARAM for parameter '"+std::string(paramName)
+"' called for at least two different properties ('"
+b->propertyName+"' and '"+propertyName+"')");
}
if (b->paramTypeName != paramTypeName) { if (b->paramTypeName != paramTypeName) {
throw std::logic_error("GET_*_PARAM for parameter '"+std::string(paramName) throw std::logic_error("GET_*_PARAM for parameter '"+std::string(paramName)
+"' called with at least two different types (" +"' called with at least two different types ("
@ -1027,7 +996,7 @@ private:
// make sure that the parameter is used consistently. since // make sure that the parameter is used consistently. since
// this is potentially quite expensive, it is only done if // this is potentially quite expensive, it is only done if
// debugging code is not explicitly turned off. // debugging code is not explicitly turned off.
check_(Dune::className<ParamType>(), propTagName, paramName); check_(Dune::className<ParamType>(), paramName);
#endif #endif
if (errorIfNotRegistered) { if (errorIfNotRegistered) {
@ -1114,14 +1083,36 @@ bool isSet(const char* paramName, bool errorIfNotRegistered = true)
errorIfNotRegistered); errorIfNotRegistered);
} }
template <class TypeTag, class ParamType> /*!
void registerParam(const char *paramName, const char *propertyName, const ParamType& defaultValue, const char *usageString) * \ingroup Parameter
*
* \brief Register a run-time parameter.
*
* In OPM, parameters can only be used after they have been
* registered.
*
* Example:
*
* \code
* // Registers a run-time parameter "UpwindWeight"
* and the description "Relative weight of the upwind node."
* registerParam<TypeTag,UpwindWeight>("Relative weight of the upwind node.");
* \endcode
*/
template <class TypeTag, template<class,class> class Param>
void registerParam(const char* usageString)
{ {
using ParamsMeta = GetProp<TypeTag, Properties::ParameterMetaData>; using ParamsMeta = GetProp<TypeTag, Properties::ParameterMetaData>;
if (!ParamsMeta::registrationOpen()) const std::string paramName = getPropName<TypeTag,Param>();
if (!ParamsMeta::registrationOpen()) {
throw std::logic_error("Parameter registration was already closed before " throw std::logic_error("Parameter registration was already closed before "
"the parameter '"+std::string(paramName)+"' was registered."); "the parameter '" + paramName + "' was registered.");
}
const auto defaultValue = getPropValue<TypeTag, Param>();
using ParamType = std::conditional_t<std::is_same_v<decltype(defaultValue),
const char* const>, std::string,
std::remove_const_t<decltype(defaultValue)>>;
ParamsMeta::registrationFinalizers().emplace_back( ParamsMeta::registrationFinalizers().emplace_back(
new ParamRegFinalizer_<TypeTag, ParamType>(paramName, defaultValue)); new ParamRegFinalizer_<TypeTag, ParamType>(paramName, defaultValue));
@ -1130,7 +1121,6 @@ void registerParam(const char *paramName, const char *propertyName, const ParamT
paramInfo.paramTypeName = Dune::className<ParamType>(); paramInfo.paramTypeName = Dune::className<ParamType>();
std::string tmp = Dune::className<TypeTag>(); std::string tmp = Dune::className<TypeTag>();
tmp.replace(0, strlen("Opm::Properties::TTag::"), ""); tmp.replace(0, strlen("Opm::Properties::TTag::"), "");
paramInfo.propertyName = propertyName;
paramInfo.usageString = usageString; paramInfo.usageString = usageString;
std::ostringstream oss; std::ostringstream oss;
oss << defaultValue; oss << defaultValue;
@ -1141,7 +1131,7 @@ void registerParam(const char *paramName, const char *propertyName, const ParamT
// parameter name, type and usage string are exactly the same. // parameter name, type and usage string are exactly the same.
if (ParamsMeta::registry().at(paramName) == paramInfo) if (ParamsMeta::registry().at(paramName) == paramInfo)
return; return;
throw std::logic_error("Parameter "+std::string(paramName) throw std::logic_error("Parameter " + paramName
+" registered twice with non-matching characteristics."); +" registered twice with non-matching characteristics.");
} }

View File

@ -26,9 +26,12 @@
#ifndef OPM_PROPERTY_SYSTEM_HH #ifndef OPM_PROPERTY_SYSTEM_HH
#define OPM_PROPERTY_SYSTEM_HH #define OPM_PROPERTY_SYSTEM_HH
#include <dune/common/classname.hh>
#include <cstring>
#include <ostream>
#include <tuple> #include <tuple>
#include <type_traits> #include <type_traits>
#include <ostream>
namespace Opm { namespace Opm {
namespace Properties { namespace Properties {
@ -215,6 +218,13 @@ struct GetSplicePropImpl
static_assert(!std::is_same<type, std::tuple<>>::value, "Splice is undefined!"); static_assert(!std::is_same<type, std::tuple<>>::value, "Splice is undefined!");
}; };
template <typename, class = void>
struct has_name : public std::false_type {};
template <typename T>
struct has_name<T, decltype((void)T::name, void())>
: public std::true_type {};
} // end namespace Detail } // end namespace Detail
} // end namespace Property } // end namespace Property
@ -237,6 +247,23 @@ using GetSplicePropType = typename Properties::Detail::GetSplicePropImpl<TypeTag
//! get the value data member of a property //! get the value data member of a property
template<class TypeTag, template<class,class> class Property> template<class TypeTag, template<class,class> class Property>
constexpr auto getPropValue() { return Properties::Detail::GetPropImpl<TypeTag, Property>::type::value; } constexpr auto getPropValue() { return Properties::Detail::GetPropImpl<TypeTag, Property>::type::value; }
//! get the name data member of a property
template<class TypeTag, template<class,class> class Property>
auto getPropName()
{
using type = typename Properties::Detail::GetPropImpl<TypeTag,Property>::type;
if constexpr (Properties::Detail::has_name<type>::value) {
return Properties::Detail::GetPropImpl<TypeTag, Property>::type::name;
} else {
std::string paramName = Dune::className<type>();
paramName.replace(0, std::strlen("Opm::Properties::"), "");
const auto pos = paramName.find_first_of('<');
paramName.erase(pos);
return paramName;
}
}
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop
#endif #endif

View File

@ -254,15 +254,15 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, Scalar, EndTime, Parameters::registerParam<TypeTag, Properties::EndTime>
"The simulation time at which the simulation is finished [s]"); ("The simulation time at which the simulation is finished [s]");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, InitialTimeStepSize, Parameters::registerParam<TypeTag, Properties::InitialTimeStepSize>
"The size of the initial time step [s]"); ("The size of the initial time step [s]");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, RestartTime, Parameters::registerParam<TypeTag, Properties::RestartTime>
"The simulation time at which a restart should be attempted [s]"); ("The simulation time at which a restart should be attempted [s]");
EWOMS_REGISTER_PARAM(TypeTag, std::string, PredeterminedTimeStepsFile, Parameters::registerParam<TypeTag, Properties::PredeterminedTimeStepsFile>
"A file with a list of predetermined time step sizes (one " ("A file with a list of predetermined time step sizes (one "
"time step per line)"); "time step per line)");
Vanguard::registerParameters(); Vanguard::registerParameters();
Model::registerParameters(); Model::registerParameters();

View File

@ -78,15 +78,14 @@ static inline void registerAllParameters_(bool finalizeRegistration = true)
using Simulator = GetPropType<TypeTag, Properties::Simulator>; using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using ThreadManager = GetPropType<TypeTag, Properties::ThreadManager>; using ThreadManager = GetPropType<TypeTag, Properties::ThreadManager>;
EWOMS_REGISTER_PARAM(TypeTag, std::string, ParameterFile, Parameters::registerParam<TypeTag, Properties::ParameterFile>
"An .ini file which contains a set of run-time " ("An .ini file which contains a set of run-time parameters");
"parameters"); Parameters::registerParam<TypeTag, Properties::PrintProperties>
EWOMS_REGISTER_PARAM(TypeTag, int, PrintProperties, ("Print the values of the compile time properties at "
"Print the values of the compile time properties at " "the start of the simulation");
"the start of the simulation"); Parameters::registerParam<TypeTag, Properties::PrintParameters>
EWOMS_REGISTER_PARAM(TypeTag, int, PrintParameters, ("Print the values of the run-time parameters at the "
"Print the values of the run-time parameters at the " "start of the simulation");
"start of the simulation");
Simulator::registerParameters(); Simulator::registerParameters();
ThreadManager::registerParameters(); ThreadManager::registerParameters();

View File

@ -72,11 +72,10 @@ namespace Linear {
\ \
static void registerParameters() \ static void registerParameters() \
{ \ { \
EWOMS_REGISTER_PARAM(TypeTag, int, PreconditionerOrder, \ Parameters::registerParam<TypeTag, Properties::PreconditionerOrder> \
"The order of the preconditioner"); \ ("The order of the preconditioner"); \
EWOMS_REGISTER_PARAM(TypeTag, Scalar, PreconditionerRelaxation, \ Parameters::registerParam<TypeTag, Properties::PreconditionerRelaxation> \
"The relaxation factor of the " \ ("The relaxation factor of the preconditioner"); \
"preconditioner"); \
} \ } \
\ \
void prepare(IstlMatrix& matrix) \ void prepare(IstlMatrix& matrix) \
@ -116,9 +115,8 @@ namespace Linear {
\ \
static void registerParameters() \ static void registerParameters() \
{ \ { \
EWOMS_REGISTER_PARAM(TypeTag, Scalar, PreconditionerRelaxation, \ Parameters::registerParam<TypeTag, Properties::PreconditionerRelaxation> \
"The relaxation factor of the " \ ("The relaxation factor of the preconditioner"); \
"preconditioner"); \
} \ } \
\ \
void prepare(OverlappingMatrix& matrix) \ void prepare(OverlappingMatrix& matrix) \
@ -164,8 +162,8 @@ public:
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, Scalar, PreconditionerRelaxation, Parameters::registerParam<TypeTag, Properties::PreconditionerRelaxation>
"The relaxation factor of the preconditioner"); ("The relaxation factor of the preconditioner");
} }
void prepare(OverlappingMatrix& matrix) void prepare(OverlappingMatrix& matrix)

View File

@ -124,8 +124,8 @@ public:
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, int, GMResRestart, Parameters::registerParam<TypeTag, Properties::GMResRestart>
"Number of iterations after which the GMRES linear solver is restarted"); ("Number of iterations after which the GMRES linear solver is restarted");
} }
template <class LinearOperator, class ScalarProduct, class Preconditioner> template <class LinearOperator, class ScalarProduct, class Preconditioner>

View File

@ -150,12 +150,12 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LinearSolverMaxError, Parameters::registerParam<TypeTag, Properties::LinearSolverMaxError>
"The maximum residual error which the linear solver tolerates" ("The maximum residual error which the linear solver tolerates "
" without giving up"); "without giving up");
EWOMS_REGISTER_PARAM(TypeTag, int, AmgCoarsenTarget, Parameters::registerParam<TypeTag, Properties::AmgCoarsenTarget>
"The coarsening target for the agglomerations of " ("The coarsening target for the agglomerations of "
"the AMG preconditioner"); "the AMG preconditioner");
} }
protected: protected:

View File

@ -152,16 +152,16 @@ public:
*/ */
static void registerParameters() static void registerParameters()
{ {
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LinearSolverTolerance, Parameters::registerParam<TypeTag, Properties::LinearSolverTolerance>
"The maximum allowed error between of the linear solver"); ("The maximum allowed error between of the linear solver");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LinearSolverAbsTolerance, Parameters::registerParam<TypeTag, Properties::LinearSolverAbsTolerance>
"The maximum accepted error of the norm of the residual"); ("The maximum accepted error of the norm of the residual");
EWOMS_REGISTER_PARAM(TypeTag, unsigned, LinearSolverOverlapSize, Parameters::registerParam<TypeTag, Properties::LinearSolverOverlapSize>
"The size of the algebraic overlap for the linear solver"); ("The size of the algebraic overlap for the linear solver");
EWOMS_REGISTER_PARAM(TypeTag, int, LinearSolverMaxIterations, Parameters::registerParam<TypeTag, Properties::LinearSolverMaxIterations>
"The maximum number of iterations of the linear solver"); ("The maximum number of iterations of the linear solver");
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");
PreconditionerWrapper::registerParameters(); PreconditionerWrapper::registerParameters();
} }

View File

@ -121,9 +121,9 @@ public:
{ {
ParentType::registerParameters(); ParentType::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LinearSolverMaxError, Parameters::registerParam<TypeTag, Properties::LinearSolverMaxError>
"The maximum residual error which the linear solver tolerates" ("The maximum residual error which the linear solver tolerates"
" without giving up"); " without giving up");
} }
protected: protected: