dune-grid  2.11
Public Types | Static Public Member Functions | List of all members
Dune::BackupRestoreFacility< AlbertaGrid< dim, dimworld > > Struct Template Reference

#include <dune/grid/albertagrid/backuprestore.hh>

Public Types

typedef AlbertaGrid< dim, dimworld > Grid
 

Static Public Member Functions

static void backup (const Grid &grid, const std::string &filename)
 write a hierarchic grid to disk
More...
 
static void backup (const Grid &, std::ostream &)
 write a hierarchic grid to disk More...
 
static Gridrestore (const std::string &filename)
 read a hierarchic grid from disk
More...
 
static Gridrestore (std::istream &)
 read a hierarchic grid from disk More...
 

Member Typedef Documentation

◆ Grid

template<int dim, int dimworld>
typedef AlbertaGrid< dim, dimworld > Dune::BackupRestoreFacility< AlbertaGrid< dim, dimworld > >::Grid

Member Function Documentation

◆ backup() [1/2]

template<int dim, int dimworld>
static void Dune::BackupRestoreFacility< AlbertaGrid< dim, dimworld > >::backup ( const Grid grid,
const std::string &  filename 
)
inlinestatic

write a hierarchic grid to disk

Parameters
[in]gridgrid to write
[in]filenamefilename of the file to create
Note
This method might create multiple files based on the filename plus internal extension.

◆ backup() [2/2]

template<int dim, int dimworld>
static void Dune::BackupRestoreFacility< AlbertaGrid< dim, dimworld > >::backup ( const Grid ,
std::ostream &   
)
inlinestatic

write a hierarchic grid to disk

Parameters
[in]gridgrid to write
[in]filenamefilename of the file to create
Note
This method might create multiple files based on the filename plus internal extension.
This method is not available for AlbertGrid. Use try/catch to catch the NotImplemented exception and fall back to the other backup method.

◆ restore() [1/2]

template<int dim, int dimworld>
static Grid* Dune::BackupRestoreFacility< AlbertaGrid< dim, dimworld > >::restore ( const std::string &  filename)
inlinestatic

read a hierarchic grid from disk

Parameters
[in]filenamefilename of the file to read
Returns
a pointer to the grid (allocated by new)
Note
This method might require multiple files based on the filename plus some extension.

◆ restore() [2/2]

template<int dim, int dimworld>
static Grid* Dune::BackupRestoreFacility< AlbertaGrid< dim, dimworld > >::restore ( std::istream &  )
inlinestatic

read a hierarchic grid from disk

Parameters
[in]filenamefilename of the file to read
Returns
a pointer to the grid (allocated by new)
Note
This method might require multiple files based on the filename plus some extension.
This method is not available for AlbertGrid. Use try/catch to catch the NotImplemented exception and fall back to the other restore method.

The documentation for this struct was generated from the following file: