2.0.0b10
catchment modelling framework
|
An implicit (backward) Euler integrator using fixpoint iteration. More...
An implicit (backward) Euler integrator using fixpoint iteration.
Public Member Functions | |
Integrate | |
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. | |
Internal data storages | |
Time | dt_min |
The shortest allowed timestep. | |
ImplicitEuler (const cmf::math::state_list &states, real epsilon=1e-9, cmf::math::Time tStepMin=cmf::math::timespan(10)) | |
Constructs a new FixPointImplicitEuler from a pointer to a vector of state variables. | |
ImplicitEuler (real epsilon=1e-9, cmf::math::Time tStepMin=cmf::math::timespan(10)) | |
Constructs a new FixPointImplicitEuler. | |
ImplicitEuler (const Integrator &) | |
copy constructor | |
virtual Integrator * | copy () const |
Polymorphic copy constructor. | |
std::string | to_string () const override |
Desrcibes the iterator. | |
int | integrate (cmf::math::Time MaxTime, cmf::math::Time TimeStep) |
Integrates the vector of state variables. | |
void | reset () override |
Resets any saved history (for multistep methods) | |
model time | |
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. | |
cmf::math::Time | m_t |
Actual time of the solver. | |
cmf::math::Time | m_dt |
last time step of the solver | |
ImplicitEuler | ( | const cmf::math::state_list & | states, |
real | epsilon = 1e-9, | ||
cmf::math::Time | tStepMin = cmf::math::timespan(10) ) |
Constructs a new FixPointImplicitEuler from a pointer to a vector of state variables.
states | Statevariables of the system |
epsilon | relative error tolerance per time step (default=1e-9) |
tStepMin | minimum time step (default=10s) |
ImplicitEuler | ( | real | epsilon = 1e-9, |
cmf::math::Time | tStepMin = cmf::math::timespan(10) ) |
Constructs a new FixPointImplicitEuler.
epsilon | relative error tolerance per time step (default=1e-9) |
tStepMin | minimum time step (default=10s) |
|
virtual |
Integrates the vector of state variables.
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.
|
inherited |