mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: move the ParameterFile parameter to Opm::Parameters
This commit is contained in:
parent
4cce7022bb
commit
cea13e4b96
@ -37,6 +37,11 @@ namespace Opm::Parameters {
|
|||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct GridGlobalRefinements { using type = Properties::UndefinedProperty; };
|
struct GridGlobalRefinements { using type = Properties::UndefinedProperty; };
|
||||||
|
|
||||||
|
//! Property provides the name of the file from which the additional runtime
|
||||||
|
//! parameters should to be loaded from
|
||||||
|
template<class TypeTag, class MyTypeTag>
|
||||||
|
struct ParameterFile { using type = Properties::UndefinedProperty; };
|
||||||
|
|
||||||
} // namespace Opm:Parameters
|
} // namespace Opm:Parameters
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -99,11 +99,6 @@ template<class TypeTag, class MyTypeTag>
|
|||||||
struct GridPart { using type = UndefinedProperty; };
|
struct GridPart { using type = UndefinedProperty; };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! Property provides the name of the file from which the additional runtime
|
|
||||||
//! parameters should to be loaded from
|
|
||||||
template<class TypeTag, class MyTypeTag>
|
|
||||||
struct ParameterFile { using type = UndefinedProperty; };
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Print all properties on startup?
|
* \brief Print all properties on startup?
|
||||||
*
|
*
|
||||||
@ -223,10 +218,6 @@ template<class TypeTag>
|
|||||||
struct GridView<TypeTag, TTag::NumericModel> { using type = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView; };
|
struct GridView<TypeTag, TTag::NumericModel> { using type = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView; };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! Set a value for the ParameterFile property
|
|
||||||
template<class TypeTag>
|
|
||||||
struct ParameterFile<TypeTag, TTag::NumericModel> { static constexpr auto value = ""; };
|
|
||||||
|
|
||||||
//! By default, print the properties on startup
|
//! By default, print the properties on startup
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct PrintProperties<TypeTag, TTag::NumericModel> { static constexpr int value = 2; };
|
struct PrintProperties<TypeTag, TTag::NumericModel> { static constexpr int value = 2; };
|
||||||
@ -274,6 +265,11 @@ template<class TypeTag>
|
|||||||
struct GridGlobalRefinements<TypeTag, Properties::TTag::NumericModel>
|
struct GridGlobalRefinements<TypeTag, Properties::TTag::NumericModel>
|
||||||
{ static constexpr unsigned value = 0; };
|
{ static constexpr unsigned value = 0; };
|
||||||
|
|
||||||
|
//! Set a value for the ParameterFile property
|
||||||
|
template<class TypeTag>
|
||||||
|
struct ParameterFile<TypeTag, Properties::TTag::NumericModel>
|
||||||
|
{ static constexpr auto value = ""; };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -78,7 +78,7 @@ 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>;
|
||||||
|
|
||||||
Parameters::registerParam<TypeTag, Properties::ParameterFile>
|
Parameters::registerParam<TypeTag, Parameters::ParameterFile>
|
||||||
("An .ini file which contains a set of run-time parameters");
|
("An .ini file which contains a set of run-time parameters");
|
||||||
Parameters::registerParam<TypeTag, Properties::PrintProperties>
|
Parameters::registerParam<TypeTag, Properties::PrintProperties>
|
||||||
("Print the values of the compile time properties at "
|
("Print the values of the compile time properties at "
|
||||||
@ -150,7 +150,7 @@ static inline int setupParameters_(int argc,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string paramFileName = Parameters::get<TypeTag, Properties::ParameterFile>(false);
|
const std::string paramFileName = Parameters::get<TypeTag, Parameters::ParameterFile>(false);
|
||||||
if (!paramFileName.empty()) {
|
if (!paramFileName.empty()) {
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// add the parameters specified using an .ini file
|
// add the parameters specified using an .ini file
|
||||||
|
Loading…
Reference in New Issue
Block a user