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

40{
41 // database
43 auto const database = config.getConfigParameter<std::string>("database");
44 auto path_to_database =
45 BaseLib::joinPaths(config.projectDirectory().string(), database);
46
47 if (!BaseLib::IsFileExisting(path_to_database))
48 {
49 OGS_FATAL("Not found the specified thermodynamicdatabase: {:s}",
50 path_to_database);
51 }
52
53 INFO("Found the specified thermodynamic database: {:s}", path_to_database);
54
55 return path_to_database;
56}
#define OGS_FATAL(...)
Definition Error.h:10
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)