2.0.0b10
catchment modelling framework
|
implicit BDF CVode solver with a Krylov preconditioner More...
implicit BDF CVode solver with a Krylov preconditioner
Public Member Functions | |
virtual cmf::math::num_array | _get_jacobian () const |
Returns a continuous 1D array representing the Jacobian columns concatenated. | |
cmf::math::CVodeKrylov * | copy () const |
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 |
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 | |
int | bandwidth |
Band width of the preconditioner (both sides of the diagonal) | |
CVodeOptions | options |
the limits for the CVode solver, see CVodeOptions | |
char | preconditioner |
Type of the preconditioner 'L'->left, 'R'->right, 'B'->both, 'N'->None, default 'L'. | |
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 | |
|
virtualinherited |
Returns a continuous 1D array representing the Jacobian columns concatenated.
In Python, get_jacobian returns the Jacobian as a 2D array
Reimplemented in CVodeDense.
|
inherited |
Initialize the internal memory.
Automatically called, when one starts to integrate
|
virtualinherited |
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 |