dynode.simulation.odes.build_saveat#
- dynode.simulation.odes.build_saveat(start: float, stop: int, step: int = 1, sub_save_indices: Tuple[int, ...] | None = None) SaveAt #
Build the SaveAt object if sub_save_indices are not None then SaveAt is built using SubSaveAt.
Parameters#
- startfloat
initial time step or t0 for the purpose of building an array of time steps
- stopint
the final time step for the purpose of building an array of time steps
- step: int
value that lets you increment your time step at which a state is saved. If for example you would like to run your solution for duration_days = 100 but only save a state weekly you would pass step = 7. save_step is optional by default it is set to 1 which will have no effect.
- sub_save_indicesTuple[int, …]
tuple of initial_state indices specifying which compartments to save states for in the final sol.ys. sub_save_indices is optional and by default set to None.
Returns#
- diffrax.SaveAt
SaveAt object, which specifies which compartments and the time step they should be saved for the Solution object. For more information on what’s included within diffrax.SaveAt see: https://docs.kidger.site/diffrax/api/saveat/