23 }
catch (std::exception& err) {
27 writelog(
"FuncEval::eval_nothrow: unhandled exception:\n");
33 string msg =
"FuncEval::eval_nothrow: unhandled exception of unknown type\n";
56 }
catch (std::exception& err) {
60 writelog(
"FuncEval::eval_nothrow: unhandled exception:\n");
66 string msg =
"FuncEval::eval_nothrow: unhandled exception of unknown type\n";
78 std::stringstream errs;
97 }
catch (std::exception& err) {
101 writelog(
"FuncEval::preconditioner_setup_nothrow: unhandled exception:\n");
107 string msg =
"FuncEval::preconditioner_setup_nothrow: unhandled exception"
108 " of unknown type\n";
130 }
catch (std::exception& err) {
134 writelog(
"FuncEval::preconditioner_solve_nothrow: unhandled exception:\n");
140 string msg =
"FuncEval::preconditioner_solve_nothrow: unhandled exception"
141 " of unknown type\n";
163 }
catch (std::exception& err) {
167 writelog(
"FuncEval::evalRootFunctionsNoThrow: unhandled exception:\n");
173 string msg =
"FuncEval::evalRootFunctionsNoThrow: unhandled exception"
174 " of unknown type\n";
Base class for exceptions thrown by Cantera classes.
const char * what() const override
Get a description of the error.
virtual void eval(double t, span< const double > y, span< double > ydot, span< const double > p)
Evaluate the right-hand-side ODE function.
int evalRootFunctionsNoThrow(double t, span< const double > y, span< double > gout)
Wrapper for evalRootFunctions that converts exceptions to return codes.
virtual void preconditionerSolve(span< const double > rhs, span< double > output)
Evaluate the linear system Ax=b where A is the preconditioner.
virtual void evalRootFunctions(double t, span< const double > y, span< double > gout)
Evaluate the event/root functions currently in play.
bool suppressErrors() const
Get current state of error suppression.
int preconditioner_setup_nothrow(double t, span< const double > y, double gamma)
Preconditioner setup that doesn't throw an error but returns a CVODES flag.
int evalNoThrow(double t, span< const double > y, span< double > ydot)
Evaluate the right-hand side using return code to indicate status.
int preconditioner_solve_nothrow(span< const double > rhs, span< double > output)
Preconditioner solve that doesn't throw an error but returns a CVODES flag.
virtual void evalDae(double t, span< const double > y, span< const double > ydot, span< const double > p, span< double > residual)
Evaluate the right-hand-side DAE function.
int evalDaeNoThrow(double t, span< const double > y, span< const double > ydot, span< double > residual)
Evaluate the right-hand side using return code to indicate status.
vector< string > m_errors
Errors occurring during function evaluations.
string getErrors() const
Return a string containing the text of any suppressed errors.
virtual void preconditionerSetup(double t, span< const double > y, double gamma)
Evaluate the setup processes for the Jacobian preconditioner.
vector< double > m_sens_params
Values for the problem parameters for which sensitivities are computed This is the array which is per...
void writelog(const string &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.
Namespace for the Cantera kernel.