78 real t_ = 0.0, t1_ = 0.0, h_ = 0.0;
116 Vector y_, k1_, k2_, k3_, k4_, ytmp_;
117 real t_ = 0.0, t1_ = 0.0, h_ = 0.0;
155 Vector y_, k1_, k2_, k3_, k4_, k5_, k6_, k7_, ytmp_, err_;
156 real t_ = 0.0, t1_ = 0.0, h_ = 0.0, rtol_ = 0.0, atol_ = 0.0;
157 idx steps_ = 0, max_steps_ = 0;
158 bool done_ =
false, converged_ =
true;
194 Vector q_, v_, a_cur_, a_next_;
195 real t_ = 0.0, t1_ = 0.0, h_ = 0.0;
234 real t_ = 0.0, t1_ = 0.0, h_ = 0.0;
272 Vector q_, v_, a1_, a2_, a3_, a4_, qtmp_;
273 real t_ = 0.0, t1_ = 0.0, h_ = 0.0;
Implicit time integration via a user-supplied LinearSolver.
EulerSteps euler(ODERhsFn f, Vector y0, ODEParams p={})
ODEResult ode_rk4(ODERhsFn f, Vector y0, ODEParams p={}, ObserverFn obs=nullptr)
Classic 4th-order Runge-Kutta, fixed step.
Yoshida4Steps yoshida4(AccelFn accel, Vector q0, Vector v0, ODEParams p={})
std::function< void(real t, const Vector &q, const Vector &v)> SympObserverFn
std::function< void(real t, const Vector &y, Vector &dydt)> ODERhsFn
SymplecticResult ode_verlet(AccelFn accel, Vector q0, Vector v0, ODEParams p={}, SympObserverFn obs=nullptr)
Velocity Verlet, 2nd-order symplectic, 1 force evaluation per step.
SymplecticResult ode_rk4_2nd(AccelFn accel, Vector q0, Vector v0, ODEParams p={}, SympObserverFn obs=nullptr)
RK4 for second-order systems q'' = accel(q), Nystrom form.
std::function< void(real t, const Vector &y)> ObserverFn
RK4Steps rk4(ODERhsFn f, Vector y0, ODEParams p={})
BasicVector< real > Vector
Real-valued dense vector with full backend dispatch (CPU + GPU)
std::function< void(const Vector &q, Vector &acc)> AccelFn
RK4_2ndSteps rk4_2nd(AccelFn accel, Vector q0, Vector v0, ODEParams p={})
ODEResult ode_euler(ODERhsFn f, Vector y0, ODEParams p={}, ObserverFn obs=nullptr)
Forward Euler, 1st-order, fixed step.
SymplecticResult ode_yoshida4(AccelFn accel, Vector q0, Vector v0, ODEParams p={}, SympObserverFn obs=nullptr)
Yoshida 4th-order symplectic, 3 force evaluations per step.
RK45Steps rk45(ODERhsFn f, Vector y0, ODEParams p={})
VerletSteps verlet(AccelFn accel, Vector q0, Vector v0, ODEParams p={})
ODEResult ode_rk45(ODERhsFn f, Vector y0, ODEParams p={}, ObserverFn obs=nullptr)
Adaptive Dormand-Prince RK45 with FSAL and PI step-size control.
bool operator==(StepEnd) const
bool operator!=(StepEnd) const
Parameters for all ODE integrators. Set only the fields you need.
real rtol
relative tolerance (adaptive only)
real h
step size (fixed-step) or initial hint (adaptive)
real atol
absolute tolerance (adaptive only)
idx max_steps
step cap (adaptive only)
bool operator!=(StepEnd) const
bool operator==(StepEnd) const
bool operator==(StepEnd) const
bool operator!=(StepEnd) const
bool operator!=(StepEnd) const
bool operator==(StepEnd) const
SymplecticStep operator*() const
bool operator!=(StepEnd) const
bool operator==(StepEnd) const
SymplecticStep operator*() const
bool operator!=(StepEnd) const
SymplecticStep operator*() const
bool operator==(StepEnd) const