#include <VoronoiTessellation.hpp>
Public Member Functions | |
VoronoiTessellation (TetrahedralMesh< DIM, DIM > &rMesh) | |
~VoronoiTessellation () | |
const VoronoiCell & | rGetCell (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< VoronoiCell > | mVoronoiCells |
Friends | |
class | TestVoronoiTessellation |
class | InventorVoronoiWriter |
Definition at line 43 of file VoronoiTessellation.hpp.
VoronoiTessellation< DIM >::VoronoiTessellation | ( | TetrahedralMesh< DIM, DIM > & | rMesh | ) | [inline] |
Constructor. Create a tessellation of the given mesh which must be Delaunay (see TetrahedralMesh::CheckVoronoi).
rMesh | a tetrahedral mesh |
Definition at line 39 of file VoronoiTessellation.cpp.
References VoronoiTessellation< DIM >::GenerateVerticesFromElementCircumcentres(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), VoronoiTessellation< DIM >::Initialise(), and VoronoiTessellation< DIM >::mVoronoiCells.
VoronoiTessellation< DIM >::~VoronoiTessellation | ( | ) | [inline] |
Destructor.
Definition at line 237 of file VoronoiTessellation.cpp.
References VoronoiTessellation< DIM >::mFaces, and VoronoiTessellation< DIM >::mVertices.
void VoronoiTessellation< DIM >::GenerateVerticesFromElementCircumcentres | ( | ) | [inline, private] |
Generate the vertices of the tessellation using the circumcentres of the mesh elements.
Definition at line 256 of file VoronoiTessellation.cpp.
References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetInverseJacobianForElement(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), VoronoiTessellation< DIM >::mrMesh, and VoronoiTessellation< DIM >::mVertices.
Referenced by VoronoiTessellation< DIM >::VoronoiTessellation().
void VoronoiTessellation< DIM >::Initialise | ( | TetrahedralMesh< DIM, DIM > & | rMesh | ) | [private] |
Use a tetrahedral mesh to initialise the faces and vertices of the tessellation.
rMesh | the mesh |
Referenced by VoronoiTessellation< DIM >::VoronoiTessellation().
const VoronoiCell & VoronoiTessellation< DIM >::rGetCell | ( | unsigned | index | ) | const [inline] |
Get a VoronoiCell.
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 276 of file VoronoiTessellation.cpp.
References VoronoiTessellation< DIM >::mVoronoiCells.
Referenced by InventorVoronoiWriter::ScaleAndWrite().
const Face< DIM > & VoronoiTessellation< DIM >::rGetFace | ( | unsigned | index | ) | const [inline] |
Get the face of the VoronoiCell with a given index.
index | The index of the cell is the index of the corresponding node in the original mesh. |
Definition at line 282 of file VoronoiTessellation.cpp.
References VoronoiTessellation< DIM >::mFaces.
unsigned VoronoiTessellation< DIM >::GetNumFaces | ( | ) | const [inline] |
Get the number of faces in the tessellation.
Definition at line 402 of file VoronoiTessellation.cpp.
References VoronoiTessellation< DIM >::mFaces.
Referenced by InventorVoronoiWriter::Write().
double VoronoiTessellation< DIM >::GetFaceArea | ( | unsigned | index | ) | const [inline] |
Get the area of the face with a given index.
index |
Definition at line 336 of file VoronoiTessellation.cpp.
References Face< DIM >::GetNumVertices(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetVectorFromAtoB(), VoronoiTessellation< DIM >::mFaces, VoronoiTessellation< DIM >::mrMesh, and Face< DIM >::rGetVertex().
Referenced by MeshBasedTissue< DIM >::GetDampingConstant().
double VoronoiTessellation< DIM >::GetFacePerimeter | ( | unsigned | index | ) | const [inline] |
Get the perimeter of the face with a given index.
index |
Definition at line 366 of file VoronoiTessellation.cpp.
References Face< DIM >::GetNumVertices(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetVectorFromAtoB(), VoronoiTessellation< DIM >::mFaces, VoronoiTessellation< DIM >::mrMesh, and Face< DIM >::rGetVertex().
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor().
double VoronoiTessellation< DIM >::GetEdgeLength | ( | unsigned | nodeIndex1, | |
unsigned | nodeIndex2 | |||
) | const [inline] |
Get the length of the tessellation edge between two given nodes.
nodeIndex1 | ||
nodeIndex2 |
Definition at line 292 of file VoronoiTessellation.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetVectorFromAtoB(), VoronoiTessellation< DIM >::mFaces, and VoronoiTessellation< DIM >::mrMesh.
Referenced by LinearSpringWithVariableSpringConstantsForce< DIM >::VariableSpringConstantMultiplicationFactor().
unsigned VoronoiTessellation< DIM >::GetNumVertices | ( | ) | const [inline] |
Get the number of vertices in the tessellation.
Definition at line 396 of file VoronoiTessellation.cpp.
References VoronoiTessellation< DIM >::mVertices.
Referenced by InventorVoronoiWriter::Write().
c_vector< double, DIM > * VoronoiTessellation< DIM >::GetVertex | ( | unsigned | index | ) | [inline] |
Get the vertex with a given index.
index |
Definition at line 415 of file VoronoiTessellation.cpp.
References VoronoiTessellation< DIM >::mVertices.
unsigned VoronoiTessellation< DIM >::GetNumCells | ( | ) | [inline] |
Get the number of VoronoiCells in the tessellation.
Definition at line 408 of file VoronoiTessellation.cpp.
References VoronoiTessellation< DIM >::mVoronoiCells.
void VoronoiTessellation< 1 >::Initialise | ( | TetrahedralMesh< 1, 1 > & | rMesh | ) | [inline] |
1D version of Initialise method (not implemented).
rMesh | a tetrahedral mesh |
Definition at line 61 of file VoronoiTessellation.cpp.
void VoronoiTessellation< 2 >::Initialise | ( | TetrahedralMesh< 2, 2 > & | rMesh | ) | [inline] |
2D version of Initialise method.
rMesh | a tetrahedral mesh |
Definition at line 73 of file VoronoiTessellation.cpp.
References VertexAndAngle< DIM >::ComputeAndSetAngle(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetInverseJacobianForElement(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumAllNodes(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), VoronoiTessellation< DIM >::mFaces, VoronoiTessellation< DIM >::mrMesh, VoronoiTessellation< DIM >::mVertices, and VertexAndAngle< DIM >::SetVertex().
void VoronoiTessellation< 3 >::Initialise | ( | TetrahedralMesh< 3, 3 > & | rMesh | ) | [inline] |
3D version of Initialise method.
rMesh | a tetrahedral mesh |
Definition at line 144 of file VoronoiTessellation.cpp.
References VertexAndAngle< DIM >::ComputeAndSetAngle(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesBegin(), TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::EdgesEnd(), Node< SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::IsBoundaryNode(), VoronoiTessellation< DIM >::mFaces, VoronoiTessellation< DIM >::mrMesh, VoronoiTessellation< DIM >::mVertices, VoronoiTessellation< DIM >::mVoronoiCells, Node< SPACE_DIM >::rGetContainingElementIndices(), Node< SPACE_DIM >::rGetLocation(), and VertexAndAngle< DIM >::SetVertex().
TetrahedralMesh<DIM,DIM>& VoronoiTessellation< DIM >::mrMesh [private] |
A tetrahedral mesh.
Definition at line 51 of file VoronoiTessellation.hpp.
Referenced by VoronoiTessellation< DIM >::GenerateVerticesFromElementCircumcentres(), VoronoiTessellation< DIM >::GetEdgeLength(), VoronoiTessellation< DIM >::GetFaceArea(), VoronoiTessellation< DIM >::GetFacePerimeter(), and VoronoiTessellation< DIM >::Initialise().
std::vector< c_vector<double,DIM>* > VoronoiTessellation< DIM >::mVertices [private] |
Vertices correspond to elements of the mesh.
Definition at line 54 of file VoronoiTessellation.hpp.
Referenced by VoronoiTessellation< DIM >::GenerateVerticesFromElementCircumcentres(), VoronoiTessellation< DIM >::GetNumVertices(), VoronoiTessellation< DIM >::GetVertex(), VoronoiTessellation< DIM >::Initialise(), InventorVoronoiWriter::Write(), and VoronoiTessellation< DIM >::~VoronoiTessellation().
std::vector< Face<DIM>* > VoronoiTessellation< DIM >::mFaces [private] |
Faces corespond to edges of the mesh.
Definition at line 57 of file VoronoiTessellation.hpp.
Referenced by VoronoiTessellation< DIM >::GetEdgeLength(), VoronoiTessellation< DIM >::GetFaceArea(), VoronoiTessellation< DIM >::GetFacePerimeter(), VoronoiTessellation< DIM >::GetNumFaces(), VoronoiTessellation< DIM >::Initialise(), VoronoiTessellation< DIM >::rGetFace(), InventorVoronoiWriter::Write(), and VoronoiTessellation< DIM >::~VoronoiTessellation().
std::vector< VoronoiCell > VoronoiTessellation< DIM >::mVoronoiCells [private] |
Cells correspond to nodes of the mesh.
Definition at line 60 of file VoronoiTessellation.hpp.
Referenced by VoronoiTessellation< DIM >::GetNumCells(), VoronoiTessellation< DIM >::Initialise(), VoronoiTessellation< DIM >::rGetCell(), InventorVoronoiWriter::ScaleAndWrite(), and VoronoiTessellation< DIM >::VoronoiTessellation().