AnimaL |
Tutorial |
Documentation |
#include <integrator.h>
Suitable for first-order systems: derivative(value) Handles auxiliary variables and their resizing. Template parameters:
Definition at line 146 of file integrator.h.
Public Member Functions | |
ExplicitIntegrator (Derivator *d=0) | |
Construct using the derivator. | |
template<class States> void | euler (States &s, Real h, Real t=0) |
Apply euler time integration. | |
template<class States> void | rk2 (States &s, Real h, Real t=0) |
Apply second-order Runge-Kutta time integration. | |
template<class States> void | rk4 (States &s, Real h, Real t=0) |
Apply fourth-order Runge-Kutta time integration. | |
template<class States> void | modmid (States &s, Real h, int n, Real t=0) |
Apply modified midpoint time integration. | |
Protected Attributes | |
animal::vector< Deriv > | d1 |
Auxiliary value to store a derivative. | |
animal::vector< Deriv > | d2 |
Auxiliary value to store a derivative. | |
animal::vector< Deriv > | d3 |
Auxiliary value to store a derivative. | |
animal::vector< Deriv > | d4 |
Auxiliary value to store a derivative. | |
animal::vector< State > | s1 |
Auxiliary value to store a state. | |
animal::vector< State > | s2 |
Auxiliary value to store a state. | |
animal::vector< State > | s3 |
Auxiliary value to store a state. | |
Private Attributes | |
Derivator * | eq_deriv |
A functor which computes the time derivative of a given state. |
|
Construct using the derivator.
Definition at line 152 of file integrator.h. References animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::eq_deriv. |
|
Apply euler time integration. Class States is a container with entry type equal or compatible with State.
Definition at line 162 of file integrator.h. References animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::d1, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::eq_deriv, animal::integrate_euler(), and animal::size(). |
|
Apply modified midpoint time integration. Class States is a container with entry type equal or compatible with State.
Definition at line 207 of file integrator.h. References animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::d1, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::eq_deriv, animal::integrate_modmid(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::s1, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::s2, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::s3, and animal::size(). |
|
Apply second-order Runge-Kutta time integration. Class States is a container with entry type equal or compatible with State.
Definition at line 175 of file integrator.h. References animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::d1, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::eq_deriv, animal::integrate_rk2(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::s1, and animal::size(). |
|
Apply fourth-order Runge-Kutta time integration. Class States is a container with entry type equal or compatible with State.
Definition at line 189 of file integrator.h. References animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::d1, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::d2, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::d3, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::d4, animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::eq_deriv, animal::integrate_rk4(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::s1, and animal::size(). |
|
Auxiliary value to store a derivative.
Definition at line 218 of file integrator.h. Referenced by animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::euler(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::modmid(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk2(), and animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk4(). |
|
Auxiliary value to store a derivative.
Definition at line 219 of file integrator.h. Referenced by animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk4(). |
|
Auxiliary value to store a derivative.
Definition at line 220 of file integrator.h. Referenced by animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk4(). |
|
Auxiliary value to store a derivative.
Definition at line 221 of file integrator.h. Referenced by animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk4(). |
|
A functor which computes the time derivative of a given state.
Definition at line 149 of file integrator.h. Referenced by animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::euler(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::ExplicitIntegrator(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::modmid(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk2(), and animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk4(). |
|
Auxiliary value to store a state.
Definition at line 222 of file integrator.h. Referenced by animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::modmid(), animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk2(), and animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::rk4(). |
|
Auxiliary value to store a state.
Definition at line 223 of file integrator.h. Referenced by animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::modmid(). |
|
Auxiliary value to store a state.
Definition at line 224 of file integrator.h. Referenced by animal::ExplicitIntegrator< State, Deriv, Derivator, Real >::modmid(). |