autopdex.dae.TimeSteppingManager.run

TimeSteppingManager.run(dofs, dt0, t_max, num_time_steps, settings={'current time': 0.0})[source]

Executes the time stepping loop for the simulation.

This method performs the following operations:
  1. Verifies that all time integrators are compatible (i.e., they have the same number of stages, identical stage positions, and stage lists).

  2. Initializes simulation variables including the initial DOFs, time (t), step size (dt), and history state.

  3. Iteratively performs time steps using a multi-stage integration method:
    • Updates state with pre-step modifications.

    • Computes the new state and derivative estimates using the multi-stage step procedure.

    • Estimates the error and uses the step size controller to adjust dt.

    • Accepts or rejects the time step based on convergence criteria.

    • Optionally saves the current state using the save policy.

    • Performs post-step updates to settings.

  4. Continues the loop until the simulation time reaches t_max or the maximum number of time steps is reached.

  5. Finalizes and returns the simulation state along with statistics such as the number of accepted and rejected steps.

Parameters:
  • dofs (dict[str, jnp.ndarray]) – Initial degrees of freedom for the simulation.

  • dt0 (float) – Initial time step size.

  • t_max (float) – Maximum simulation time.

  • num_time_steps (int) – Maximum number of time steps to perform.

  • settings (dict[str, Any]) – Dictionary containing dynamic simulation settings. Default is {‘current time’: 0.0}.

Returns:

An object containing the final state (q), updated settings, simulation history, and step statistics (total steps, accepted steps, rejected steps).

Return type:

TimeSteppingManagerState