parametersystem.hh File Reference

This file provides the infrastructure to retrieve run-time parameters. More...

#include <dune/common/classname.hh>
#include <dune/common/parametertree.hh>
#include <charconv>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <tuple>
#include <type_traits>
#include <unistd.h>
#include <sys/ioctl.h>
Include dependency graph for parametersystem.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Opm::Parameters::detail::has_name< typename, class >
 
struct  Opm::Parameters::detail::has_name< T, std::void_t< decltype(std::declval< T >().name)> >
 
struct  Opm::Parameters::ParamInfo
 
class  Opm::Parameters::ParamRegFinalizerBase_
 
class  Opm::Parameters::ParamRegFinalizer_< Param >
 
struct  Opm::Parameters::MetaData
 

Namespaces

namespace  Opm
 
namespace  Opm::Parameters
 
namespace  Opm::Parameters::detail
 

Functions

template<class Parameter >
auto Opm::Parameters::detail::getParamName ()
 get the name data member of a parameter More...
 
template<class Param >
auto Opm::Parameters::Get (bool errorIfNotRegistered=true)
 Retrieve a runtime parameter. More...
 
template<class Param >
auto Opm::Parameters::SetDefault (decltype(Param::value) new_value)
 Set a runtime parameter. More...
 
void Opm::Parameters::printParamUsage_ (std::ostream &os, const ParamInfo &paramInfo)
 
void Opm::Parameters::getFlattenedKeyList_ (std::list< std::string > &dest, const Dune::ParameterTree &tree, const std::string &prefix="")
 
std::string Opm::Parameters::breakLines_ (const std::string &msg, int indentWidth, int maxWidth)
 
int Opm::Parameters::getTtyWidth_ ()
 
void Opm::Parameters::printParamList_ (std::ostream &os, const std::list< std::string > &keyList, bool printDefaults=false)
 
void Opm::Parameters::printUsage (const std::string &helpPreamble, const std::string &errorMsg="", std::ostream &os=std::cerr, const bool showAll=false)
 Print a usage message for all run-time parameters. More...
 
void Opm::Parameters::removeLeadingSpace_ (std::string &s)
 
std::string Opm::Parameters::transformKey_ (const std::string &s, bool capitalizeFirstLetter=true, const std::string &errorPrefix="")
 
std::string Opm::Parameters::parseKey_ (std::string &s)
 
std::string Opm::Parameters::parseQuotedValue_ (std::string &s, const std::string &errorPrefix)
 
std::string Opm::Parameters::parseUnquotedValue_ (std::string &s, const std::string &)
 
template<class PositionalArgumentCallback >
std::string Opm::Parameters::parseCommandLineOptions (int argc, const char **argv, const std::string &helpPreamble="", const PositionalArgumentCallback &posArgCallback=noPositionalParameters_)
 Parse the parameters provided on the command line. More...
 
void Opm::Parameters::parseParameterFile (const std::string &fileName, bool overwrite=true)
 Read the parameters from an INI-style file. More...
 
void Opm::Parameters::printValues (std::ostream &os=std::cout)
 Print values of the run-time parameters. More...
 
bool Opm::Parameters::printUnused (std::ostream &os=std::cout)
 Print the list of unused run-time parameters. More...
 
template<class Container >
void Opm::Parameters::getLists (Container &usedParams, Container &unusedParams)
 Retrieves the lists of parameters specified at runtime and their values. More...
 
void Opm::Parameters::reset ()
 
template<class Param >
bool Opm::Parameters::IsSet (bool errorIfNotRegistered=true)
 Returns true if a parameter has been specified at runtime, false otherwise. More...
 
template<class Param >
void Opm::Parameters::Register (const char *usageString)
 Register a run-time parameter. More...
 
template<class Param >
void Opm::Parameters::Hide ()
 Indicate that a given parameter should not be mentioned in the help message. More...
 
void Opm::Parameters::endRegistration ()
 Indicate that all parameters are registered for a given type tag. More...
 

Detailed Description

This file provides the infrastructure to retrieve run-time parameters.

Internally, runtime parameters are implemented using Dune::ParameterTree with the default value taken from the parameter definition.