Abstract base class for ODE system integrators. More...
#include <Integrator.h>
Abstract base class for ODE system integrators.
Definition at line 43 of file Integrator.h.
Public Member Functions | |
| Integrator () | |
| Default Constructor. | |
| virtual | ~Integrator () |
| Destructor. | |
| virtual void | setTolerances (double reltol, size_t n, double *abstol) |
| Set error tolerances. | |
| virtual void | setTolerances (double reltol, double abstol) |
| Set error tolerances. | |
| virtual void | setSensitivityTolerances (double reltol, double abstol) |
| Set the sensitivity error tolerances. | |
| virtual void | setLinearSolverType (const string &linSolverType) |
| Set the linear solver type. | |
| virtual void | setRootFunctionCount (size_t nroots) |
| Configure how many event/root functions the integrator should monitor. | |
| virtual double | currentTime () const =0 |
| Current value of the independent variable tracked by the integrator. | |
| virtual void | setPreconditioner (shared_ptr< SystemJacobian > preconditioner) |
| Set preconditioner used by the linear solver. | |
| virtual void | preconditionerSolve (size_t stateSize, double *rhs, double *output) |
| Solve a linear system Ax=b where A is the preconditioner. | |
| virtual PreconditionerSide | preconditionerSide () |
| Return the side of the system on which the preconditioner is applied. | |
| virtual shared_ptr< SystemJacobian > | preconditioner () |
| Return preconditioner reference to object. | |
| virtual string | linearSolverType () const |
| Return the integrator problem type. | |
| virtual void | initialize (double t0, FuncEval &func) |
| Initialize the integrator for a new problem. | |
| virtual void | reinitialize (double t0, FuncEval &func) |
| virtual void | integrate (double tout) |
| Integrate the system of equations. | |
| virtual double | step (double tout) |
| Integrate the system of equations. | |
| virtual double & | solution (size_t k) |
| The current value of the solution of equation k. | |
| virtual double * | solution () |
| The current value of the solution of the system of equations. | |
| virtual double * | derivative (double tout, int n) |
| n-th derivative of the output function at time tout. | |
| virtual int | lastOrder () const |
| Order used during the last solution step. | |
| virtual int | nEquations () const |
| The number of equations. | |
| virtual int | nEvals () const |
| The number of function evaluations. | |
| virtual int | maxOrder () const |
| virtual void | setMaxOrder (int n) |
| Set the maximum integration order that will be used. | |
| virtual void | setMethod (MethodType t) |
| Set the solution method. | |
| virtual void | setMaxStepSize (double hmax) |
| Set the maximum step size. | |
| virtual void | setMinStepSize (double hmin) |
| Set the minimum step size. | |
| virtual void | setMaxErrTestFails (int n) |
| Set the maximum permissible number of error test failures. | |
| virtual void | setMaxSteps (int nmax) |
| Set the maximum number of time-steps the integrator can take before reaching the next output time. | |
| virtual int | maxSteps () |
| Returns the maximum number of time-steps the integrator can take before reaching the next output time. | |
| virtual void | setBandwidth (int N_Upper, int N_Lower) |
| virtual int | nSensParams () |
| virtual double | sensitivity (size_t k, size_t p) |
| virtual AnyMap | solverStats () const |
| Get solver stats from integrator. | |
| virtual int | maxNonlinIterations () const |
| virtual void | setMaxNonlinIterations (int n) |
| virtual int | maxNonlinConvFailures () const |
| virtual void | setMaxNonlinConvFailures (int n) |
| virtual bool | algebraicInErrorTest () const |
| virtual void | includeAlgebraicInErrorTest (bool yesno) |
Protected Attributes | |
| shared_ptr< SystemJacobian > | m_preconditioner |
| Pointer to preconditioner object used in integration which is set by setPreconditioner and initialized inside of ReactorNet::initialize() | |
| PreconditionerSide | m_prec_side = PreconditionerSide::NO_PRECONDITION |
| Type of preconditioning used in applyOptions. | |
Private Member Functions | |
| void | warn (const string &msg) const |
Private Attributes | |
| double | m_dummy |
|
inline |
Default Constructor.
Definition at line 47 of file Integrator.h.
|
inlinevirtual |
Destructor.
Definition at line 51 of file Integrator.h.
|
inlinevirtual |
Set error tolerances.
| reltol | scalar relative tolerance |
| n | Number of equations |
| abstol | array of N absolute tolerance values |
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 60 of file Integrator.h.
|
inlinevirtual |
Set error tolerances.
| reltol | scalar relative tolerance |
| abstol | scalar absolute tolerance |
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 70 of file Integrator.h.
|
inlinevirtual |
Set the sensitivity error tolerances.
| reltol | scalar relative tolerance |
| abstol | scalar absolute tolerance |
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 79 of file Integrator.h.
|
inlinevirtual |
Set the linear solver type.
| linSolverType | Type of the linear solver |
Reimplemented in IdasIntegrator, and CVodesIntegrator.
Definition at line 86 of file Integrator.h.
|
inlinevirtual |
Configure how many event/root functions the integrator should monitor.
Callers toggle this to enable/disable root finding on the fly (when ReactorNet enforces advance limits).
| nroots | Number of root functions |
Reimplemented in CVodesIntegrator.
Definition at line 96 of file Integrator.h.
|
pure virtual |
Current value of the independent variable tracked by the integrator.
Implemented in CVodesIntegrator, and IdasIntegrator.
|
inlinevirtual |
Set preconditioner used by the linear solver.
| preconditioner | preconditioner object used for the linear solver |
Definition at line 105 of file Integrator.h.
|
inlinevirtual |
Solve a linear system Ax=b where A is the preconditioner.
| [in] | stateSize | length of the rhs and output vectors |
| [in] | rhs | right hand side vector used in linear system |
| [out] | output | output vector for solution |
Definition at line 127 of file Integrator.h.
|
inlinevirtual |
Return the side of the system on which the preconditioner is applied.
Definition at line 132 of file Integrator.h.
|
inlinevirtual |
Return preconditioner reference to object.
Definition at line 137 of file Integrator.h.
|
inlinevirtual |
Return the integrator problem type.
Reimplemented in CVodesIntegrator.
Definition at line 142 of file Integrator.h.
|
inlinevirtual |
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 in CVodesIntegrator, and IdasIntegrator.
Definition at line 153 of file Integrator.h.
|
inlinevirtual |
Definition at line 157 of file Integrator.h.
|
inlinevirtual |
Integrate the system of equations.
| tout | Integrate to this time. Note that this is the absolute time value, not a time interval. |
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 166 of file Integrator.h.
|
inlinevirtual |
Integrate the system of equations.
| tout | integrate to this time. Note that this is the absolute time value, not a time interval. |
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 175 of file Integrator.h.
|
inlinevirtual |
The current value of the solution of equation k.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 181 of file Integrator.h.
|
inlinevirtual |
The current value of the solution of the system of equations.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 187 of file Integrator.h.
|
inlinevirtual |
n-th derivative of the output function at time tout.
Reimplemented in CVodesIntegrator.
Definition at line 193 of file Integrator.h.
|
inlinevirtual |
Order used during the last solution step.
Reimplemented in CVodesIntegrator.
Definition at line 199 of file Integrator.h.
|
inlinevirtual |
The number of equations.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 205 of file Integrator.h.
|
inlinevirtual |
The number of function evaluations.
Reimplemented in CVodesIntegrator.
Definition at line 211 of file Integrator.h.
|
inlinevirtual |
Definition at line 216 of file Integrator.h.
|
inlinevirtual |
Set the maximum integration order that will be used.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 222 of file Integrator.h.
|
inlinevirtual |
Set the solution method.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 227 of file Integrator.h.
|
inlinevirtual |
Set the maximum step size.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 232 of file Integrator.h.
|
inlinevirtual |
Set the minimum step size.
Reimplemented in CVodesIntegrator.
Definition at line 237 of file Integrator.h.
|
inlinevirtual |
Set the maximum permissible number of error test failures.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 242 of file Integrator.h.
|
inlinevirtual |
Set the maximum number of time-steps the integrator can take before reaching the next output time.
| nmax | The maximum number of steps, setting this value to zero disables this option. |
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 250 of file Integrator.h.
|
inlinevirtual |
Returns the maximum number of time-steps the integrator can take before reaching the next output time.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 256 of file Integrator.h.
|
inlinevirtual |
Definition at line 261 of file Integrator.h.
|
inlinevirtual |
Definition at line 265 of file Integrator.h.
|
inlinevirtual |
Definition at line 270 of file Integrator.h.
|
inlinevirtual |
Get solver stats from integrator.
Reimplemented in CVodesIntegrator, and IdasIntegrator.
Definition at line 276 of file Integrator.h.
|
inlinevirtual |
Definition at line 282 of file Integrator.h.
|
inlinevirtual |
Definition at line 286 of file Integrator.h.
|
inlinevirtual |
Definition at line 290 of file Integrator.h.
|
inlinevirtual |
Definition at line 294 of file Integrator.h.
|
inlinevirtual |
Definition at line 298 of file Integrator.h.
|
inlinevirtual |
Definition at line 302 of file Integrator.h.
|
inlineprivate |
Definition at line 317 of file Integrator.h.
|
protected |
Pointer to preconditioner object used in integration which is set by setPreconditioner and initialized inside of ReactorNet::initialize()
Definition at line 310 of file Integrator.h.
|
protected |
Type of preconditioning used in applyOptions.
Definition at line 312 of file Integrator.h.
|
private |
Definition at line 316 of file Integrator.h.