Dune::GridFactoryInterface< GridType > Class Template Reference

#include <gridfactory.hh>

Inheritance diagram for Dune::GridFactoryInterface< GridType >:

Dune::GridFactory< GridType > Dune::GridFactory< AlbertaGrid< dim, dimworld > > Dune::GridFactory< UGGrid< dimworld > >

List of all members.


Detailed Description

template<class GridType>
class Dune::GridFactoryInterface< GridType >

Provide a generic factory class for unstructured grids.

This base class declares the interface.

Public Member Functions

 GridFactoryInterface ()
 Default constructor.
 GridFactoryInterface (GridType *grid)
 Constructor for a given grid object.
virtual void insertVertex (const FieldVector< ctype, dimworld > &pos)=0
 Insert a vertex into the coarse 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.
virtual GridTypecreateGrid ()=0
 Finalize grid creation and hand over the grid.

Protected Types

typedef GridType::ctype ctype
 Type used by the grid for coordinates.


Constructor & Destructor Documentation

template<class GridType>
Dune::GridFactoryInterface< GridType >::GridFactoryInterface ( 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::GridFactoryInterface< GridType >::insertElement ( const GeometryType &  type,
const std::vector< unsigned int > &  vertices 
) [pure 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

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]

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 > >.

template<class GridType>
virtual GridType* Dune::GridFactoryInterface< GridType >::createGrid (  )  [pure virtual]

Finalize grid creation and hand over the grid.

The receiver takes responsibility of the memory allocated for the grid

Implemented in Dune::GridFactory< AlbertaGrid< dim, dimworld > >, Dune::GridFactory< GridType >, and 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