Skip to content

Class ODESolver

The class ODESolver implements the flow map \(\varphi_t(x) := x(t), x(0) = x\). This class serves as a base class for various numerical solvers for initial value problems (IVPs).

API Documentation

__init__(ode, t_step, dt=0.001)

Initializes the ODESolver with the given ordinary differential equation (ODE), time step, and optional time increment.

Parameters:

Name Type Description Default
ode AbstractODE

The ordinary differential equation to be solved.

required
t_step float

The time step for the solver.

required
dt float

The time increment for each step. Defaults to 1e-3.

0.001

step(x, u)

Perform a single step of the ODE solver.

Parameters:

Name Type Description Default
x Tensor

The current state of the system.

required
u Tensor

The control input or parameters on the system.

required

Returns:

Type Description
NotImplementedError

This method is intended to be overridden by subclasses to implement specific ODE solving logic.