Dune::GridPtr< GridType > Class Template Reference

#include <dgfparser.hh>

Inherits Dune::MacroGrid.

List of all members.


Detailed Description

template<class GridType>
class Dune::GridPtr< GridType >

Class for constructing grids from DGF files.

The constructor of the class is given the filename of the DGF file. From that file a pointer to an instance of type GridType is created by reading the given file which is translated to the specific format of the given GridType. The GridPtr class behaves like an auto pointer of GridType. An auto pointer to a grid of type GridType is constructed as follows:

 GridPtr<GridType> gridptr(filename, MPI_COMM_WORLD );
 GridType & grid = *gridptr; 

Public Member Functions

 GridPtr (const std::string filename, MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
 constructor given the name of a DGF file
 GridPtr ()
 Default constructor, creating empty GridPtr.
 GridPtr (GridType *grd)
 Constructor storing given pointer to internal auto pointer.
 GridPtr (const GridPtr &org)
 Copy constructor, copies internal auto pointer.
GridTypeoperator* ()
 return reference to GridType instance
GridTypeoperator-> ()
 return pointer to GridType instance
const GridTypeoperator* () const
 return const reference to GridType instance
const GridTypeoperator-> () const
 return const pointer to GridType instance
GridTyperelease ()
 release pointer from internal ownership
GridPtroperator= (const GridPtr &org)
 assignment of grid pointer
GridPtroperator= (GridType *grd)
 assignment of pointer to internal auto pointer
int nofParameters (int cdim)
 get number of parameters defined for a given codimension
template<class Entity>
std::vector< double > & parameters (const Entity &en)
 get parameters defined for each codim 0 und dim entity on the grid through the grid file

Protected Member Functions

template<class GridType>
GridTypecreateGrid ()
 returns pointer to a new instance of type GridType created from a DGF file
bool readDuneGrid (std::istream &, int dimG=-1, int dimW=-1)
 method which reads the dgf file
void writeTetgenPoly (std::string &, std::string &)
 method to write in Tetgen/Triangle Poly Format
void writeAlu (std::ostream &)
 method to write macrogridfiles in alu format (cam be used without dune)
void writeAlberta (std::ostream &)
 method to write macrogridfiles in alberta format (cam be used without dune)

Member Function Documentation

bool Dune::DuneGridFormatParser::readDuneGrid ( std::istream &  gridin,
int  dimG = -1,
int  dimW = -1 
) [inherited]

method which reads the dgf file

fills the vtx,element, and bound vectors returns true if reading succeded


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

Generated on Thu Apr 2 10:40:48 2009 for dune-grid by  doxygen 1.5.6