Dune::GridFactory< GridType > Class Template Reference

#include <gridfactory.hh>

Inheritance diagram for Dune::GridFactory< GridType >:

Dune::GridFactoryInterface< GridType >

List of all members.


Detailed Description

template<class GridType>
class Dune::GridFactory< GridType >

Provide a generic factory class for unstructured grids.

This is the unspecialized class, which does nothing. All work is done in the specializations for the different grid types.

Public Member Functions

 GridFactory ()
 Default constructor.
 GridFactory (GridType *grid)
 Constructor for a given grid object.
virtual void insertVertex (const FieldVector< ctype, dimworld > &pos)
 Insert a vertex into the coarse grid.
virtual void insertElement (GeometryType type, const std::vector< unsigned int > &vertices)
 Insert an element into the coarse grid.
virtual GridTypecreateGrid ()
 Finalize grid creation and hand over the grid.
virtual void insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices)=0
 Insert an element into the coarse grid.
virtual void insertBoundarySegment (const std::vector< unsigned int > vertices, const BoundarySegment< dimworld > *boundarySegment)
 Method to insert an arbitrarily shaped boundary segment into a coarse grid.


Constructor & Destructor Documentation

template<class GridType>
Dune::GridFactory< GridType >::GridFactory ( GridType grid  )  [inline]

Constructor for a given grid object.

If you already have your grid object constructed you can hand it over using this constructor. A reason may be that you have need a UGGrid object with a non-default heap size.

If you construct your factory class using this constructor the pointer handed over to you by the method createGrid() is the one you supplied here.


Member Function Documentation

template<class GridType>
virtual void Dune::GridFactory< GridType >::insertElement ( GeometryType  type,
const std::vector< unsigned int > &  vertices 
) [inline, virtual]

Insert an element into the coarse grid.

Parameters:
type The GeometryType of the new element
vertices The vertices of the new element, using the DUNE numbering

Referenced by Dune::StarCDReader< GridType >::read().

template<class GridType>
virtual GridType* Dune::GridFactory< GridType >::createGrid (  )  [inline, virtual]

Finalize grid creation and hand over the grid.

The receiver takes responsibility of the memory allocated for the grid

Implements Dune::GridFactoryInterface< GridType >.

Referenced by Dune::GridFactory< AlbertaGrid< dim, dimworld > >::createGrid(), Dune::StarCDReader< GridType >::read(), and Dune::AmiraMeshReader< GridType >::read().

template<class GridType>
virtual void Dune::GridFactoryInterface< GridType >::insertElement ( const GeometryType &  type,
const std::vector< unsigned int > &  vertices 
) [pure virtual, inherited]

Insert an element into the coarse grid.

Parameters:
type The GeometryType of the new element
vertices The vertices of the new element, using the DUNE numbering

Implemented in Dune::GridFactory< AlbertaGrid< dim, dimworld > >, and Dune::GridFactory< UGGrid< dimworld > >.

template<class GridType>
virtual void Dune::GridFactoryInterface< GridType >::insertBoundarySegment ( const std::vector< unsigned int >  vertices,
const BoundarySegment< dimworld > *  boundarySegment 
) [inline, virtual, inherited]

Method to insert an arbitrarily shaped boundary segment into a coarse grid.

Parameters:
vertices The indices of the vertices of the segment
boundarySegment Class implementing the geometry of the boundary segment. The grid object takes control of this object and deallocates it when destructing itself.

Reimplemented in Dune::GridFactory< UGGrid< dimworld > >.


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

Generated on Tue Jul 28 22:28:34 2009 for dune-grid by  doxygen 1.5.6