1 #ifndef DUNE_GRID_ALBERTAGRID_BACKUPRESTORE_HH
2 #define DUNE_GRID_ALBERTAGRID_BACKUPRESTORE_HH
20 template<
int dim,
int dimworld >
25 static void backup (
const Grid &grid,
const std::string &path,
const std::string &fileprefix )
27 const std::string filename( path +
"/" + fileprefix );
28 return grid.writeXdr( filename, 0.0 );
31 static void backup (
const Grid &grid,
const std::ostream &stream )
33 DUNE_THROW( NotImplemented,
"backup / restore using streams not implemented." );
36 static Grid *
restore (
const std::string &path,
const std::string &fileprefix )
38 const std::string filename( path +
"/" + fileprefix );
41 grid->readGridXdr( filename, time );
47 DUNE_THROW( NotImplemented,
"backup / restore using streams not implemented." );
53 #endif // #ifndef DUNE_GRID_ALBERTAGRID_BACKUPRESTORE_HH