IntervalSaveRoutine

class plasmapy.simulation.particle_tracker.save_routines.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.

results

Return the results of the simulation.

save_now

Save at every interval given in instantiation.

tracker

Return the ParticleTracker object for this stop condition.

Methods Summary

post_push_hook()

Function called after a push step.

save()

Save the current state of the simulation.

Attributes Documentation

require_synchronized_dt

Save output only makes sense for synchronized time steps.

results

Return the results of the simulation. The quantities returned depend on those defined in the body of the save routine.

save_now

Save at every interval given in instantiation.

tracker

Return the ParticleTracker object for this stop condition.

Methods Documentation

post_push_hook() 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)

save() None[source]

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