The current timestep is a concept that is handled in the specific application case, so you can handle it however you want. The Timer is currently not serializable but this should be straight forward to change – if you are interested in this I can help you with further steps.
The basic approach for checkpointing is to 1) write out the lattice checkpoint periodically using SuperLattice::save
and 2) to only load it after the simulation has been constructed fully (i.e. prepareLattice
has been called). The restarted simulation also has to use exactly the same cuboid decomposition (commonly derived from the number of MPI processes). You can try this out in e.g. examples/laminar/bstep(2,3)d
.
The overriden Serializable::postLoad
method is needed to reinitialize the population structure after loading the checkpoint. It is called automatically by the serializer so you do not have to care about it if you only want to save and reload checkpoints.