Namespace jalansim::dynamics::integrators

Namespace List > jalansim > dynamics > integrators

Public Functions

Type Name
JALANSIM_HOST_DEVICE void euler (T * x, const T * u, T dt, Model & m)
Forward Euler integration method.
JALANSIM_HOST_DEVICE void rk4 (T * x, const T * u, T dt, Model & m)
Fourth-order Runge-Kutta integration method.

Public Functions Documentation

function euler

Forward Euler integration method.

template<typename T, class Model>
JALANSIM_HOST_DEVICE void jalansim::dynamics::integrators::euler (
    T * x,
    const T * u,
    T dt,
    Model & m
) 

Performs one step of first-order Euler integration to advance the system state. Uses the formula: x(t+dt) = x(t) + dt * f(x(t), u(t)). Simple but less accurate than higher-order methods.

Template parameters:

  • T Numeric type (float, double)
  • Model Dynamics model class with rhs() method

Parameters:

  • x State vector to be updated in-place
  • u Control input vector
  • dt Time step size
  • m Dynamics model instance

function rk4

Fourth-order Runge-Kutta integration method.

template<typename T, class Model>
JALANSIM_HOST_DEVICE void jalansim::dynamics::integrators::rk4 (
    T * x,
    const T * u,
    T dt,
    Model & m
) 

Performs one step of fourth-order RK4 integration to advance the system state. Uses the classical RK4 formula with four slope evaluations for higher accuracy. More computationally expensive but significantly more accurate than Euler method.

Template parameters:

  • T Numeric type (float, double)
  • Model Dynamics model class with rhs() method

Parameters:

  • x State vector to be updated in-place
  • u Control input vector
  • dt Time step size
  • m Dynamics model instance


The documentation for this class was generated from the following file include/jalansim/dynamics/integrators.hpp