dune-grid  2.4.1
Public Types | Static Public Member Functions | List of all members
Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > > Struct Template Reference

facility for writing and reading grids More...

#include <dune/grid/alugrid/common/backuprestore.hh>

Public Types

typedef ALUGrid< dim, dimworld, elType, refineType, Comm > Grid
 

Static Public Member Functions

static std::string createFilename (const std::string &path, const std::string &fileprefix)
 
static void backup (const Grid &grid, const std::string &filename)
 
static void backup (const Grid &grid, std::ostream &stream)
 
static Gridrestore (const std::string &filename)
 
static Gridrestore (std::istream &stream)
 

Detailed Description

template<int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm>
struct Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >

facility for writing and reading grids

The BackupRestoreFacility allows writing hierarchic grids to disk and reading them back into another program.

It is guaranteed that all index sets and id sets are preserved by the backup / restore process. The result of restore is undefined, if the number of processes in a parallel program differs from the number of processes used on backup.

There are two pairs of backup / restore methods:

These techniques may not be mixed, i.e., you cannot write the grid into files and read it back from a stream or vice versa. While operating on a std::stream might be convenient, a grid written in another language than C++ might need to emulate this method by writing through a temporary file.

Note
The backup and restore methods might not be implemented for each grid. In this case one can catch the Dune::NotImplemented exception and do something else.
Template Parameters
Gridtype of grid

Member Typedef Documentation

template<int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
typedef ALUGrid< dim, dimworld, elType, refineType, Comm > Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >::Grid

Member Function Documentation

template<int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
static void Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >::backup ( const Grid grid,
const std::string &  filename 
)
inlinestatic
template<int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
static void Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >::backup ( const Grid grid,
std::ostream &  stream 
)
inlinestatic

template<int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
static std::string Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >::createFilename ( const std::string &  path,
const std::string &  fileprefix 
)
inlinestatic
template<int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
static Grid* Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >::restore ( const std::string &  filename)
inlinestatic
template<int dim, int dimworld, ALUGridElementType elType, ALUGridRefinementType refineType, class Comm >
static Grid* Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >::restore ( std::istream &  stream)
inlinestatic


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