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

The MultiIntegrator is a wrapper for a bunch integrators. The states of the integrators should not have direct connections over integrator boundaries. More...

+ Inheritance diagram for MultiIntegrator:
+ Collaboration diagram for MultiIntegrator:

Detailed Description

The MultiIntegrator is a wrapper for a bunch integrators. The states of the integrators should not have direct connections over integrator boundaries.

Public Member Functions

 MultiIntegrator (const cmf::math::Integrator &template_integrator, int count)
 Creates a new MultiIntegrator.
 
virtual cmf::math::MultiIntegratorcopy () const
 Polymorphic copy constructor.
 
int integrate (cmf::math::Time t_max, cmf::math::Time dt)
 Integrates the vector of state variables.
 
virtual void reset ()
 Resets the integrator.
 
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 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
 

Constructor & Destructor Documentation

◆ MultiIntegrator()

MultiIntegrator ( const cmf::math::Integrator & template_integrator,
int count )

Creates a new MultiIntegrator.

Parameters
template_integratorTemplate for the integrators
countNumber of integrators

Member Function Documentation

◆ integrate()

int integrate ( cmf::math::Time t_max,
cmf::math::Time dt )
virtual

Integrates the vector of state variables.

Parameters
t_maxTo 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
dtTakes 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.

◆ 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