Integrates a vector of cmf::math::StateVariable with the Runge-Kutta-Fehlberg (RKF54) method.
More...
Integrates a vector of cmf::math::StateVariable with the Runge-Kutta-Fehlberg (RKF54) method.
|
|
void | AdjustTimestep (Time &TimeStep, Time MaxTime) |
| | Protected function to adjust the step width for stability reasons.
|
| |
|
|
|
const real | Epsilon =1e-9 |
| | Tolerable error.
|
| |
◆ RKFIntegrator() [1/2]
Constructs a new RKFIntegrator from a pointer to a vector of state variables.
- Note
- The RKF Integrator becomes the owner of states
- Parameters
-
| states | Statevariables of the system |
| epsilon | relative error tolerance per time step (default=1e-9) |
| dt_min | minimum time step (default=1s) |
◆ RKFIntegrator() [2/2]
Constructs a new RKFIntegrator.
- Parameters
-
| epsilon | relative error tolerance per time step (default=1e-9) |
| dt_min | minimum time step (default=1s) |
◆ integrate()
Integrates the vector of state variables.
- Parameters
-
| MaxTime | To stop the model (if running in a model framework) at time steps of value exchange e.g. full hours, the next value exchange time can be given |
| TimeStep | Takes the proposed timestep, and changes it into the effictivly used timestep according to the local stiffness of the problem and MaxTime |
Implements Integrator.
◆ integrate_until()
Integrates the vector of state variables until t_max.
- Parameters
-
| t_max | Time, the solver should run to |
| dt | Time step (may be omitted) |
| reset | If true, solver is reseted before integration starts |