Cantera
2.1.2
|
Wrapper class for 'cvode' integrator from LLNL. More...
#include <CVodeInt.h>
Public Member Functions | |
CVodeInt () | |
virtual void | setTolerances (double reltol, size_t n, double *abstol) |
Set or reset the number of equations. More... | |
virtual void | setTolerances (double reltol, double abstol) |
Set error tolerances. More... | |
virtual void | setProblemType (int probtype) |
Set the problem type. More... | |
virtual void | initialize (double t0, FuncEval &func) |
Initialize the integrator for a new problem. More... | |
virtual void | reinitialize (double t0, FuncEval &func) |
virtual void | integrate (double tout) |
Integrate the system of equations. More... | |
virtual doublereal | step (double tout) |
Integrate the system of equations. More... | |
virtual double & | solution (size_t k) |
The current value of the solution of equation k. More... | |
virtual double * | solution () |
The current value of the solution of the system of equations. More... | |
virtual int | nEquations () const |
The number of equations. More... | |
virtual int | nEvals () const |
The number of function evaluations. More... | |
virtual void | setMaxOrder (int n) |
Set the maximum integration order that will be used. More... | |
virtual void | setMethod (MethodType t) |
Set the solution method. More... | |
virtual void | setIterator (IterType t) |
Set the linear iterator. More... | |
virtual void | setMaxStepSize (double hmax) |
Set the maximum step size. More... | |
virtual void | setMinStepSize (double hmin) |
Set the minimum step size. More... | |
virtual void | setMaxSteps (int nmax) |
virtual void | setMaxErrTestFails (int nmax) |
Set the maximum permissible number of error test failures. More... | |
Public Member Functions inherited from Integrator | |
Integrator () | |
Default Constructor. More... | |
virtual | ~Integrator () |
Destructor. More... | |
virtual void | setSensitivityTolerances (doublereal reltol, doublereal abstol) |
Set the sensitivity error tolerances. More... | |
virtual void | setBandwidth (int N_Upper, int N_Lower) |
virtual int | nSensParams () |
virtual double | sensitivity (size_t k, size_t p) |
Private Attributes | |
int | m_neq |
void * | m_cvode_mem |
double | m_t0 |
N_Vector | m_y |
N_Vector | m_abstol |
int | m_type |
int | m_itol |
int | m_method |
int | m_iter |
int | m_maxord |
double | m_reltol |
double | m_abstols |
int | m_nabs |
double | m_hmax |
double | m_hmin |
int | m_maxsteps |
vector_fp | m_ropt |
long int * | m_iopt |
void * | m_data |
Wrapper class for 'cvode' integrator from LLNL.
The unmodified cvode code is in directory ext/cvode.
Definition at line 34 of file CVodeInt.h.
CVodeInt | ( | ) |
Constructor. Default settings: dense jacobian, no user-supplied Jacobian function, Newton iteration.
Definition at line 79 of file CVodeInt.cpp.
|
virtual |
Set or reset the number of equations.
Set error tolerances.
reltol | scalar relative tolerance |
n | Number of equations |
abstol | array of N absolute tolerance values |
Reimplemented from Integrator.
Definition at line 123 of file CVodeInt.cpp.
|
virtual |
Set error tolerances.
reltol | scalar relative tolerance |
abstol | scalar absolute tolerance |
Reimplemented from Integrator.
Definition at line 139 of file CVodeInt.cpp.
|
virtual |
Set the problem type.
probtype | Type of the problem |
Reimplemented from Integrator.
Definition at line 146 of file CVodeInt.cpp.
|
virtual |
Initialize the integrator for a new problem.
Call after all options have been set.
t0 | initial time |
func | RHS evaluator object for system of equations. |
Reimplemented from Integrator.
Definition at line 191 of file CVodeInt.cpp.
References cvode_jac(), cvode_rhs(), DATA_PTR, FuncEval::getInitialConditions(), and FuncEval::neq().
|
virtual |
Integrate the system of equations.
tout | Integrate to this time. Note that this is the absolute time value, not a time interval. |
Reimplemented from Integrator.
Definition at line 293 of file CVodeInt.cpp.
References Cantera::int2str().
|
virtual |
Integrate the system of equations.
tout | integrate to this time. Note that this is the absolute time value, not a time interval. |
Reimplemented from Integrator.
Definition at line 303 of file CVodeInt.cpp.
References Cantera::int2str().
|
virtual |
The current value of the solution of equation k.
Reimplemented from Integrator.
Definition at line 114 of file CVodeInt.cpp.
|
virtual |
The current value of the solution of the system of equations.
Reimplemented from Integrator.
Definition at line 118 of file CVodeInt.cpp.
|
inlinevirtual |
|
virtual |
The number of function evaluations.
Reimplemented from Integrator.
Definition at line 314 of file CVodeInt.cpp.
|
inlinevirtual |
Set the maximum integration order that will be used.
Reimplemented from Integrator.
Definition at line 56 of file CVodeInt.h.
|
virtual |
Set the solution method.
Reimplemented from Integrator.
Definition at line 151 of file CVodeInt.cpp.
References Cantera::Adams_Method, and Cantera::BDF_Method.
|
virtual |
Set the linear iterator.
Reimplemented from Integrator.
Definition at line 180 of file CVodeInt.cpp.
References Cantera::Functional_Iter, and Cantera::Newton_Iter.
|
virtual |
Set the maximum step size.
Reimplemented from Integrator.
Definition at line 162 of file CVodeInt.cpp.
|
virtual |
Set the minimum step size.
Reimplemented from Integrator.
Definition at line 168 of file CVodeInt.cpp.
|
inlinevirtual |
Set the maximum permissible number of error test failures.
Reimplemented from Integrator.
Definition at line 64 of file CVodeInt.h.