PrevUpHomeNext

Basic stepper

Basic steppers execute one timestep of a specific order with a given stepsize. They usually allocate internal memory to store intermediate function call results. If state types with variable size are used (e.g. vector), it has to be assured that the stepper gets informed about any change of the state size by calling its adjust_size method.

Associated Types

Description

Time

Stepper::time_type

Type of the time variable, e.g. double

Container

Stepper::container_type

Type of the system state, e.g. vector<double>

Value

Stepper::value_type

Value type of the state, e.g. double

Order Type

Stepper::order_type

Type of the order parameter, usually unsigned short

Methods

Executes one timestep with the given parameters:

Parameter

Type

Description

system

DynamicalSystem

Function (callable object) that computes the rhs of the ode

x

container_type

The current state of the system x(t)

t

time_type

The current time t

dt

time_type

Length of the timestep to be executed

The result of this method is the (approximate) state of the system x(t+dt) and is stored in the variable x (in-place). Note, that the time t is not automatically increased by this method.

The same as above but with the additional parameter dxdt that represents the derivative x'(t) = f(x,t) at the time t.

Stepper that model this concept


PrevUpHomeNext