mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 09:16:27 -06:00
move PrintParameters to TypeTag-free parameter system
This commit is contained in:
parent
6c7f40b786
commit
0e3d9604ab
@ -74,8 +74,7 @@ struct PredeterminedTimeStepsFile { static constexpr auto value = ""; };
|
||||
* 0 means 'no', 1 means 'yes', 2 means 'print only to logfiles'. The
|
||||
* default is 2.
|
||||
*/
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
struct PrintParameters { using type = Properties::UndefinedProperty; };
|
||||
struct PrintParameters { static constexpr int value = 2; };
|
||||
|
||||
//! The default value for the simulation's restart time
|
||||
template<class TypeTag, class MyTypeTag>
|
||||
|
@ -195,11 +195,6 @@ struct InitialTimeStepSize<TypeTag, Properties::TTag::NumericModel>
|
||||
static constexpr type value = -1e35;
|
||||
};
|
||||
|
||||
//! By default, print the values of the run-time parameters on startup
|
||||
template<class TypeTag>
|
||||
struct PrintParameters<TypeTag, Properties::TTag::NumericModel>
|
||||
{ static constexpr int value = 2; };
|
||||
|
||||
//! The default value for the simulation's restart time
|
||||
template<class TypeTag>
|
||||
struct RestartTime<TypeTag, Properties::TTag::NumericModel>
|
||||
|
@ -80,7 +80,7 @@ static inline void registerAllParameters_(bool finalizeRegistration = true)
|
||||
|
||||
Parameters::Register<Parameters::ParameterFile>
|
||||
("An .ini file which contains a set of run-time parameters");
|
||||
Parameters::registerParam<TypeTag, Parameters::PrintParameters>
|
||||
Parameters::Register<Parameters::PrintParameters>
|
||||
("Print the values of the run-time parameters at the "
|
||||
"start of the simulation");
|
||||
|
||||
@ -351,7 +351,7 @@ static inline int start(int argc, char **argv, bool registerParams=true)
|
||||
}
|
||||
|
||||
// print the parameters if requested
|
||||
int printParams = Parameters::get<TypeTag, Parameters::PrintParameters>();
|
||||
int printParams = Parameters::Get<Parameters::PrintParameters>();
|
||||
if (myRank == 0) {
|
||||
std::string endParametersSeparator("# [end of parameters]\n");
|
||||
if (printParams) {
|
||||
|
Loading…
Reference in New Issue
Block a user