2.0.0b10
catchment modelling framework
|
Abstract base class for different modes of the CVode solver. More...
Abstract base class for different modes of the CVode solver.
Initantiate one of the child classes to gain different modes of the CVode solver
Public Member Functions | |
virtual cmf::math::num_array | _get_jacobian () const |
Returns a continuous 1D array representing the Jacobian columns concatenated. | |
CVodeBase * | copy () const override=0 |
Returns a copy of the solver. | |
cmf::math::num_array | get_error () const |
Error vector of the integrator. | |
CVodeInfo | get_info () const |
Returns the current solver statistics. | |
int | initialize () |
Initialize the internal memory. | |
virtual int | integrate (cmf::math::Time t_max, cmf::math::Time dt) |
Integrates the vector of state variables. | |
virtual void | reset () |
Resets the history of the multispte solver and overwrites the internal state cache. | |
void | set_error_msg (std::string error) |
Sets an error message. | |
std::string | to_string () const override=0 |
Returns a string representation of the solver. | |
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 | |
CVodeOptions | options |
the limits for the CVode solver, see CVodeOptions | |
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 |
Returns a continuous 1D array representing the Jacobian columns concatenated.
In Python, get_jacobian returns the Jacobian as a 2D array
Reimplemented in CVodeDense.
int initialize | ( | ) |
Initialize the internal memory.
Automatically called, when one starts to integrate
|
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 |
Implements Integrator.
|
inherited |