VertexElement< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <VertexElement.hpp>

Inherits AbstractElement< ELEMENT_DIM, SPACE_DIM >.

Collaboration diagram for VertexElement< ELEMENT_DIM, SPACE_DIM >:
Collaboration graph
[legend]

List of all members.

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 RegisterWithNodes ()
void MarkAsDeleted ()
void ResetIndex (unsigned index)
void UpdateNode (const unsigned &rIndex, Node< SPACE_DIM > *pNode)
void DeleteNode (const unsigned &rIndex)
void AddNode (const unsigned &rIndex, Node< SPACE_DIM > *pNode)
void AddFace (VertexElement< ELEMENT_DIM-1, SPACE_DIM > *pFace)
unsigned GetNodeLocalIndex (unsigned globalIndex) const
VertexElement< ELEMENT_DIM-1,
SPACE_DIM > * 
GetFace (unsigned index) const
bool FaceIsOrientatedClockwise (unsigned index) const
bool IsElementOnBoundary () 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< boolmOrientations

Friends

class boost::serialization::access

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class VertexElement< ELEMENT_DIM, SPACE_DIM >

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 44 of file VertexElement.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement ( unsigned  index,
const std::vector< VertexElement< ELEMENT_DIM-1, SPACE_DIM > * > &  rFaces,
const std::vector< bool > &  rOrientations 
) [inline]

Constructor.

Parameters:
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 56 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 VertexElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement ( unsigned  index  )  [inline]

Alternative constructor.

When constructing a VertexMesh as the Voronoi dual to a Delaunay mesh, each VertexElement is initially constructed without nodes.

Parameters:
index global index of the element

Definition at line 89 of file VertexElement.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement ( unsigned  index,
const std::vector< Node< SPACE_DIM > * > &  rNodes 
) [inline]

Constructor.

Parameters:
index global index of the element
rNodes vector of Nodes associated with the element

Definition at line 95 of file VertexElement.cpp.

References VertexElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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 
) [inline]

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.

Parameters:
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 34 of file VertexElement.cpp.

References VertexElement< ELEMENT_DIM, SPACE_DIM >::mFaces, VertexElement< ELEMENT_DIM, SPACE_DIM >::mOrientations, and VertexElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexElement< ELEMENT_DIM, SPACE_DIM >::~VertexElement (  )  [inline]

Destructor.

Definition at line 106 of file VertexElement.cpp.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexElement< ELEMENT_DIM, SPACE_DIM >::AddFace ( VertexElement< ELEMENT_DIM-1, SPACE_DIM > *  pFace  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexElement< ELEMENT_DIM, SPACE_DIM >::AddNode ( const unsigned rIndex,
Node< SPACE_DIM > *  pNode 
) [inline]

Add a node to the element between nodes at rIndex and rIndex+1.

Parameters:
rIndex the local index of the node after which the new node is added
pNode a pointer to the new node

When constructing a VertexMesh as the Voronoi dual to a Delaunay mesh, each VertexElement is initially constructed without nodes. We therefore require the two cases below.

Definition at line 177 of file VertexElement.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.

Referenced by VertexElement< ELEMENT_DIM, SPACE_DIM >::AddFace(), and MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode ( const unsigned rIndex  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool VertexElement< ELEMENT_DIM, SPACE_DIM >::FaceIsOrientatedClockwise ( unsigned  index  )  const [inline]

Get whether the face with a given index is oriented clockwise.

Parameters:
index the index of the face

Definition at line 254 of file VertexElement.cpp.

References VertexElement< ELEMENT_DIM, SPACE_DIM >::mOrientations.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexElement< ELEMENT_DIM-1, SPACE_DIM > * VertexElement< ELEMENT_DIM, SPACE_DIM >::GetFace ( unsigned  index  )  const [inline]
Parameters:
index the global index of a specified face
Returns:
a pointer to the face

Definition at line 247 of file VertexElement.cpp.

References VertexElement< ELEMENT_DIM, SPACE_DIM >::mFaces.

Referenced by VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetSurfaceAreaOfElement(), and VertexMesh< ELEMENT_DIM, SPACE_DIM >::GetVolumeOfElement().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex ( unsigned  globalIndex  )  const [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned VertexElement< ELEMENT_DIM, SPACE_DIM >::GetNumFaces (  )  const [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool VertexElement< ELEMENT_DIM, SPACE_DIM >::IsElementOnBoundary (  )  const [inline]

Get whether or not the element is on the boundary by seeing if contains boundary nodes.

Returns:
whether or not the element is on the boundary.

Definition at line 261 of file VertexElement.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexElement< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexElement< ELEMENT_DIM, SPACE_DIM >::ResetIndex ( unsigned  index  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
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.

Parameters:
archive the archive
version the current version of this class

Definition at line 79 of file VertexElement.hpp.

References VertexElement< ELEMENT_DIM, SPACE_DIM >::mFaces, and VertexElement< ELEMENT_DIM, SPACE_DIM >::mOrientations.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexElement< ELEMENT_DIM, SPACE_DIM >::UpdateNode ( const unsigned rIndex,
Node< SPACE_DIM > *  pNode 
) [inline, virtual]

Update node at the given index.

Parameters:
rIndex is an local index to which node to change
pNode is a pointer to the replacement node

Implements AbstractElement< ELEMENT_DIM, SPACE_DIM >.

Definition at line 150 of file VertexElement.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.


Friends And Related Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Definition at line 66 of file VertexElement.hpp.


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<VertexElement<ELEMENT_DIM-1, SPACE_DIM>*> VertexElement< ELEMENT_DIM, SPACE_DIM >::mFaces [private]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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 63 of file VertexElement.hpp.

Referenced by VertexElement< ELEMENT_DIM, SPACE_DIM >::FaceIsOrientatedClockwise(), VertexElement< ELEMENT_DIM, SPACE_DIM >::serialize(), and VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement().


The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:08:10 2011 for Chaste by  doxygen 1.6.3