18 }
catch (std::exception& err) {
22 writelog(
"FuncEval::eval_nothrow: unhandled exception:\n");
28 string msg =
"FuncEval::eval_nothrow: unhandled exception of unknown type\n";
51 }
catch (std::exception& err) {
55 writelog(
"FuncEval::eval_nothrow: unhandled exception:\n");
61 string msg =
"FuncEval::eval_nothrow: unhandled exception of unknown type\n";
73 std::stringstream errs;
92 }
catch (std::exception& err) {
96 writelog(
"FuncEval::preconditioner_setup_nothrow: unhandled exception:\n");
102 string msg =
"FuncEval::preconditioner_setup_nothrow: unhandled exception"
103 " of unknown type\n";
125 }
catch (std::exception& err) {
129 writelog(
"FuncEval::preconditioner_solve_nothrow: unhandled exception:\n");
135 string msg =
"FuncEval::preconditioner_solve_nothrow: unhandled exception"
136 " of unknown type\n";
158 }
catch (std::exception& err) {
162 writelog(
"FuncEval::evalRootFunctionsNoThrow: unhandled exception:\n");
168 string msg =
"FuncEval::evalRootFunctionsNoThrow: unhandled exception"
169 " 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.