|
VirtualFluids 0.2.0
Parallel CFD LBM Solver
|
Simple configuration file. More...
Namespaces | |
| namespace | constant |
Classes | |
| class | ConfigurationFile |
| struct | MetaData |
| class | Timer |
Functions | |
| template<> | |
| bool | convert_to< bool > (const std::string &value) |
| ConfigurationFile | loadConfig (int argc, char *argv[], std::string configPath) |
| template<class T > | |
| T | convert_to (const std::string &value) |
| template<> | |
| bool | convert_to< bool > (const std::string &value) |
| std::string | getCurrentTime () |
| void | logPreSimulation (const MetaData &meta_data) |
| void | logPostSimulation (const MetaData &meta_data) |
| void | writeYAML (const MetaData &meta_data, const std::string &filename) |
| double | timeInSeconds (Timer::timePoint end, Timer::timePoint start) |
Simple configuration file.
The Configuration class presented here can read and keep values of any configuration file written in a format like this: #
#
nbDimensions = 2 temperature = 25.001 epsilon = 1.013e-14 writeLogFile = false # NOTE: Set to "true" in debug mode only.
errorMessage = the simulation failed origin = 0.0 0.0 0.0 # x, y, z of origin
Example how to use it:
ConfigurationFile config; config.load(configname);
int nbDimensions = config.getValue<int>("nbDimensions"); float temperature = config.getValue<float>("temperature"); double epsilon = config.getValue<double>("epsilon"); bool writeLogFile = config.getValue<bool>("writeLogFile"); string errorMessage = config.getValue<string>("errorMessage"); vector<double> origin = config.getVector<double>("origin");
Definition at line 79 of file ConfigurationFile.h.
| bool vf::basics::convert_to< bool > | ( | const std::string & | value | ) |
Definition at line 50 of file ConfigurationFile.cpp.
| bool vf::basics::convert_to< bool > | ( | const std::string & | value | ) |
Definition at line 50 of file ConfigurationFile.cpp.
| std::string vf::basics::getCurrentTime | ( | ) |
Definition at line 72 of file MetaData.cpp.
| ConfigurationFile vf::basics::loadConfig | ( | int | argc, |
| char * | argv[], | ||
| std::string | configPath | ||
| ) |
Definition at line 149 of file ConfigurationFile.cpp.
Definition at line 140 of file MetaData.cpp.
Definition at line 82 of file MetaData.cpp.
| double vf::basics::timeInSeconds | ( | Timer::timePoint | end, |
| Timer::timePoint | start | ||
| ) |