Cantera 2.6.0

Public Member Functions | Private Member Functions | Private Attributes | List of all members
Integrator Class Reference
ODE Integrators

Abstract base class for ODE system integrators. More...

`#include <Integrator.h>`

Inheritance diagram for Integrator:
[legend]

## Public Member Functions
| Integrator ()
| Default Constructor. More...
virtual | ~Integrator ()
| Destructor. More...
virtual void | setTolerances (doublereal reltol, size_t n, doublereal *abstol)
| Set error tolerances. More...
virtual void | setTolerances (doublereal reltol, doublereal abstol)
| Set error tolerances. More...
virtual void | setSensitivityTolerances (doublereal reltol, doublereal abstol)
| Set the sensitivity error tolerances. More...
virtual void | setProblemType (int probtype)
| Set the problem type. More...
virtual void | initialize (doublereal t0, FuncEval &func)
| Initialize the integrator for a new problem. More...
virtual void | reinitialize (doublereal t0, FuncEval &func)
virtual void | integrate (doublereal tout)
| Integrate the system of equations. More...
virtual doublereal | step (doublereal tout)
| Integrate the system of equations. More...
virtual doublereal & | solution (size_t k)
| The current value of the solution of equation k. More...
virtual doublereal * | solution ()
| The current value of the solution of the system of equations. More...
virtual double * | derivative (double tout, int n)
| n-th derivative of the output function at time tout. More...
virtual int | lastOrder () const
| Order used during the last solution step. 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 | setMaxStepSize (double hmax)
| Set the maximum step size. More...
virtual void | setMinStepSize (double hmin)
| Set the minimum step size. More...
virtual void | setMaxErrTestFails (int n)
| Set the maximum permissible number of error test failures. More...
virtual void | setMaxSteps (int nmax)
| Set the maximum number of time-steps the integrator can take before reaching the next output time. More...
virtual int | maxSteps ()
| Returns the maximum number of time-steps the integrator can take before reaching the next output time. More...
virtual void | setBandwidth (int N_Upper, int N_Lower)
virtual int | nSensParams ()
virtual double | sensitivity (size_t k, size_t p)

## Private Member Functions
void | warn (const std::string &msg) const

## Private Attributes
doublereal | m_dummy

## Detailed Description

Abstract base class for ODE system integrators.

Definition at line 52 of file Integrator.h.

## Constructor & Destructor Documentation

## ◆ Integrator()

Integrator | ( |  | ) |
| inline

Default Constructor.

Definition at line 56 of file Integrator.h.

## ◆ ~Integrator()

virtual ~Integrator | ( |  | ) |
| inline virtual

Destructor.

Definition at line 60 of file Integrator.h.

## Member Function Documentation

## ◆ setTolerances() [1/2]

virtual void setTolerances | ( | doublereal | reltol,
|  | size_t | n,
|  | doublereal * | abstol
| ) |  |
| inline virtual

Set error tolerances.

Parameters

  reltol | scalar relative tolerance
  n | Number of equations
  abstol | array of N absolute tolerance values

Reimplemented in CVodesIntegrator.

Definition at line 69 of file Integrator.h.

## ◆ setTolerances() [2/2]

virtual void setTolerances | ( | doublereal | reltol,
|  | doublereal | abstol
| ) |  |
| inline virtual

Set error tolerances.

Parameters

  reltol | scalar relative tolerance
  abstol | scalar absolute tolerance

Reimplemented in CVodesIntegrator.

Definition at line 79 of file Integrator.h.

## ◆ setSensitivityTolerances()

virtual void setSensitivityTolerances | ( | doublereal | reltol,
|  | doublereal | abstol
| ) |  |
| inline virtual

Set the sensitivity error tolerances.

Parameters

  reltol | scalar relative tolerance
  abstol | scalar absolute tolerance

Reimplemented in CVodesIntegrator.

Definition at line 88 of file Integrator.h.

## ◆ setProblemType()

virtual void setProblemType | ( | int | probtype | ) |
| inline virtual

Set the problem type.

Parameters

  probtype | Type of the problem

Reimplemented in CVodesIntegrator.

Definition at line 95 of file Integrator.h.

## ◆ initialize()

virtual void initialize | ( | doublereal | t0,
|  | FuncEval & | func
| ) |  |
| inline virtual

Initialize the integrator for a new problem.

Call after all options have been set.

Parameters

  t0 | initial time
  func | RHS evaluator object for system of equations.

Reimplemented in CVodesIntegrator.

Definition at line 105 of file Integrator.h.

## ◆ reinitialize()

virtual void reinitialize | ( | doublereal | t0,
|  | FuncEval & | func
| ) |  |
| inline virtual

