Helios++
Helios software for LiDAR simulations
fluxionum::ParametricIterativeEulerMethod< A, B > Class Template Reference

Parametric iterative Euler method. More...

#include <ParametricIterativeEulerMethod.h>

Inheritance diagram for fluxionum::ParametricIterativeEulerMethod< A, B >:
Collaboration diagram for fluxionum::ParametricIterativeEulerMethod< A, B >:

Public Member Functions

 ParametricIterativeEulerMethod (Function< A, arma::Col< B >> &dydt, A const &t0, arma::Col< B > const &y0)
 ParametricIterativeEulerMethod default constructor. More...
 
arma::Col< B > eval (A const &h) override
 Iteratively compute the next value using Euler method. More...
 
virtual void restart ()
 Restart the ParametricIterativeEulerMethod so it is at its initial state again \(y(t_0) = y_0\).
 
Function< A, B > const & getDydt () const
 
getT () const
 
void setT (A const t)
 
getT0 () const
 
arma::Col< B > getY () const
 
void setY (arma::Col< B > const y)
 
arma::Col< B > getY0 () const
 
- Public Member Functions inherited from fluxionum::Function< A, arma::Col< B > >
 Function ()=default
 
arma::Col< B > operator() (A const &x)
 Evaluate the function \(f(x)=y\). More...
 

Protected Attributes

Function< A, arma::Col< B > > & dydt
 Reference to the parametric derivative function. More...
 
t0
 The initial value of \(t\), \(t_0\). More...
 
t
 The current value of \(t\). More...
 
arma::Col< B > y0
 The initial value of \(\vec{y}\), \(\vec{y}(t_0)\). More...
 
arma::Col< B > y
 The current value of \(\vec{y}(t)\). More...
 

Detailed Description

template<typename A, typename B>
class fluxionum::ParametricIterativeEulerMethod< A, B >

Parametric iterative Euler method.

Author
Alberto M. Esmoris Pena
Version
1.0

\[ \vec{y}(t+h) = \vec{y}(t) + h \frac{d}{dt}\vec{y}(t) \]

The parametric iterative Euler method computes the Euler method for independent vector components assuming at each iteration the given step. It has an error order \(Ch\) where \(h\) is the step size.

See also
fluxionum::Function
fluxionum::IterativeEulerMethod

Constructor & Destructor Documentation

◆ ParametricIterativeEulerMethod()

template<typename A , typename B >
fluxionum::ParametricIterativeEulerMethod< A, B >::ParametricIterativeEulerMethod ( Function< A, arma::Col< B >> &  dydt,
A const &  t0,
arma::Col< B > const &  y0 
)
inline

Member Function Documentation

◆ eval()

template<typename A , typename B >
arma::Col<B> fluxionum::ParametricIterativeEulerMethod< A, B >::eval ( A const &  h)
inlineoverridevirtual

Iteratively compute the next value using Euler method.

It is assumed that the instance knows the current time, the current value and the current derivative. Thus, it can approximate the next value.

Calling this method updates the internal status of the ParametricIterativeEulerMethod so it is representing then ew state at \(t+h\)

Parameters
hThe step size
Returns
The computed vector

Implements fluxionum::Function< A, arma::Col< B > >.

◆ getDydt()

template<typename A , typename B >
Function<A, B> const& fluxionum::ParametricIterativeEulerMethod< A, B >::getDydt ( ) const
inline

◆ getT()

template<typename A , typename B >
A fluxionum::ParametricIterativeEulerMethod< A, B >::getT ( ) const
inline

◆ getT0()

template<typename A , typename B >
A fluxionum::ParametricIterativeEulerMethod< A, B >::getT0 ( ) const
inline

◆ getY()

template<typename A , typename B >
arma::Col<B> fluxionum::ParametricIterativeEulerMethod< A, B >::getY ( ) const
inline

◆ getY0()

template<typename A , typename B >
arma::Col<B> fluxionum::ParametricIterativeEulerMethod< A, B >::getY0 ( ) const
inline

◆ setT()

template<typename A , typename B >
void fluxionum::ParametricIterativeEulerMethod< A, B >::setT ( A const  t)
inline

◆ setY()

template<typename A , typename B >
void fluxionum::ParametricIterativeEulerMethod< A, B >::setY ( arma::Col< B > const  y)
inline

Member Data Documentation

◆ dydt

template<typename A , typename B >
Function<A, arma::Col<B> >& fluxionum::ParametricIterativeEulerMethod< A, B >::dydt
protected

Reference to the parametric derivative function.

\[ \frac{d}{dt}\vec{y}(t) \]

See also
fluxionum::ParametricIterativeEulerMethod::y
fluxionum::ParametricIterativeEulerMethod::t

◆ t

template<typename A , typename B >
A fluxionum::ParametricIterativeEulerMethod< A, B >::t
protected

◆ t0

template<typename A , typename B >
A fluxionum::ParametricIterativeEulerMethod< A, B >::t0
protected

The initial value of \(t\), \(t_0\).

See also
fluxionum::ParametricIterativeEulerMethod::y0

◆ y

template<typename A , typename B >
arma::Col<B> fluxionum::ParametricIterativeEulerMethod< A, B >::y
protected

◆ y0

template<typename A , typename B >
arma::Col<B> fluxionum::ParametricIterativeEulerMethod< A, B >::y0
protected

The initial value of \(\vec{y}\), \(\vec{y}(t_0)\).

See also
fluxionum::ParametricIterativeEulerMethod::t0

The documentation for this class was generated from the following file: