Class RK4Integrator#
Defined in File Integrator.h
Inheritance Relationships#
Base Type#
public Karana::Integrators::Integrator(Class Integrator)
Class Documentation#
-
class RK4Integrator : public Karana::Integrators::Integrator#
Fixed-step Runge-Kutta 4th order integrator.
Public Functions
-
RK4Integrator(size_t nstates, DerivativeFunction f, const IntegratorOptions *options = nullptr)#
Constructor.
- Parameters:
nstates – The number of states to integrate.
f – The derivative function to calculate the derivative of the states.
options – The integrator options.
-
virtual void hardReset(size_t nstates) override#
Reset the state size.
- Parameters:
nstates – the new state size
-
virtual km::Ktime advanceTo(const km::Ktime &t_end) override#
Method to advance the system state to a specified time.
- Parameters:
to_t – the desired end time
- Returns:
the actual end time
Public Static Functions
-
static kc::ks_ptr<RK4Integrator> create(size_t nstates, DerivativeFunction deriv_fn, const Integrator::IntegratorOptions *options = nullptr)#
Factory method for creating RK4Integrator instances.
- Parameters:
nstates – the length of the states vector
deriv_fn – the derivative function
options – options for the integrator
- Returns:
a new RK4 Integrator instance
-
RK4Integrator(size_t nstates, DerivativeFunction f, const IntegratorOptions *options = nullptr)#