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

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