walberla::config Namespace Reference


struct  CaseInsensitiveCompare
class  Config
 Configuration handler & parameter file parser. More...
struct  ConfigGenerator
class  Iterator
class  MultipleConfigGenerator
class  SingleConfigGenerator


static void printConfig (std::ostream &os, const Config::BlockHandle &block, int depth=0)
std::ostream & operator<< (std::ostream &os, const Config &config)
std::ostream & operator<< (std::ostream &os, const Config::BlockHandle &block)
Config::Parameter< std::string > Config::Block::getParameter< std::string > (std::string key) const

Function Documentation

◆ begin()

Iterator walberla::config::begin ( int  argc,
char **  argv 

Loads multiple numbered configuration files.

In order to do a parameter study i.e. running multiple simulations in a row this function can be used. The configuration file name has to have the following structure: someName000.someExtension If there are zeros before the extension dot, it is interpreted as the first file of a numbered series.

If there are no zeros in the filename before the dot, the iterator goes over the single file i.e. its save to always use the iterator variant.

Command line substitution does not work when iterating over multiple files.

◆ Config::Block::getParameter< std::string >()

Config::Parameter<std::string> walberla::config::Config::Block::getParameter< std::string > ( std::string  key) const

◆ create()

shared_ptr< Config > walberla::config::create ( int  argc,
char **  argv 

Loads configuration file using command line arguments.

The last command line parameter which does not begin with '-' is taken as the configuration file name. Parameters starting with '-' are used to overwrite individual configuration values.

For the syntax of the configuration file see config::Config

For details on Parameter substitution using additional command line parameters see config::substituteCommandLineArgs

◆ createConfigIteratorFromTextFiles()

Iterator walberla::config::createConfigIteratorFromTextFiles ( const std::string &  basename,
const std::string &  extension,
int  nrOfDigits 

◆ createFromTextFile()

void walberla::config::createFromTextFile ( Config config,
const std::string &  pathToTextFile 

◆ end()

Iterator walberla::config::end ( )

◆ operator<<() [1/2]

std::ostream & walberla::config::operator<< ( std::ostream &  os,
const Config config 

◆ operator<<() [2/2]

std::ostream & walberla::config::operator<< ( std::ostream &  os,
const Config::BlockHandle block 

◆ printConfig()

static void walberla::config::printConfig ( std::ostream &  os,
const Config::BlockHandle block,
int  depth = 0 

◆ substituteCommandLineArgs() [1/2]

void walberla::config::substituteCommandLineArgs ( Config config,
const std::vector< std::string > &  params 

◆ substituteCommandLineArgs() [2/2]

void walberla::config::substituteCommandLineArgs ( Config config,
int  argc,
char **  argv 

◆ usageString()

std::string walberla::config::usageString ( const std::string &  executableName)