2.0.0b10
catchment modelling framework
Loading...
Searching...
No Matches
SoluteWaterIntegrator Class Reference

A SoluteWaterIntegrator implements the cmf::math::Integrator interface, but consists of two independent ODE-solvers. More...

+ Inheritance diagram for SoluteWaterIntegrator:
+ Collaboration diagram for SoluteWaterIntegrator:

Detailed Description

A SoluteWaterIntegrator implements the cmf::math::Integrator interface, but consists of two independent ODE-solvers.

Added statevariables are sorted by waterstorages and solute storages and assigned to the correct solver.

Public Member Functions

 SoluteWaterIntegrator (const cmf::water::solute_vector &solutes, const cmf::math::Integrator &water_integrator, const cmf::math::Integrator &solute_integrator)
 Creates a new SoluteWaterIntegrator.
 
 SoluteWaterIntegrator (const cmf::water::solute_vector &solutes, const cmf::math::Integrator &water_integrator, const cmf::math::Integrator &solute_integrator, const cmf::math::state_list &states)
 Creates a new SoluteWaterIntegrator.
 
cmf::math::SoluteWaterIntegratorcopy () const override
 Polymorphic copy constructor.
 
int integrate (cmf::math::Time t_max, cmf::math::Time dt) override
 Add state variables from a cmf::math::state_list.
 
void reset () override
 Resets the integrators (only needed 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.
 

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.
 

Constructor & Destructor Documentation

◆ SoluteWaterIntegrator() [1/2]

SoluteWaterIntegrator ( const cmf::water::solute_vector & solutes,
const cmf::math::Integrator & water_integrator,
const cmf::math::Integrator & solute_integrator )

Creates a new SoluteWaterIntegrator.

Parameters
solutesSolutes of the project
water_integratorTemplate for the integrator of WaterStorage state variables
solute_integratorTemplate for the integrator of soluteStorage state variables

◆ SoluteWaterIntegrator() [2/2]

SoluteWaterIntegrator ( const cmf::water::solute_vector & solutes,
const cmf::math::Integrator & water_integrator,
const cmf::math::Integrator & solute_integrator,
const cmf::math::state_list & states )

Creates a new SoluteWaterIntegrator.

Parameters
solutesSolutes of the project
water_integratorTemplate for the integrator of WaterStorage state variables
solute_integratorTemplate for the integrator of soluteStorage state variables
statesStates to be added to the integrators

Member Function Documentation

◆ integrate_until()

void integrate_until ( cmf::math::Time t_max,
cmf::math::Time dt = Time(),
bool reset = false )
inherited

Integrates the vector of state variables until t_max.

Parameters
t_maxTime, the solver should run to
dtTime step (may be omitted)
resetIf true, solver is reseted before integration starts