compute_time_grid

compute_time_grid(t_span, t_eval, max_dt, jitter=0.05, *, unp_inner, rng=None)

Construct integration steps aligned with the evaluation grid.

Parameters:
  • t_span (ndarray | Array) – Array containing the start and end times of the integration window.

  • t_eval (ndarray | Array | None) – Optional monotonic array of evaluation points inside t_span.

  • max_dt (float) – Maximum allowed step size used to split each interval.

  • jitter (float | None) – Optional jitter amplitude applied to interior boundaries to avoid resonance artefacts. Set to None to disable.

  • unp_inner – Array namespace (numpy or jax.numpy) used to build the grid.

  • rng – Optional simulation-local NumPy random generator used to sample jittered interior step boundaries.

Return type:

Tuple[ndarray | Array, List[ndarray | Array], ndarray | Array]

Returns:

Tuple (t_list, h_nested_list, n_list) where t_list is the merged evaluation grid, h_nested_list contains per-interval step sizes, and n_list records the number of steps taken inside each interval.