Class PD45

Inheritance Relationships

Base Type

Class Documentation

class PD45 : public lupnt::Integrator

Dormand-Prince 4(5) (“PD45”) adaptive-step integrator with self-contained step-size control (does not rely on IRKF/ComputeRelError).

Alternative adaptive integrator selectable via IntegratorType::PD45 in NumericalOrbitDynamics::SetIntegrator.

Public Functions

virtual State Step(const ODE &f, Real t, const State &x, Real dt) override

One adaptive Dormand-Prince 4(5) step: computes the 7-stage embedded 4th/5th-order solution pair, and shrinks dt and retries (up to IntegratorParams::max_iter times) until the scaled error norm is <= 1, or throws if dt underflows 1e-3 or max_iter is exceeded.

Parameters:
  • f – Right-hand side dx/dt = f(t, x)

  • t – Current time [s]; advanced in-place by the accepted dt on success

  • x – Current state

  • dt – Step size [s]; shrunk in-place on rejected attempts

Returns:

5th-order (“high”) solution after stepping by the accepted dt