Cantera
2.0
|
Classes | |
class | Application |
Class to hold global data. More... | |
class | Logger |
Base class for 'loggers' that write text messages to log files. More... | |
Functions | |
void | writelog (const std::string &msg) |
Write a message to the screen. | |
void | writelog (const char *pszmsg) |
Write a message to the screen. | |
void | setLogger (Logger *logwriter) |
Install a logger. | |
void | writelog (const std::string &msg) |
Write a message to the screen. | |
void | writelogendl () |
Write an endl to the screen and flush output. | |
void | writelog (const char *pszmsg) |
Write a message to the screen. | |
void | setLogger (Logger *logwriter) |
Install a logger - Called by the language interfaces to install an appropriate logger. | |
void | writelog (const std::string &msg) |
Write a message to the screen. | |
void | writelog (const char *msg) |
Write a message to the screen. | |
void | writelogf (const char *fmt,...) |
Write a formatted message to the screen. | |
void | error (const std::string &msg) |
Write an error message and terminate execution. | |
int | userInterface () |
returns 1 for MATLAB, 2 for Python, and 0 for C++ or Fortran. | |
void | setLogger (Logger *logwriter) |
Install a logger. | |
void writelog | ( | const std::string & | msg | ) |
Write a message to the screen.
The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.
msg | c++ string to be written to the screen |
Definition at line 155 of file application.cpp.
Referenced by Application::writelog().
void writelog | ( | const char * | pszmsg | ) |
Write a message to the screen.
The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.
pszmsg | c character string to be written to the screen |
Definition at line 149 of file application.cpp.
void setLogger | ( | Logger * | logwriter | ) |
Install a logger.
Called by the language interfaces to install an appropriate logger. The logger is used for the writelog() function
logwriter | Pointer to a logger object |
Definition at line 124 of file application.cpp.
Referenced by Application::setLogger().
|
inline |
Write a message to the screen.
The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.
msg | c++ string to be written to the screen |
Definition at line 509 of file application.h.
References Application::pMessenger, and Application::Messages::writelog().
Referenced by Application::Messages::endLogGroup(), Application::get_XML_File(), Application::Messages::logErrors(), Application::Messages::write_logfile(), and Cantera::writelog().
|
inline |
Write an endl to the screen and flush output.
Definition at line 518 of file application.h.
References Application::pMessenger, and Application::Messages::writelogendl().
Referenced by Cantera::writelogendl().
|
inline |
Write a message to the screen.
The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.
pszmsg | c null terminated string to be written to the screen |
Definition at line 531 of file application.h.
References Application::pMessenger, and Application::Messages::writelog().
|
inline |
Install a logger - Called by the language interfaces to install an appropriate logger.
logwriter | Pointer to a logger object |
Definition at line 565 of file application.h.
References Application::pMessenger, and Application::Messages::setLogger().
Referenced by Cantera::setLogger().
void writelog | ( | const std::string & | msg | ) |
Write a message to the screen.
The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages. It can also be called by user programs. The advantage of using writelog over writing directly to the standard output is that messages written with writelog will display correctly even when Cantera is used from MATLAB or other application that do not have a standard output stream.
This routine is part of the interface suite whose behavior changes with the interface. The interface suite has been moved to the class logger and inherited classes of logger.
msg | String message to be written to the screen |
Definition at line 33 of file global.cpp.
References Cantera::app(), and Application::writelog().
Referenced by Bdry1D::_getInitialSoln(), InterfaceKinetics::applyButlerVolmerCorrection(), Cantera::bound_step(), NasaThermo::checkContinuity(), ctml::ct2ctml(), MultiNewton::dampStep(), Cantera::deprecatedMethod(), ChemEquil::equilibrate(), ChemEquil::equilResidual(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), ctml::get_CTML_Tree(), ctml::getFloatArray(), ctml::getFloatCurrent(), ctml::getFloats(), ctml::getInteger(), ChemEquil::initialize(), PureFluidPhase::initThermo(), SimpleThermo::install(), NasaThermo::install(), ShomateThermo::install(), LogPrintCtrl::pr_de(), LogPrintCtrl::pr_de_c10(), Sim1D::refine(), Cantera::removeAtVersion(), Sim1D::restore(), ChemEquil::setInitialMoles(), Inlet1D::showSolution(), StFlow::showSolution(), Surf1D::showSolution(), ReactingSurf1D::showSolution(), Domain1D::showSolution(), MultiNewton::solve(), RootFind::solve(), OneDim::timeStep(), UnknownThermoParam::UnknownThermoParam(), Cantera::writelogf(), and OneDim::writeStats().
void writelog | ( | const char * | msg | ) |
Write a message to the screen.
The string may be of any length, and may contain end-of-line characters. This method is used throughout Cantera to write log messages.
This routine is part of the interface suite whose behavior changes with the interface. The interface suite has been moved to the class logger and inherited classes of logger.
msg | c character string to be written to the screen |
Definition at line 38 of file global.cpp.
References Cantera::app(), and Application::writelog().
void writelogf | ( | const char * | fmt, |
... | |||
) |
Write a formatted message to the screen.
Using the printf formatting of C, write a message to the screen with variable values.
Here, we format an internal string with the correct values and then feed it into writelog().
fmt | c format string for the following arguments |
Definition at line 43 of file global.cpp.
References Cantera::writelog().
Referenced by ChemEquil::equilibrate(), ChemEquil::equilResidual(), ChemEquil::estimateElementPotentials(), ChemEquil::estimateEP_Brinkley(), SquareMatrix::factor(), SquareMatrix::factorQR(), ctml::get_CTML_Tree(), Cantera::invert(), mlequ(), SquareMatrix::rcond(), BandMatrix::rcond(), SquareMatrix::rcondQR(), ChemEquil::setInitialMoles(), SquareMatrix::solve(), Cantera::solve(), RootFind::solve(), and SquareMatrix::solveQR().
void error | ( | const std::string & | msg | ) |
Write an error message and terminate execution.
This routine is part of the interface suite whose behavior changes with the interface. The interface suite has been moved to the class logger and inherited classes of logger.
msg | Error message to be written to the screen. |
Definition at line 66 of file global.cpp.
References Cantera::app(), and Application::logerror().
Referenced by NonlinearSolver::calcSolnToResNormVector(), NonlinearSolver::print_solnDelta_norm_contrib(), NonlinearSolver::residErrorNorm(), BEulerInt::soln_error_norm(), NonlinearSolver::solnErrorNorm(), and BEulerInt::time_error_norm().
int userInterface | ( | ) |
returns 1 for MATLAB, 2 for Python, and 0 for C++ or Fortran.
This routine is part of the interface suite whose behavior changes with the interface. The interface suite has been moved to the class logger and inherited classes of logger.
Definition at line 71 of file global.cpp.
References Cantera::app(), and Application::getUserEnv().
void setLogger | ( | Logger * | logwriter | ) |
Install a logger.
Called by the language interfaces to install an appropriate logger. The logger is used for the writelog() function
logwriter | Pointer to a logger object |
Definition at line 24 of file global.cpp.
References Cantera::app(), Logger::error(), and Application::setLogger().