checkpoint_util
Short description
@author: Moritz F P Becker
- pyrid.observables.checkpoint_util.load_checkpoint(System, directory='checkpoints/', file=None)[source]
Loads a system state from a checkpoint file.
- Parameters
- Systemobject
Instance of the System class.
- directorystring
Directory of the checkpoint files. Default = ‘checkpoints/’.
- filestring
Name of the checkpoint file.
- Returns
- tuple(object, object, array like)
RBs, Particles, HGrid
- pyrid.observables.checkpoint_util.save(Simulation, System, RBs, Particles, HGrid, checkpoint_counter)[source]
Save the system state to a npz file.
- Parameters
- Simulationobject
Instance of the Simulation class.
- Systemobject
Instance of the System class.
- RBsobject
Instance of the RBs class.
- Particlesobject
Instance of the Particles class
- HGridarray like
Structured array representing a hierarchical grid.
- checkpoint_counterint64
checkpoint index (index goes from 0 to the maximum number of files that has been set by the user).