Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes

LibGeoDecomp::VoronoiMesher< CONTAINER_CELL > Class Template Reference

VoronoiMesher is a utility class which helps when setting up an unstructured grid based on a Voronoi diagram. More...

#include <voronoimesher.h>

Collaboration diagram for LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef CONTAINER_CELL ContainerCellType
typedef ContainerCellType::Cargo Cargo
typedef
VoronoiMesherHelpers::Element
< typename
APITraits::SelectCoordType
< CONTAINER_CELL >::Value,
typename
APITraits::SelectIDType
< CONTAINER_CELL >::Value > 
ElementType
typedef
VoronoiMesherHelpers::Equation
< typename
APITraits::SelectCoordType
< CONTAINER_CELL >::Value,
typename
APITraits::SelectIDType
< CONTAINER_CELL >::Value > 
EquationType
typedef
APITraits::SelectTopology
< ContainerCellType >::Value 
Topology
typedef GridBase
< ContainerCellType, DIM
GridType

Public Member Functions

 VoronoiMesher (const Coord< DIM > &gridDim, const FloatCoord< DIM > &quadrantSize, double minCellDistance)
virtual ~VoronoiMesher ()
void addRandomCells (GridType *grid, const Coord< DIM > &coord, std::size_t numCells)
 Adds a number of random cells to the grid cell (quadrant).
virtual void addRandomCells (GridType *grid, const Coord< DIM > &coord, std::size_t numCells, unsigned seed)
void fillGeometryData (GridType *grid)
virtual void addCell (ContainerCellType *container, const FloatCoord< DIM > &center)=0

Static Public Attributes

static const int DIM = Topology::DIM

Protected Member Functions

FloatCoord< DIMrandCoord ()
template<typename ITERATOR >
void insertCell (ContainerCellType *container, const FloatCoord< DIM > &center, const ITERATOR &begin, const ITERATOR &end)

Protected Attributes

Coord< DIMgridDim
FloatCoord< DIMquadrantSize
double minCellDistance

Detailed Description

template<typename CONTAINER_CELL>
class LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >

VoronoiMesher is a utility class which helps when setting up an unstructured grid based on a Voronoi diagram.

It is meant to be embedded into an Initializer for setting up neighberhood relationships, element shapes, boundary lenghts and aeras.

It assumes that mesh generation is blocked into certain logical quadrants (container cells), and that edges betreen any two cells will always start/end in the same or adjacent quadrants.


Member Typedef Documentation

template<typename CONTAINER_CELL >
typedef ContainerCellType::Cargo LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::Cargo
template<typename CONTAINER_CELL >
typedef CONTAINER_CELL LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::ContainerCellType
template<typename CONTAINER_CELL >
typedef VoronoiMesherHelpers::Element< typename APITraits::SelectCoordType<CONTAINER_CELL>::Value, typename APITraits::SelectIDType<CONTAINER_CELL>::Value> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::ElementType
template<typename CONTAINER_CELL >
typedef VoronoiMesherHelpers::Equation< typename APITraits::SelectCoordType<CONTAINER_CELL>::Value, typename APITraits::SelectIDType<CONTAINER_CELL>::Value> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::EquationType
template<typename CONTAINER_CELL >
typedef GridBase<ContainerCellType, DIM> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::GridType
template<typename CONTAINER_CELL >
typedef APITraits::SelectTopology<ContainerCellType>::Value LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::Topology

Constructor & Destructor Documentation

template<typename CONTAINER_CELL >
LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::VoronoiMesher ( const Coord< DIM > &  gridDim,
const FloatCoord< DIM > &  quadrantSize,
double  minCellDistance 
) [inline]
template<typename CONTAINER_CELL >
virtual LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::~VoronoiMesher (  )  [inline, virtual]

Member Function Documentation

template<typename CONTAINER_CELL >
virtual void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::addCell ( ContainerCellType container,
const FloatCoord< DIM > &  center 
) [pure virtual]
template<typename CONTAINER_CELL >
void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::addRandomCells ( GridType grid,
const Coord< DIM > &  coord,
std::size_t  numCells 
) [inline]

Adds a number of random cells to the grid cell (quadrant).

The seed of the random number generator will depend on the quadrant's logical coordinate to ensure consistency when initializing in parallel, across multiple nodes.

template<typename CONTAINER_CELL >
virtual void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::addRandomCells ( GridType grid,
const Coord< DIM > &  coord,
std::size_t  numCells,
unsigned  seed 
) [inline, virtual]
template<typename CONTAINER_CELL >
void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::fillGeometryData ( GridType grid  )  [inline]
template<typename CONTAINER_CELL >
template<typename ITERATOR >
void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::insertCell ( ContainerCellType container,
const FloatCoord< DIM > &  center,
const ITERATOR &  begin,
const ITERATOR &  end 
) [inline, protected]
template<typename CONTAINER_CELL >
FloatCoord<DIM> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::randCoord (  )  [inline, protected]

Member Data Documentation

template<typename CONTAINER_CELL >
const int LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::DIM = Topology::DIM [static]
template<typename CONTAINER_CELL >
Coord<DIM> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::gridDim [protected]
template<typename CONTAINER_CELL >
double LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::minCellDistance [protected]
template<typename CONTAINER_CELL >
FloatCoord<DIM> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::quadrantSize [protected]

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