Chaste Release::3.1
|
#include <VertexElement.hpp>
Public Member Functions | |
VertexElement (unsigned index, const std::vector< VertexElement< ELEMENT_DIM-1, SPACE_DIM > * > &rFaces, const std::vector< bool > &rOrientations) | |
VertexElement (unsigned index) | |
VertexElement (unsigned index, const std::vector< Node< SPACE_DIM > * > &rNodes) | |
VertexElement (unsigned index, const std::vector< VertexElement< ELEMENT_DIM-1, SPACE_DIM > * > &rFaces, const std::vector< bool > &rOrientations, const std::vector< Node< SPACE_DIM > * > &rNodes) | |
~VertexElement () | |
unsigned | GetNumFaces () const |
void | AddFace (VertexElement< ELEMENT_DIM-1, SPACE_DIM > *pFace) |
VertexElement< ELEMENT_DIM-1, SPACE_DIM > * | GetFace (unsigned index) const |
bool | FaceIsOrientatedClockwise (unsigned index) const |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
std::vector< VertexElement < ELEMENT_DIM-1, SPACE_DIM > * > | mFaces |
std::vector< bool > | mOrientations |
Friends | |
class | boost::serialization::access |
An element class for use in the VertexMesh class. The main difference between this and the Element class is that a VertexElement can have a variable number of nodes associated with it.
Definition at line 51 of file VertexElement.hpp.
VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement | ( | unsigned | index, |
const std::vector< VertexElement< ELEMENT_DIM-1, SPACE_DIM > * > & | rFaces, | ||
const std::vector< bool > & | rOrientations | ||
) |
Constructor.
index | global index of the element |
rFaces | vector of faces associated with the element |
rOrientations | vector of orientations of the faces associated with the element |
Definition at line 63 of file VertexElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), VertexElement< ELEMENT_DIM, SPACE_DIM >::mFaces, AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes, VertexElement< ELEMENT_DIM, SPACE_DIM >::mOrientations, and MutableElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().
VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement | ( | unsigned | index | ) |
Alternative constructor.
When constructing a VertexMesh as the Voronoi dual to a Delaunay mesh, each VertexElement is initially constructed without nodes.
index | global index of the element |
Definition at line 96 of file VertexElement.cpp.
VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement | ( | unsigned | index, |
const std::vector< Node< SPACE_DIM > * > & | rNodes | ||
) |
Constructor.
index | global index of the element |
rNodes | vector of Nodes associated with the element |
Definition at line 102 of file VertexElement.cpp.
VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement | ( | unsigned | index, |
const std::vector< VertexElement< ELEMENT_DIM-1, SPACE_DIM > * > & | rFaces, | ||
const std::vector< bool > & | rOrientations, | ||
const std::vector< Node< SPACE_DIM > * > & | rNodes | ||
) |
Constructor used to specify the element completely. This ensures that the nodes and faces are owned by the element *in a specified order*. See #1076 and #1377 for more details.
index | global index of the element |
rFaces | vector of faces associated with the element |
rOrientations | vector of orientations of the faces associated with the element |
rNodes | vector of Nodes associated with the element |
Definition at line 41 of file VertexElement.cpp.
References VertexElement< ELEMENT_DIM, SPACE_DIM >::mFaces, VertexElement< ELEMENT_DIM, SPACE_DIM >::mOrientations, and MutableElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().
VertexElement< ELEMENT_DIM, SPACE_DIM >::~VertexElement | ( | ) |
Destructor.
Definition at line 109 of file VertexElement.cpp.
void VertexElement< ELEMENT_DIM, SPACE_DIM >::AddFace | ( | VertexElement< ELEMENT_DIM-1, SPACE_DIM > * | pFace | ) |
Add a face to the element.
pFace | a pointer to the new face |
Definition at line 120 of file VertexElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes().
Referenced by VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh().
bool VertexElement< ELEMENT_DIM, SPACE_DIM >::FaceIsOrientatedClockwise | ( | unsigned | index | ) | const |
Get whether the face with a given index is oriented clockwise.
index | the index of the face |
Definition at line 155 of file VertexElement.cpp.
VertexElement< ELEMENT_DIM-1, SPACE_DIM > * VertexElement< ELEMENT_DIM, SPACE_DIM >::GetFace | ( | unsigned | index | ) | const |
index | the global index of a specified face |
Definition at line 148 of file VertexElement.cpp.
Referenced by VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElementWithFaces(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetSurfaceAreaOfElement(), and VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement().
unsigned VertexElement< ELEMENT_DIM, SPACE_DIM >::GetNumFaces | ( | ) | const |
Get the number of faces owned by this element.
Definition at line 114 of file VertexElement.cpp.
Referenced by VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetSurfaceAreaOfElement(), and VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement().
void VertexElement< ELEMENT_DIM, SPACE_DIM >::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) | [inline, private] |
Serialize the object and its member variables.
Note that serialization of the mesh and cells is handled by load/save_construct_data.
Note also that member data related to writers is not saved - output must be set up again by the caller after a restart.
archive | the archive |
version | the current version of this class |
Reimplemented from MutableElement< ELEMENT_DIM, SPACE_DIM >.
Definition at line 86 of file VertexElement.hpp.
References VertexElement< ELEMENT_DIM, SPACE_DIM >::mFaces, and VertexElement< ELEMENT_DIM, SPACE_DIM >::mOrientations.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from MutableElement< ELEMENT_DIM, SPACE_DIM >.
Definition at line 73 of file VertexElement.hpp.
std::vector<VertexElement<ELEMENT_DIM-1, SPACE_DIM>*> VertexElement< ELEMENT_DIM, SPACE_DIM >::mFaces [private] |
Faces of the VertexElement, which should be distinct.
Definition at line 58 of file VertexElement.hpp.
Referenced by VertexElement< ELEMENT_DIM, SPACE_DIM >::serialize(), and VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement().
std::vector<bool> VertexElement< ELEMENT_DIM, SPACE_DIM >::mOrientations [private] |
How each face is oriented. From the perspective of the centre of the element, the vertices of each face should be ordered anti clockwise. If and only if this is false, the order of vertices in the corresponding face should be reversed.
N.B. Most faces belong to two elements, but with opposite orientations. This allows us to reuse the face data across the two cells.
Definition at line 70 of file VertexElement.hpp.
Referenced by VertexElement< ELEMENT_DIM, SPACE_DIM >::serialize(), and VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement().