The parameters system. More...
Collaboration diagram for Parameters:
Detailed DescriptionThe parameters system. Parameters allow to specify values at runtime (either via command line arguments or by means of a .INI file) and thus cannot be used to specify types as properties can. Also all parameters fall back to the value of the property of the same as the parameter, so this property must exist and be defined. Function Documentation◆ Get()
template<class Param >
Retrieve a runtime parameter. The default value is specified in the parameter struct. Example: // Retrieves value UpwindWeight, default
// is taken from the property UpwindWeight
::Opm::Parameters::get<::Opm::Parameters::UpwindWeight>();
References Opm::Parameters::MetaData::mutableRegistry(), Opm::Parameters::MetaData::registrationOpen(), Opm::Parameters::MetaData::registry(), and Opm::Parameters::MetaData::tree(). Referenced by Opm::FvBaseProblem< TypeTag >::nextTimeStepSize(), and Opm::NcpNewtonMethod< TypeTag >::preSolve_(). ◆ parseCommandLineOptions()
template<class PositionalArgumentCallback >
Parse the parameters provided on the command line. This function does some basic syntax checks.
References Opm::Parameters::parseKey_(), Opm::Parameters::printUsage(), Opm::Parameters::transformKey_(), and Opm::Parameters::MetaData::tree(). ◆ parseParameterFile()
Read the parameters from an INI-style file. This function does some basic syntax checks. References Opm::Parameters::parseKey_(), Opm::Parameters::parseQuotedValue_(), Opm::Parameters::parseUnquotedValue_(), Opm::Parameters::removeLeadingSpace_(), Opm::Parameters::transformKey_(), and Opm::Parameters::MetaData::tree(). ◆ printUnused()
Print the list of unused run-time parameters.
References Opm::Parameters::getFlattenedKeyList_(), Opm::Parameters::MetaData::registry(), and Opm::Parameters::MetaData::tree(). Referenced by start(). ◆ printUsage()
Print a usage message for all run-time parameters.
References Opm::Parameters::breakLines_(), Opm::Parameters::getTtyWidth_(), Opm::Parameters::ParamInfo::paramName, Opm::Parameters::printParamUsage_(), Opm::Parameters::MetaData::registry(), and Opm::Parameters::ParamInfo::usageString. Referenced by Opm::Parameters::parseCommandLineOptions(), and start(). ◆ printValues()
Print values of the run-time parameters.
References Opm::Parameters::getFlattenedKeyList_(), Opm::Parameters::printParamList_(), Opm::Parameters::MetaData::registry(), and Opm::Parameters::MetaData::tree(). Referenced by start(). ◆ Register()
template<class Param >
Register a run-time parameter. In OPM, parameters can only be used after they have been registered. Example: // Registers a run-time parameter "UpwindWeight"
and the description "Relative weight of the upwind node."
Register<UpwindWeight>("Relative weight of the upwind node.");
References Opm::Parameters::ParamInfo::defaultValue, Opm::Parameters::ParamInfo::isHidden, Opm::Parameters::MetaData::mutableRegistry(), Opm::Parameters::ParamInfo::paramName, Opm::Parameters::ParamInfo::paramTypeName, Opm::Parameters::MetaData::registrationFinalizers(), Opm::Parameters::MetaData::registrationOpen(), Opm::Parameters::MetaData::registry(), and Opm::Parameters::ParamInfo::usageString. ◆ SetDefault()
template<class Param >
Set a runtime parameter. Override the default value specified. Example: // Set the value UpwindWeight
::Opm::Parameters::Set<::Opm::Parameters::UpwindWeight>(3.0);
References Opm::Parameters::MetaData::mutableRegistry(), and Opm::Parameters::MetaData::registry(). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||