|
2.0.0b10
catchment modelling framework
|
Base class for any kind of integrator. More...
Inheritance diagram for Integrator:
Collaboration diagram for Integrator:Base class for any kind of integrator.
Pure virtual functions:
Public Member Functions | |
| virtual std::string | to_string () const =0 |
| Desrcibes the iterator. | |
Constructors and Destructors | |
| Integrator (real epsilon=1e-9) | |
| Constructs a new Integrator with a new own state vector. | |
| virtual Integrator * | copy () const =0 |
| Polymorphic copy constructor. | |
Integrate | |
| virtual int | integrate (cmf::math::Time t_max, cmf::math::Time dt)=0 |
| Integrates the vector of state variables. | |
| void | integrate_until (cmf::math::Time t_max, cmf::math::Time dt=Time(), bool reset=false) |
| Integrates the vector of state variables until t_max. | |
Protected Attributes | |
Accuracy parameters | |
| const real | Epsilon =1e-9 |
| Tolerable error. | |
model time | |
| cmf::math::Time | m_t |
| Actual time of the solver. | |
| cmf::math::Time | m_dt |
| last time step of the solver | |
| cmf::math::Time | get_t () const |
| Returns the current model time. | |
| void | set_t (cmf::math::Time val) |
| Sets the current model time. | |
| cmf::math::Time | get_dt () const |
| Returns the last time step. | |
| virtual void | reset () |
| Resets any saved history (for multistep methods) | |
|
explicit |
Constructs a new Integrator with a new own state vector.
| epsilon | relative error tolerance per time step (default=1e-9) |
|
pure virtual |
Integrates the vector of state variables.
| t_max | 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 |
| dt | Takes the proposed time step, and changes it into the effectively used time step according to the local stiffness of the problem and MaxTime |
Implemented in ExplicitEuler_fixed, HeunIntegrator, ImplicitEuler, RKFIntegrator, BDF2, CVodeBase, MultiIntegrator, and SoluteWaterIntegrator.
| void integrate_until | ( | cmf::math::Time | t_max, |
| cmf::math::Time | dt = Time(), | ||
| bool | reset = false ) |