|
2.0.0b10
catchment modelling framework
|
A simple predictor - corrector solver. More...
Inheritance diagram for HeunIntegrator:
Collaboration diagram for HeunIntegrator:A simple predictor - corrector solver.
Not tested and very experimentally \( y^{n+1} = y^n + \alpha f(y^n + f(y^n)dt)dt + (1-\alpha)f(y^n)dt \)
Public Member Functions | |
| HeunIntegrator (const cmf::math::state_list &states, real Alpha=0.5) | |
| Constructs a new PredictCorrectSimple from a pointer to a vector of state variables. | |
| HeunIntegrator (const Integrator ©) | |
| copy constructor | |
| HeunIntegrator (real Alpha=0.5) | |
| Constructs a new Heun integrator. | |
| virtual Integrator * | copy () const |
| Polymorphic copy constructor. | |
| 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) | |
| std::string | to_string () const override |
| Desrcibes the iterator. | |
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. | |
Public Attributes | |
| real | alpha |
| Alpha Weight factor \(\alpha\) to weight \(f(y^n)\) and \(f(y^{n+1})\). | |
Protected Attributes | |
Accuracy parameters | |
| const real | Epsilon =1e-9 |
| Tolerable error. | |
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 | |
|
explicit |
Constructs a new PredictCorrectSimple from a pointer to a vector of state variables.
| states | Statevariable owner of the system |
| Alpha | Weight factor \(\alpha\) to weight \(f(y^n)\) and \(f(y^{n+1})\) |
| HeunIntegrator | ( | real | Alpha = 0.5 | ) |
Constructs a new Heun integrator.
| Alpha | Weight factor \(\alpha\) to weight \(f(y^n)\) and \(f(y^{n+1})\) |
|
virtual |
Integrates the vector of state variables.
| MaxTime | (ignored) 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 time step |
Implements Integrator.
|
inherited |