Support restarting of simulations
From discussion at #122 (closed):
@sospinar: If we write
vtk, it is logical that we must be able to read them. It would, for example, allow us to set checkpoints on simulations or just use the end of some simulations to start a new one without any further postprocessing.
@lriedel: I generally agree. Restarting from a written simulation would be nice to have. But there are two major issues:
VTK is a really huge library. It does not only contain data I/O, but (mostly) functions for data visualization (!) and analysis. It is now available through most common package managers, but I can understand that the DUNE devs did not want to include it because it will be unavailable on most clusters.
The written VTK file does not include the entire GFS information. This is a particular problem with local grid refinement, where the grid configuration cannot—at least not simply—be inferred from the VTK output. Additionally, one may choose cell or vertex data output, and different levels of subsampling. If this is evaluated as initial condition, one never has the guarantee that the assembled DOF vector is the same as in the simulation run which generated the VTK file.
@sospinar: Well, that's better than nothing. Hopefully, subsampling can support part of the error one makes when writing into
@lriedel: But that's exactly my point. Then the restart option is no real restart, but a simulation that starts from an initial bcondition which is somewhat similar to an old solution. I'm not sure if this is really useful.
I see two general options for a program restart:
Use program checkpoints. At a checkpoint, the full precision DOF vector is written to a file. The grid is stored in the DUNE grid format. However, I'm unsure about its capabilities and have never worked with it.
Use a solution from a previous program run as initial condition. This is the cheap way. Grid configurations don't need to match and the old solution is interpolated onto the new grid function space. But that's better discussed in another Issue.
How to test the implementation?