3#ifndef DUNE_GRID_ALBERTAGRID_BACKUPRESTORE_HH
4#define DUNE_GRID_ALBERTAGRID_BACKUPRESTORE_HH
6#include <dune/grid/common/backuprestore.hh>
22 template<
int dim,
int dimworld >
23 struct BackupRestoreFacility< AlbertaGrid< dim, dimworld > >
28 static void backup (
const Grid &grid,
const std::string &filename )
30 grid.writeGridXdr( filename, 0.0 );
37 static void backup (
const Grid &grid, std::ostream &stream )
39 DUNE_THROW( NotImplemented,
"backup / restore using streams not implemented." );
43 static Grid *
restore (
const std::string &filename )
45 Grid *grid =
new Grid;
47 grid->readGridXdr( filename, time );
55 static Grid *
restore ( std::istream &stream )
57 DUNE_THROW( NotImplemented,
"backup / restore using streams not implemented." );
#define DUNE_THROW(E, m)
Definition: exceptions.hh:216
Dune namespace.
Definition: alignment.hh:11
static Grid * restore(const std::string &filename)
read a hierarchic grid from disk
Definition: backuprestore.hh:76
static void backup(const Grid &grid, const std::string &filename)
write a hierarchic grid to disk
Definition: backuprestore.hh:49