44 virtual void eval(
double t,
double* y,
double* ydot,
double* p) {
56 virtual void evalDae(
double t,
double* y,
double* ydot,
double* p,
87 int evalDaeNoThrow(
double t,
double* y,
double* ydot,
double* residual);
153 virtual size_t neq()
const = 0;
162 m_suppress_errors = suppress;
167 return m_suppress_errors;
188 bool m_suppress_errors =
false;
Virtual base class for ODE/DAE right-hand-side function evaluators.
virtual void evalDae(double t, double *y, double *ydot, double *p, double *residual)
Evaluate the right-hand-side DAE function.
void suppressErrors(bool suppress)
Enable or disable suppression of errors when calling eval()
int preconditioner_solve_nothrow(double *rhs, double *output)
Preconditioner solve that doesn't throw an error but returns a CVODES flag.
virtual void getStateDae(double *y, double *ydot)
Fill in the vectors y and ydot with the current state of the system.
vector< double > m_paramScales
Scaling factors for each sensitivity parameter.
int preconditioner_setup_nothrow(double t, double *y, double gamma)
Preconditioner setup that doesn't throw an error but returns a CVODES flag.
int evalDaeNoThrow(double t, double *y, double *ydot, double *residual)
Evaluate the right-hand side using return code to indicate status.
void clearErrors()
Clear any previously-stored suppressed errors.
int evalNoThrow(double t, double *y, double *ydot)
Evaluate the right-hand side using return code to indicate status.
virtual void updatePreconditioner(double gamma)
Update the preconditioner based on already computed jacobian values.
bool suppressErrors() const
Get current state of error suppression.
virtual void eval(double t, double *y, double *ydot, double *p)
Evaluate the right-hand-side ODE function.
virtual size_t neq() const =0
Number of equations.
vector< string > m_errors
Errors occurring during function evaluations.
virtual void getConstraints(double *constraints)
Given a vector of length neq(), mark which variables should be considered algebraic constraints.
virtual size_t nparams() const
Number of sensitivity parameters.
string getErrors() const
Return a string containing the text of any suppressed errors.
vector< double > m_sens_params
Values for the problem parameters for which sensitivities are computed This is the array which is per...
virtual void getState(double *y)
Fill in the vector y with the current state of the system.
virtual void preconditionerSolve(double *rhs, double *output)
Evaluate the linear system Ax=b where A is the preconditioner.
virtual void preconditionerSetup(double t, double *y, double gamma)
Evaluate the setup processes for the Jacobian preconditioner.
An error indicating that an unimplemented function has been called.
This file contains definitions of constants, types and terms that are used in internal routines and a...
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
Namespace for the Cantera kernel.