IntervalSaveRoutine

class plasmapy.simulation.particle_tracker.IntervalSaveRoutine(interval: Quantity, **kwargs)[source]

Bases: AbstractSaveRoutine

Abstract class describing a save routine that saves every given interval.

Attributes Summary

require_synchronized_dt

Save output only makes sense for synchronized time steps.

save_now

Save at every interval given in instantiation.

tracker

Return the ParticleTracker object for this stop condition.

Methods Summary

post_push_hook([force_save])

Function called after a push step.

results()

Return the results of the simulation.

save()

Save the current state of the simulation.

Attributes Documentation

require_synchronized_dt

Save output only makes sense for synchronized time steps.

save_now

Save at every interval given in instantiation.

tracker

Return the ParticleTracker object for this stop condition.

Methods Documentation

post_push_hook(force_save=False) None

Function called after a push step.

This function is responsible for handling two steps of save routine, namely:
  • Deciding to save on the current time step

  • How the simulation data is saved (i.e. to disk or memory)

results() tuple[Quantity, Quantity, Quantity][source]

Return the results of the simulation. The quantities returned are the times, positions, and velocities, respectively.

save() None[source]

Save the current state of the simulation. Sets the time of last save attribute and log the timestamp.