Helios++
Helios software for LiDAR simulations
|
Iterative Euler method. More...
#include <IterativeEulerMethod.h>
Public Member Functions | |
IterativeEulerMethod (Function< A, B > &dydt, A const &t0, B const &y0) | |
IterativeEulerMethod default constructor. More... | |
B | eval (A const &h) override |
Iteratively compute the next value using Euler method. More... | |
virtual void | restart () |
Restart the IterativeEulerMethod so it is at its initial state again \(y(t_0) = y_0\). | |
Function< A, B > const & | getDydt () const |
A | getT () const |
void | setT (A const t) |
A | getT0 () const |
B | getY () const |
void | setY (B const y) |
B | getY0 () const |
![]() | |
Function ()=default | |
B | operator() (A const &x) |
Evaluate the function \(f(x)=y\). More... | |
Protected Attributes | |
Function< A, B > & | dydt |
Reference to the derivative function. More... | |
A | t0 |
The initial value of \(t\), \(t_0\). More... | |
A | t |
The current value of \(t\). More... | |
B | y0 |
The initial value of \(y\), \(y(t_0)\). More... | |
B | y |
The current value of \(y(t)\). More... | |
Iterative Euler method.
\[ y(t+h) = y(t) + h \frac{dy}{dt}(t) \]
The iterative Euler method computes the Euler method assuming at each iteration the given step. It has an error order \(Ch\) where \(h\) is the step size.
|
inline |
IterativeEulerMethod default constructor.
|
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 IterativeEulerMethod so it is representing the new state at \(t+h\).
h | The step size |
Implements fluxionum::Function< A, B >.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Reference to the derivative function.
\[ \frac{dy}{dt}(t) \]
|
protected |
The current value of \(t\).
|
protected |
The initial value of \(t\), \(t_0\).
|
protected |
The current value of \(y(t)\).
|
protected |
The initial value of \(y\), \(y(t_0)\).