Dune Core Modules (2.4.1)

Dune::BackupRestoreFacility< const Grid > Struct Template Reference

BackupRestoreFacility taking const Grid as type and deriving from the version with the const. More...

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

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 &grid, std::ostream &stream)
 write a hierarchic grid into a stream More...
 
static Gridrestore (const std::string &filename)
 read a hierarchic grid from disk More...
 
static Gridrestore (std::istream &stream)
 read a hierarchic grid from a stream More...
 

Detailed Description

template<class Grid>
struct Dune::BackupRestoreFacility< const Grid >

BackupRestoreFacility taking const Grid as type and deriving from the version with the const.

Member Function Documentation

◆ backup() [1/2]

template<class Grid >
static void Dune::BackupRestoreFacility< Grid >::backup ( const Grid grid,
const std::string &  filename 
)
inlinestaticinherited

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.

References DUNE_THROW.

Referenced by Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >::backup(), Dune::BackupRestoreFacility< Dune::YaspGrid< dim, Coordinates > >::backup(), and Dune::BackupRestoreFacility< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >::backup().

◆ backup() [2/2]

template<class Grid >
static void Dune::BackupRestoreFacility< Grid >::backup ( const Grid grid,
std::ostream &  stream 
)
inlinestaticinherited

write a hierarchic grid into a stream

Parameters
[in]gridgrid to write
[in]streamstd::stream to write the grid to
Note
While operating on a std::ostream might be convenient, a grid written in another language than C++ might need to emulate this method by writing through a temporary file.

References DUNE_THROW.

◆ restore() [1/2]

template<class Grid >
static Grid * Dune::BackupRestoreFacility< Grid >::restore ( const std::string &  filename)
inlinestaticinherited

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.

References DUNE_THROW.

Referenced by Dune::BackupRestoreFacility< ALUGrid< dim, dimworld, elType, refineType, Comm > >::restore(), Dune::BackupRestoreFacility< Dune::YaspGrid< dim, Coordinates > >::restore(), and Dune::BackupRestoreFacility< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >::restore().

◆ restore() [2/2]

template<class Grid >
static Grid * Dune::BackupRestoreFacility< Grid >::restore ( std::istream &  stream)
inlinestaticinherited

read a hierarchic grid from a stream

Parameters
[in]streamstd::stream to read the grid from
Note
While operating on a std::istream might be convenient, a grid written in another language than C++ might need to emulate this method by writing through a temporary file.

References DUNE_THROW.


The documentation for this struct was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)