AbstractSaveRoutine
- class plasmapy.simulation.particle_tracker.AbstractSaveRoutine(output_directory: Path | None = None)[source]
Bases:
ABC
Abstract base class containing the necessary methods for a
ParticleTracker
save routine.The save routine class is responsible for defining the conditions and hooks for saving.
- Parameters:
output_directory (
Path
, optional) – Output for objects that are saved to disk. If a directory is not specified then a memory save routine is used.
Notes
After every push, the
post_push_hook
method is called with the respectiveParticleTracker
object passed as a parameter. Then, the hook callssave_now
to determine whether or not the simulation state should be saved.Attributes Summary
Return if this save routine requires a synchronized time step.
Determine if to save on the current push step.
Return the
ParticleTracker
object for this stop condition.Methods Summary
post_push_hook
([force_save])Function called after a push step.
save
()Save the current state of the simulation to disk or memory based on whether the output directory was set.
Attributes Documentation
- require_synchronized_dt
Return if this save routine requires a synchronized time step.
- save_now
Determine if to save on the current push step.
- tracker
Return the
ParticleTracker
object for this stop condition.
Methods Documentation