46 void setError(
const std::string& r,
const std::string& msg);
161 inline void debuglog(
const std::string& msg,
int loglevel)
178 template <
typename... Args>
179 void writelog(
const std::string& fmt,
const Args&... args) {
180 if (
sizeof...(args) == 0) {
199 template <
typename... Args>
207 void writeline(
char repeat,
size_t count,
208 bool endl_after=
true,
bool endl_before=
false);
211 void warn_deprecated(
const std::string& method,
const std::string& extra=
"");
233 doublereal
toSI(
const std::string& unit);
243 XML_Node*
get_XML_File(
const std::string& file,
int debug = 0);
267 XML_Node*
get_XML_Node(
const std::string& file_ID, XML_Node* root);
290 const std::string& file_ID,
295 inline T
clip(
const T& value,
const T& lower,
const T& upper)
297 return std::max(lower, std::min(upper, value));
301 template <
typename T>
int sign(T x) {
302 return (T(0) < x) - (x < T(0));
Wrapper for either system-installed or local headers for fmt.
XML_Node * get_XML_Node(const std::string &file_ID, XML_Node *root)
This routine will locate an XML node in either the input XML tree or in another input file specified ...
XML_Node * get_XML_File(const std::string &file, int debug)
Return a pointer to the XML tree for a Cantera input file.
void popError()
Discard the last error message.
string lastErrorMessage()
Retrieve the last error message in a string.
doublereal actEnergyToSI(const std::string &unit)
Return the conversion factor to convert activation energy unit std::string 'unit' to Kelvin...
void showErrors(std::ostream &f)
Prints all of the error messages to an ostream.
doublereal toSI(const std::string &unit)
Return the conversion factor to convert unit std::string 'unit' to SI units.
void thread_complete()
Delete and free memory allocated per thread in multithreaded applications.
void setLogger(Logger *logwriter)
Install a logger.
void writelog(const std::string &fmt, const Args &... args)
Write a formatted message to the screen.
void setError(const std::string &r, const std::string &msg)
Set an error condition in the application class without throwing an exception.
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
T clip(const T &value, const T &lower, const T &upper)
Clip value such that lower <= value <= upper.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
int sign(T x)
Sign of a number. Returns -1 if x < 0, 1 if x > 0 and 0 if x == 0.
XML_Node * get_XML_from_string(const std::string &text)
Read a CTI or CTML string and fill up an XML tree.
void suppress_thermo_warnings(bool suppress)
Globally disable printing of warnings about problematic thermo data, e.g.
void close_XML_File(const std::string &file)
Close an XML File.
void appdelete()
Delete and free all memory associated with the application.
void debuglog(const std::string &msg, int loglevel)
Write a message to the log only if loglevel > 0.
void writelogf(const char *fmt, const Args &... args)
Write a formatted message to the screen.
void writelogendl()
Write an end of line character to the screen and flush output.
bool thermo_warnings_suppressed()
Returns true if thermo warnings should be suppressed.
void suppress_deprecation_warnings()
Globally disable printing of deprecation warnings.
void make_deprecation_warnings_fatal()
Turns deprecation warnings into exceptions.
Namespace for the Cantera kernel.
int nErrors()
Return the number of errors that have been encountered so far.
XML_Node * get_XML_NameID(const std::string &nameTarget, const std::string &file_ID, XML_Node *root)
This routine will locate an XML node in either the input XML tree or in another input file specified ...
void writelog_direct(const std::string &msg)
Write a message to the screen.