Definition at line 109 of file Integrator.h.

## ◆ integrate()

virtual void integrate | ( | doublereal | tout | ) |
| inline virtual

Integrate the system of equations.

Parameters

  tout | Integrate to this time. Note that this is the absolute time value, not a time interval.

Reimplemented in CVodesIntegrator.

Definition at line 118 of file Integrator.h.

## ◆ step()

virtual doublereal step | ( | doublereal | tout | ) |
| inline virtual

Integrate the system of equations.

Parameters

  tout | integrate to this time. Note that this is the absolute time value, not a time interval.

Reimplemented in CVodesIntegrator.

Definition at line 127 of file Integrator.h.

## ◆ solution() [1/2]

virtual doublereal & solution | ( | size_t | k | ) |
| inline virtual

The current value of the solution of equation k.

Reimplemented in CVodesIntegrator.

Definition at line 133 of file Integrator.h.

## ◆ solution() [2/2]

virtual doublereal * solution | ( |  | ) |
| inline virtual

The current value of the solution of the system of equations.

Reimplemented in CVodesIntegrator.

Definition at line 139 of file Integrator.h.

## ◆ derivative()

virtual double * derivative | ( | double | tout,
|  | int | n
| ) |  |
| inline virtual

n-th derivative of the output function at time tout.

Reimplemented in CVodesIntegrator.

Definition at line 145 of file Integrator.h.

## ◆ lastOrder()

virtual int lastOrder | ( |  | ) | const
| inline virtual

Order used during the last solution step.

Reimplemented in CVodesIntegrator.

Definition at line 151 of file Integrator.h.

## ◆ nEquations()

virtual int nEquations | ( |  | ) | const
| inline virtual

The number of equations.

Reimplemented in CVodesIntegrator.

Definition at line 157 of file Integrator.h.

## ◆ nEvals()

virtual int nEvals | ( |  | ) | const
| inline virtual

The number of function evaluations.

Reimplemented in CVodesIntegrator.

Definition at line 163 of file Integrator.h.

## ◆ setMaxOrder()

virtual void setMaxOrder | ( | int | n | ) |
| inline virtual

Set the maximum integration order that will be used.

Reimplemented in CVodesIntegrator.

Definition at line 169 of file Integrator.h.

## ◆ setMethod()

virtual void setMethod | ( | MethodType | t | ) |
| inline virtual

Set the solution method.

Reimplemented in CVodesIntegrator.

Definition at line 174 of file Integrator.h.

## ◆ setMaxStepSize()

virtual void setMaxStepSize | ( | double | hmax | ) |
| inline virtual

Set the maximum step size.

Reimplemented in CVodesIntegrator.

Definition at line 179 of file Integrator.h.

## ◆ setMinStepSize()

virtual void setMinStepSize | ( | double | hmin | ) |
| inline virtual

Set the minimum step size.

Reimplemented in CVodesIntegrator.

Definition at line 184 of file Integrator.h.

## ◆ setMaxErrTestFails()

virtual void setMaxErrTestFails | ( | int | n | ) |
| inline virtual

Set the maximum permissible number of error test failures.

Reimplemented in CVodesIntegrator.

Definition at line 189 of file Integrator.h.

## ◆ setMaxSteps()

virtual void setMaxSteps | ( | int | nmax | ) |
| inline virtual

Set the maximum number of time-steps the integrator can take before reaching the next output time.

Parameters

  nmax | The maximum number of steps, setting this value to zero disables this option.

Reimplemented in CVodesIntegrator.

Definition at line 197 of file Integrator.h.

## ◆ maxSteps()

virtual int maxSteps | ( |  | ) |
| inline virtual

Returns the maximum number of time-steps the integrator can take before reaching the next output time.

Reimplemented in CVodesIntegrator.

Definition at line 203 of file Integrator.h.

## ◆ setBandwidth()

virtual void setBandwidth | ( | int | N_Upper,
|  | int | N_Lower
| ) |  |
| inline virtual

Definition at line 208 of file Integrator.h.

## ◆ nSensParams()

virtual int nSensParams | ( |  | ) |
| inline virtual

Definition at line 212 of file Integrator.h.

## ◆ sensitivity()

virtual double sensitivity | ( | size_t | k,
|  | size_t | p
| ) |  |
| inline virtual

Definition at line 217 of file Integrator.h.

## ◆ warn()

void warn | ( | const std::string & | msg | ) | const
| inline private

Definition at line 224 of file Integrator.h.

## Member Data Documentation

## ◆ m_dummy

doublereal m_dummy
| private

Definition at line 223 of file Integrator.h.

The documentation for this class was generated from the following file:

- Integrator.h