Skip to content

Backup and restore facilities

Praetorius, Simon requested to merge feature/backup_restore into master

Added backup and restore facilities for grid and dofvector. Either call

problemStat.backup(adaptInfo);

(This will backup the files to [name]->backup->grid and [name]->backup->solution) and instead of initialize() call the function

problemStat.restore(INIT_ALL);

(This will read the grid and solution from the files [name]->restore->grid and [name]->restore->solution)

Or you can call

problemStat.backup(filename)

and

problemStat.restore(filename) -> std::unique_ptr<Grid>

directly to backup and restore the grid of the problemStat and dofvector.backup(filename) and dofvector.restore(filename) to backup and restore the data of the dofvector.

If the grid does not support backup-restore, the current gridView is written. This means that the hierarchy information is lost. A warning is printed in this case.

Edited by Praetorius, Simon

Merge request reports