move ParameterFile to TypeTag-free parameter system

This commit is contained in:
Arne Morten Kvarving 2024-07-05 17:49:51 +02:00
parent 3d737c0303
commit b424c380fa
3 changed files with 4 additions and 11 deletions

View File

@ -69,10 +69,8 @@ struct GridGlobalRefinements { using type = Properties::UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct InitialTimeStepSize { 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; };
//! Set a value for the ParameterFile property
struct ParameterFile { static constexpr auto value = ""; };
//! The name of the file with a number of forced time step lengths
template<class TypeTag, class MyTypeTag>

View File

@ -206,11 +206,6 @@ struct InitialTimeStepSize<TypeTag, Properties::TTag::NumericModel>
static constexpr type value = -1e35;
};
//! Set a value for the ParameterFile property
template<class TypeTag>
struct ParameterFile<TypeTag, Properties::TTag::NumericModel>
{ static constexpr auto value = ""; };
//! By default, do not force any time steps
template<class TypeTag>
struct PredeterminedTimeStepsFile<TypeTag, Properties::TTag::NumericModel>

View File

@ -78,7 +78,7 @@ static inline void registerAllParameters_(bool finalizeRegistration = true)
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using ThreadManager = GetPropType<TypeTag, Properties::ThreadManager>;
Parameters::registerParam<TypeTag, Parameters::ParameterFile>
Parameters::Register<Parameters::ParameterFile>
("An .ini file which contains a set of run-time parameters");
Parameters::registerParam<TypeTag, Parameters::PrintParameters>
("Print the values of the run-time parameters at the "
@ -147,7 +147,7 @@ static inline int setupParameters_(int argc,
return status;
}
const std::string paramFileName = Parameters::get<TypeTag, Parameters::ParameterFile>(false);
const std::string paramFileName = Parameters::Get<Parameters::ParameterFile>(false);
if (!paramFileName.empty()) {
////////////////////////////////////////////////////////////
// add the parameters specified using an .ini file