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

Fixed iterative Euler method. More...

#include <FixedIterativeEulerMethod.h>

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

Public Member Functions

 FixedIterativeEulerMethod (Function< A, B > &dydt, A const &t0, B const &y0, arma::Col< A > const &ta, arma::Col< B > const &ya, size_t const i=0)
 FixedIterativeEulerMethod default constructor. More...
 
eval (A const &h) override
 Compute the iterative Euler method but considering given fixed frontiers. More...
 
void restart () override
 
arma::Col< A > const & getTa () const
 
arma::Col< B > const & getYa () const
 
size_t getCurrentPieceIndex () const
 
void setCurrentPieceIndex (size_t const i)
 
- Public Member Functions inherited from fluxionum::IterativeEulerMethod< A, B >
 IterativeEulerMethod (Function< A, B > &dydt, A const &t0, B const &y0)
 IterativeEulerMethod default constructor. More...
 
eval (A const &h) override
 Iteratively compute the next value using Euler method. More...
 
Function< A, B > const & getDydt () const
 
getT () const
 
void setT (A const t)
 
getT0 () const
 
getY () const
 
void setY (B const y)
 
getY0 () const
 
- Public Member Functions inherited from fluxionum::Function< A, B >
 Function ()=default
 
operator() (A const &x)
 Evaluate the function \(f(x)=y\). More...
 

Protected Attributes

arma::Col< A > const & ta
 The \(m\) frontiers such that \(\forall t,\, \exists i \ni t \in [a_i, a_{i+1})\). For the last frontier, the interval is \([a_{m}, \infty)\).
 
arma::Col< B > const & ya
 The value of \(y(t_i)\) at each of the \(m\) frontiers such that \(\forall i,\, y_i = y(t_i)\).
 
size_t i
 The index of the current piece. More...
 
- Protected Attributes inherited from fluxionum::IterativeEulerMethod< A, B >
Function< A, B > & dydt
 Reference to the derivative function. More...
 
t0
 The initial value of \(t\), \(t_0\). More...
 
t
 The current value of \(t\). More...
 
y0
 The initial value of \(y\), \(y(t_0)\). More...
 
y
 The current value of \(y(t)\). More...
 

Detailed Description

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

Fixed iterative Euler method.

Author
Alberto M. Esmoris Pena
Version
1.0

It is like the IterativeEulerMethod, but the values at the frontiers are given and thus can be used to fix/correct the function value at those points. This helps preserving the stability of the approximation, specially for those cases which have a significant number of frontiers

See also
fluxionum::IterativeEulerMethod
fluxionum::FixedParametricIterativeEulerMethod
fluxionum::Function

Constructor & Destructor Documentation

◆ FixedIterativeEulerMethod()

template<typename A , typename B >
fluxionum::FixedIterativeEulerMethod< A, B >::FixedIterativeEulerMethod ( Function< A, B > &  dydt,
A const &  t0,
B const &  y0,
arma::Col< A > const &  ta,
arma::Col< B > const &  ya,
size_t const  i = 0 
)
inline

FixedIterativeEulerMethod default constructor.

Parameters
iThe index of the initial piece for the iterative method. By default, it is assumed to be 0, it is the first piece.
See also
fluxionum::IterativeEulerMethod::IterativeEulerMethod
fluxionum::FixedIterativeEulerMethod::ta
fluxionum::FixedIterativeEulerMethod::ya
fluxionum::FixexdIterativeEulerMethod::i

Member Function Documentation

◆ eval()

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

Compute the iterative Euler method but considering given fixed frontiers.

Parameters
hThe step between current \(t_i\) and next \(t_{i+1}\) such that \(h = t_{i+1} - t_i\)
See also
fluxionum::IterativeEulerMethod::eval

Implements fluxionum::Function< A, B >.

◆ getCurrentPieceIndex()

template<typename A , typename B >
size_t fluxionum::FixedIterativeEulerMethod< A, B >::getCurrentPieceIndex ( ) const
inline

◆ getTa()

template<typename A , typename B >
arma::Col<A> const& fluxionum::FixedIterativeEulerMethod< A, B >::getTa ( ) const
inline

◆ getYa()

template<typename A , typename B >
arma::Col<B> const& fluxionum::FixedIterativeEulerMethod< A, B >::getYa ( ) const
inline

◆ restart()

template<typename A , typename B >
void fluxionum::FixedIterativeEulerMethod< A, B >::restart ( )
inlineoverridevirtual

◆ setCurrentPieceIndex()

template<typename A , typename B >
void fluxionum::FixedIterativeEulerMethod< A, B >::setCurrentPieceIndex ( size_t const  i)
inline

Member Data Documentation

◆ i

template<typename A , typename B >
size_t fluxionum::FixedIterativeEulerMethod< A, B >::i
protected

The index of the current piece.

\[ i : t_{i} \in [a_{i}, a_{i+1}) \]


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