VoronoiMesher is a utility class which helps when setting up an unstructured grid based on a Voronoi diagram. More...
#include <voronoimesher.h>
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 > ¢er)=0 |
Static Public Attributes | |
static const int | DIM = Topology::DIM |
Protected Member Functions | |
FloatCoord< DIM > | randCoord () |
template<typename ITERATOR > | |
void | insertCell (ContainerCellType *container, const FloatCoord< DIM > ¢er, const ITERATOR &begin, const ITERATOR &end) |
Protected Attributes | |
Coord< DIM > | gridDim |
FloatCoord< DIM > | quadrantSize |
double | minCellDistance |
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.
typedef ContainerCellType::Cargo LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::Cargo |
typedef CONTAINER_CELL LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::ContainerCellType |
typedef VoronoiMesherHelpers::Element< typename APITraits::SelectCoordType<CONTAINER_CELL>::Value, typename APITraits::SelectIDType<CONTAINER_CELL>::Value> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::ElementType |
typedef VoronoiMesherHelpers::Equation< typename APITraits::SelectCoordType<CONTAINER_CELL>::Value, typename APITraits::SelectIDType<CONTAINER_CELL>::Value> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::EquationType |
typedef GridBase<ContainerCellType, DIM> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::GridType |
typedef APITraits::SelectTopology<ContainerCellType>::Value LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::Topology |
LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::VoronoiMesher | ( | const Coord< DIM > & | gridDim, | |
const FloatCoord< DIM > & | quadrantSize, | |||
double | minCellDistance | |||
) | [inline] |
virtual LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::~VoronoiMesher | ( | ) | [inline, virtual] |
virtual void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::addCell | ( | ContainerCellType * | container, | |
const FloatCoord< DIM > & | center | |||
) | [pure virtual] |
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.
virtual void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::addRandomCells | ( | GridType * | grid, | |
const Coord< DIM > & | coord, | |||
std::size_t | numCells, | |||
unsigned | seed | |||
) | [inline, virtual] |
void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::fillGeometryData | ( | GridType * | grid | ) | [inline] |
void LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::insertCell | ( | ContainerCellType * | container, | |
const FloatCoord< DIM > & | center, | |||
const ITERATOR & | begin, | |||
const ITERATOR & | end | |||
) | [inline, protected] |
FloatCoord<DIM> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::randCoord | ( | ) | [inline, protected] |
const int LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::DIM = Topology::DIM [static] |
Referenced by LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::randCoord().
Coord<DIM> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::gridDim [protected] |
double LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::minCellDistance [protected] |
FloatCoord<DIM> LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::quadrantSize [protected] |
Referenced by LibGeoDecomp::VoronoiMesher< CONTAINER_CELL >::randCoord().