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 37 of file CreateChemicalSolverInterface.cpp.

38{
39 // database
41 auto const database = config.getConfigParameter<std::string>("database");
42 auto path_to_database =
43 BaseLib::joinPaths(config.projectDirectory().string(), database);
44
45 if (!BaseLib::IsFileExisting(path_to_database))
46 {
47 OGS_FATAL("Not found the specified thermodynamicdatabase: {:s}",
48 path_to_database);
49 }
50
51 INFO("Found the specified thermodynamic database: {:s}", path_to_database);
52
53 return path_to_database;
54}
#define OGS_FATAL(...)
Definition Error.h:19
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:28
bool IsFileExisting(const std::string &strFilename)
Returns true if given file exists.
Definition FileTools.cpp:23
std::string joinPaths(std::string const &pathA, std::string const &pathB)