VoronoiTessellation< DIM > Class Template Reference

#include <VoronoiTessellation.hpp>

Collaboration diagram for VoronoiTessellation< DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 VoronoiTessellation (TetrahedralMesh< DIM, DIM > &rMesh, const std::vector< unsigned > locationIndices=std::vector< unsigned >())
 ~VoronoiTessellation ()
const VoronoiCellrGetCell (unsigned index) const
const Face< DIM > & rGetFace (unsigned index) const
unsigned GetNumFaces () const
double GetFaceArea (unsigned index) const
double GetFacePerimeter (unsigned index) const
double GetEdgeLength (unsigned nodeIndex1, unsigned nodeIndex2) const
unsigned GetNumVertices () const
c_vector< double, DIM > * GetVertex (unsigned index)
unsigned GetNumCells ()
template<>
void Initialise (TetrahedralMesh< 1, 1 > &rMesh)
template<>
void Initialise (TetrahedralMesh< 2, 2 > &rMesh)
template<>
void Initialise (TetrahedralMesh< 3, 3 > &rMesh)

Private Member Functions

void GenerateVerticesFromElementCircumcentres ()
void Initialise (TetrahedralMesh< DIM, DIM > &rMesh)

Private Attributes

TetrahedralMesh< DIM, DIM > & mrMesh
std::vector< c_vector< double,
DIM > * > 
mVertices
std::vector< Face< DIM > * > mFaces
std::vector< VoronoiCellmVoronoiCells
std::set< unsignedmLocationIndices

Friends

class TestVoronoiTessellation
class InventorVoronoiWriter

Detailed Description

template<unsigned DIM>
class VoronoiTessellation< DIM >

Voronoi tessellation class. For use in certain mesh-based tissue simulations.

Definition at line 42 of file VoronoiTessellation.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
VoronoiTessellation< DIM >::VoronoiTessellation ( TetrahedralMesh< DIM, DIM > &  rMesh,
const std::vector< unsigned locationIndices = std::vector<unsigned>() 
) [inline]

Constructor. Create a tessellation of the given mesh which must be Delaunay (see TetrahedralMesh::CheckIsVoronoi).

Parameters:
rMesh a tetrahedral mesh
locationIndices an optional vector of location indices that correspond to non-ghost nodes

Definition at line 48 of file VoronoiTessellation.cpp.

References VoronoiTessellation< DIM >::Initialise(), and VoronoiTessellation< DIM >::mLocationIndices.

template<unsigned DIM>
VoronoiTessellation< DIM >::~VoronoiTessellation (  )  [inline]

Member Function Documentation

template<unsigned DIM>
void VoronoiTessellation< DIM >::GenerateVerticesFromElementCircumcentres (  )  [inline, private]
template<unsigned DIM>
double VoronoiTessellation< DIM >::GetEdgeLength ( unsigned  nodeIndex1,
unsigned  nodeIndex2 
) const [inline]
template<unsigned DIM>
double VoronoiTessellation< DIM >::GetFaceArea ( unsigned  index  )  const [inline]
template<unsigned DIM>
double VoronoiTessellation< DIM >::GetFacePerimeter ( unsigned  index  )  const [inline]
template<unsigned DIM>
unsigned VoronoiTessellation< DIM >::GetNumCells (  )  [inline]

Get the number of VoronoiCells in the tessellation.

Definition at line 491 of file VoronoiTessellation.cpp.

References VoronoiTessellation< DIM >::mVoronoiCells.

template<unsigned DIM>
unsigned VoronoiTessellation< DIM >::GetNumFaces (  )  const [inline]

Get the number of faces in the tessellation.

Todo:
If mLocationIndices is not empty, then should this return mLocationIndices.size()? See also #1257.

Definition at line 484 of file VoronoiTessellation.cpp.

References VoronoiTessellation< DIM >::mFaces.

Referenced by InventorVoronoiWriter::Write().

template<unsigned DIM>
unsigned VoronoiTessellation< DIM >::GetNumVertices (  )  const [inline]

Get the number of vertices in the tessellation.

Definition at line 478 of file VoronoiTessellation.cpp.

References VoronoiTessellation< DIM >::mVertices.

Referenced by InventorVoronoiWriter::Write().

template<unsigned DIM>
c_vector< double, DIM > * VoronoiTessellation< DIM >::GetVertex ( unsigned  index  )  [inline]

Get the vertex with a given index.

Parameters:
index 

Definition at line 498 of file VoronoiTessellation.cpp.

References VoronoiTessellation< DIM >::mVertices.

template<>
void VoronoiTessellation< 3 >::Initialise ( TetrahedralMesh< 3, 3 > &  rMesh  )  [inline]
template<>
void VoronoiTessellation< 2 >::Initialise ( TetrahedralMesh< 2, 2 > &  rMesh  )  [inline]
template<>
void VoronoiTessellation< 1 >::Initialise ( TetrahedralMesh< 1, 1 > &  rMesh  )  [inline]

1D version of Initialise method (not implemented).

Parameters:
rMesh a tetrahedral mesh

Definition at line 72 of file VoronoiTessellation.cpp.

template<unsigned DIM>
void VoronoiTessellation< DIM >::Initialise ( TetrahedralMesh< DIM, DIM > &  rMesh  )  [private]

Use a tetrahedral mesh to initialise the faces and vertices of the tessellation.

Parameters:
rMesh the mesh

Referenced by VoronoiTessellation< DIM >::VoronoiTessellation().

template<unsigned DIM>
const VoronoiCell & VoronoiTessellation< DIM >::rGetCell ( unsigned  index  )  const [inline]

Get a VoronoiCell.

Parameters:
index The index of the cell is the index of the corresponding node in the original mesh. If the corresponding node was on the boundary, this will return a cell with no faces.

Definition at line 292 of file VoronoiTessellation.cpp.

References VoronoiTessellation< DIM >::mVoronoiCells.

Referenced by InventorVoronoiWriter::ScaleAndWrite().

template<unsigned DIM>
const Face< DIM > & VoronoiTessellation< DIM >::rGetFace ( unsigned  index  )  const [inline]

Get the face of the VoronoiCell with a given index.

Parameters:
index The index of the cell is the index of the corresponding node in the original mesh.

Definition at line 302 of file VoronoiTessellation.cpp.

References VoronoiTessellation< DIM >::mFaces, and VoronoiTessellation< DIM >::mLocationIndices.


Member Data Documentation

template<unsigned DIM>
std::vector< Face<DIM>* > VoronoiTessellation< DIM >::mFaces [private]
template<unsigned DIM>
std::set<unsigned> VoronoiTessellation< DIM >::mLocationIndices [private]
template<unsigned DIM>
TetrahedralMesh<DIM,DIM>& VoronoiTessellation< DIM >::mrMesh [private]
template<unsigned DIM>
std::vector< c_vector<double,DIM>* > VoronoiTessellation< DIM >::mVertices [private]
template<unsigned DIM>
std::vector< VoronoiCell > VoronoiTessellation< DIM >::mVoronoiCells [private]

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

Generated by  doxygen 1.6.2