AnimaL |
Tutorial |
Documentation |
#include <explicit_solver.h>
Inheritance diagram for animal::integration::Runge_Kutta_2< DerivativeF, StepF, TraitsT >:
Typically invoked through the operator () of the base class Solver.
Definition at line 147 of file explicit_solver.h.
Protected | |
void | setSize (const SizeType size) |
Resize auxiliary container tmp_S. | |
CopyState | tmp_S |
Temporary state value. | |
Public Types | |
typedef TraitsT | Traits |
Traits class: includes all type definitions. | |
typedef Traits::Real | Real |
Floating-point value for time. | |
typedef Traits::State | State |
Container of state variables. | |
typedef Traits::CopyState | CopyState |
Container of copies of state variables. | |
typedef Traits::Derivative | Derivative |
Container of derivative variables. | |
typedef Traits::SizeType | SizeType |
Natural number to define container size, typically unsigned int. | |
Public Member Functions | |
Constructor | |
Default constructor is typically used, unless the lower-level objects include special data. | |
Runge_Kutta_2 (const DerivativeF &df=DerivativeF(), const StepF &sf=StepF(), const Traits &tr=Traits()) | |
Just calls the base class constructor. | |
virtual | ~Runge_Kutta_2 () |
Destructor does nothing. | |
Integration scheme | |
Implementation of the numerical integration method. | |
void | doStep (const State &initial_S, State &final_S, const Derivative &D, const Real t, const Real h) |
Given a state initial_S and a derivative initial_D at time t, integrate over a time step h and write the result in final_S. |
|
Container of copies of state variables.
Reimplemented from animal::integration::Solver< DerivativeF, StepF, TraitsT >. Definition at line 160 of file explicit_solver.h. |
|
Container of derivative variables.
Reimplemented from animal::integration::Solver< DerivativeF, StepF, TraitsT >. Definition at line 163 of file explicit_solver.h. |
|
Floating-point value for time.
Reimplemented from animal::integration::Solver< DerivativeF, StepF, TraitsT >. Definition at line 154 of file explicit_solver.h. |
|
Natural number to define container size, typically unsigned int.
Reimplemented from animal::integration::Solver< DerivativeF, StepF, TraitsT >. Definition at line 166 of file explicit_solver.h. |
|
Container of state variables.
Reimplemented from animal::integration::Solver< DerivativeF, StepF, TraitsT >. Definition at line 157 of file explicit_solver.h. |
|
Traits class: includes all type definitions.
Reimplemented from animal::integration::Solver< DerivativeF, StepF, TraitsT >. Definition at line 151 of file explicit_solver.h. |
|
Just calls the base class constructor.
Definition at line 178 of file explicit_solver.h. |
|
Destructor does nothing.
Definition at line 187 of file explicit_solver.h. |
|
Given a state initial_S and a derivative initial_D at time t, integrate over a time step h and write the result in final_S. This method is typically called indirectly by the operator () of the base class Solver, but it may be called directly if the derivative at the beginning of the time step is known. Implements animal::integration::Solver< DerivativeF, StepF, TraitsT >. Definition at line 206 of file explicit_solver.h. References animal::integration::Solver< DerivativeF, StepF, TraitsT >::applyStep, animal::integration::Runge_Kutta_2< DerivativeF, StepF, TraitsT >::tmp_S, and animal::integration::Solver< DerivativeF, StepF, TraitsT >::writeDerivative. |
|
Resize auxiliary container tmp_S.
Implements animal::integration::Solver< DerivativeF, StepF, TraitsT >. Definition at line 233 of file explicit_solver.h. References animal::integration::Runge_Kutta_2< DerivativeF, StepF, TraitsT >::tmp_S. |
|
Temporary state value.
Definition at line 230 of file explicit_solver.h. Referenced by animal::integration::Runge_Kutta_2< DerivativeF, StepF, TraitsT >::doStep(), and animal::integration::Runge_Kutta_2< DerivativeF, StepF, TraitsT >::setSize(). |