EulerMaruyamaIntegratorCore< FP > Class Template Reference

CPP API: mio::EulerMaruyamaIntegratorCore< FP > Class Template Reference
mio::EulerMaruyamaIntegratorCore< FP > Class Template Reference

Simple explicit integration y(t+1) = y(t) + h*f(t,y) + sqrt(h) * noise_f(t,y) for SDE systems. More...

#include <euler_maruyama.h>

Inheritance diagram for mio::EulerMaruyamaIntegratorCore< FP >:
Collaboration diagram for mio::EulerMaruyamaIntegratorCore< FP >:

Public Member Functions

std::unique_ptr< SdeIntegratorCore< FP > > clone () const override
 
 EulerMaruyamaIntegratorCore ()
 
bool step (const DerivFunction< FP > &f, const DerivFunction< FP > &noise_f, Eigen::Ref< const Eigen::VectorX< FP >> yt, FP &t, FP &dt, Eigen::Ref< Eigen::VectorX< FP >> ytp1) const override
 Fixed step width integrator for stochastic models. More...
 
- Public Member Functions inherited from mio::IntegratorCore< FP, Integrands >
 IntegratorCore (const FP &dt_min, const FP &dt_max)
 Initialize an IntegratorCore. More...
 
virtual bool step (const Integrands &... fs, Eigen::Ref< const Eigen::VectorX< FP >> yt, FP &t, FP &dt, Eigen::Ref< Eigen::VectorX< FP >> ytp1) const =0
 Make a single integration step. More...
 
virtual ~IntegratorCore ()
 
FP & get_dt_min ()
 Access lower bound to the step size dt. More...
 
const FP & get_dt_min () const
 Access lower bound to the step size dt. More...
 
FP & get_dt_max ()
 Access upper bound to the step size dt. More...
 
const FP & get_dt_max () const
 Access upper bound to the step size dt. More...
 

Detailed Description

template<typename FP>
class mio::EulerMaruyamaIntegratorCore< FP >

Simple explicit integration y(t+1) = y(t) + h*f(t,y) + sqrt(h) * noise_f(t,y) for SDE systems.

Template Parameters
FPA floating point type, e.g., ScalarType.

Constructor & Destructor Documentation

◆ EulerMaruyamaIntegratorCore()

template<typename FP >
mio::EulerMaruyamaIntegratorCore< FP >::EulerMaruyamaIntegratorCore ( )
inline

Member Function Documentation

◆ clone()

template<typename FP >
std::unique_ptr<SdeIntegratorCore<FP> > mio::EulerMaruyamaIntegratorCore< FP >::clone ( ) const
inlineoverridevirtual

◆ step()

template<typename FP >
bool mio::EulerMaruyamaIntegratorCore< FP >::step ( const DerivFunction< FP > &  f,
const DerivFunction< FP > &  noise_f,
Eigen::Ref< const Eigen::VectorX< FP >>  yt,
FP &  t,
FP &  dt,
Eigen::Ref< Eigen::VectorX< FP >>  ytp1 
) const
inlineoverride

Fixed step width integrator for stochastic models.

Expects population-based integrands, i.e. not flows.

Parameters
[in]fDeterministic part of the stochastic differential equation.
[in]noise_fStochastic part of the stochastic differential equation.
[in]ytValue of y at t, y(t).
[in,out]tCurrent time. Overwritten with t+dt.
[in]dtCurrent time step size h=dt.
[out]ytp1The approximated value of y(t+dt).