Add IO for refined grids
Description
The current model_state
encodes the majority of the information that is needed to store and recover simulations. However, it cannot be written or read to make checkpoints in the simulation. This is may be inconvenient for long simulations. Achieving this is not an easy task because the grid may change during the simulation: Although it is possible to write and read a refined grid, it woudln't be possible to later coarse the grid again.
Proposal
Try to recover mode_state
grid by
- Writing the refined grid.
- Read the coarse grid and the refined grid.
- Refine coarse grid until every entity has the same volume for the two grids.
- Check that number of entities is correct with respect to the refined one.
- Check that the two grids have the same index set.
- Read GFS and coefficient vector from other file (This may go in another issue).
- Use new refined to continue simulation.
How to test the implementation?
Recover grid from and old simulation and check that 4 and 5 pass.
Related issues
See #