OGS
anonymous_namespace{CreateChemicalSolverInterface.cpp} Namespace Reference

Functions

std::string parseDatabasePath (BaseLib::ConfigTree const &config)
 

Function Documentation

◆ parseDatabasePath()

std::string anonymous_namespace{CreateChemicalSolverInterface.cpp}::parseDatabasePath ( BaseLib::ConfigTree const & config)
Input File Parameter
prj__chemical_system__database

Definition at line 44 of file CreateChemicalSolverInterface.cpp.

45{
46 // database
48 auto const database = config.getConfigParameter<std::string>("database");
49 auto path_to_database =
51
52 if (!BaseLib::IsFileExisting(path_to_database))
53 {
54 OGS_FATAL("Not found the specified thermodynamicdatabase: {:s}",
55 path_to_database);
56 }
57
58 INFO("Found the specified thermodynamic database: {:s}", path_to_database);
59
60 return path_to_database;
61}
#define OGS_FATAL(...)
Definition Error.h:26
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:35
std::string const & getProjectDirectory()
Returns the directory where the prj file resides.
bool IsFileExisting(const std::string &strFilename)
Returns true if given file exists.
Definition FileTools.cpp:47
std::string joinPaths(std::string const &pathA, std::string const &pathB)