3 #ifndef DUNE_GEOGRID_BACKUPRESTORE_HH
4 #define DUNE_GEOGRID_BACKUPRESTORE_HH
21 template<
class Gr
id,
bool hasBackupRestoreFacilities = Capabilities::hasBackupRestoreFacilities< Gr
id > ::v >
25 template<
class Gr
id >
36 This &operator= (
const This & );
39 template< GrapeIOFileFormatType type >
40 bool writeGrid (
const std::string &filename,
double time )
const
42 return asImp().hostGrid().template writeGrid< type >( filename, time );
45 template< GrapeIOFileFormatType type >
46 bool readGrid (
const std::string &filename,
double &time )
49 = asImp().hostGrid().template readGrid< type >( filename, time );
57 return static_cast< const Grid &
>( *this );
62 return static_cast< Grid &
>( *this );
73 template<
class HostGr
id,
class CoordFunction,
class Allocator >
79 static void backup (
const Grid &grid,
const std::string &path,
const std::string &fileprefix )
85 static void backup (
const Grid &grid,
const std::ostream &stream )
91 static Grid *
restore (
const std::string &path,
const std::string &fileprefix )
95 CoordFunction *coordFunction =
new CoordFunction();
96 return new Grid( hostGrid, coordFunction );
103 CoordFunction *coordFunction =
new CoordFunction();
104 return new Grid( hostGrid, coordFunction );
110 #endif // #ifndef DUNE_GEOGRID_BACKUPRESTORE_HH