![]() |
Chaste Commit::333233612e3dcc941d260418acd7b5ccdc30390e
|
#include <MutableElement.hpp>
Public Member Functions | |
MutableElement (unsigned index) | |
MutableElement (unsigned index, const std::vector< Node< SPACE_DIM > * > &rNodes) | |
virtual | ~MutableElement () |
void | RegisterWithNodes () |
void | MarkAsDeleted () |
void | ResetIndex (unsigned index) |
void | UpdateNode (const unsigned &rIndex, Node< SPACE_DIM > *pNode) |
void | DeleteNode (const unsigned &rIndex) |
void | AddNode (Node< SPACE_DIM > *pNode, const unsigned &rIndex) |
unsigned | GetNodeLocalIndex (unsigned globalIndex) const |
void | RegisterWithEdges () |
void | RebuildEdges () |
virtual bool | IsElementOnBoundary () const |
void | SetEdgeHelper (EdgeHelper< SPACE_DIM > *pEdgeHelper) |
void | ClearEdges () |
void | BuildEdges () |
unsigned | GetEdgeGlobalIndex (unsigned localIndex) const |
Edge< SPACE_DIM > * | GetEdge (unsigned localIndex) const |
unsigned | GetNumEdges () const |
std::set< unsigned > | GetNeighbouringElementAtEdgeIndex (unsigned localIndex) |
bool | ContainsEdge (const Edge< SPACE_DIM > *pEdge) const |
long | GetLocalEdgeIndex (const Edge< SPACE_DIM > *pEdge) const |
![]() | |
AbstractElement (unsigned index, const std::vector< Node< SPACE_DIM > * > &rNodes) | |
AbstractElement (unsigned index=INDEX_IS_NOT_USED) | |
virtual | ~AbstractElement () |
void | ReplaceNode (Node< SPACE_DIM > *pOldNode, Node< SPACE_DIM > *pNewNode) |
double | GetNodeLocation (unsigned localIndex, unsigned dimension) const |
c_vector< double, SPACE_DIM > | GetNodeLocation (unsigned localIndex) const |
unsigned | GetNodeGlobalIndex (unsigned localIndex) const |
Node< SPACE_DIM > * | GetNode (unsigned localIndex) const |
unsigned | GetNumNodes () const |
void | AddNode (Node< SPACE_DIM > *pNode) |
bool | IsDeleted () const |
unsigned | GetIndex () const |
void | SetIndex (unsigned index) |
bool | GetOwnership () const |
void | SetOwnership (bool ownership) |
void | SetAttribute (double attribute) |
double | GetAttribute () |
unsigned | GetUnsignedAttribute () |
void | AddElementAttribute (double attribute) |
std::vector< double > & | rGetElementAttributes () |
unsigned | GetNumElementAttributes () |
Protected Attributes | |
std::vector< Edge< SPACE_DIM > * > | mEdges |
EdgeHelper< SPACE_DIM > * | mEdgeHelper |
![]() | |
std::vector< Node< SPACE_DIM > * > | mNodes |
unsigned | mIndex |
bool | mIsDeleted |
bool | mOwnership |
ElementAttributes< ELEMENT_DIM, SPACE_DIM > * | mpElementAttributes |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
![]() | |
void | ConstructElementAttributes () |
A mutable element containing functionality to add and remove nodes.
Definition at line 54 of file MutableElement.hpp.
MutableElement< ELEMENT_DIM, SPACE_DIM >::MutableElement | ( | unsigned | index | ) |
Alternative constructor.
index | global index of the element |
Definition at line 41 of file MutableElement.cpp.
MutableElement< ELEMENT_DIM, SPACE_DIM >::MutableElement | ( | 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 48 of file MutableElement.cpp.
References MutableElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().
|
virtual |
Destructor.
Definition at line 60 of file MutableElement.cpp.
void MutableElement< ELEMENT_DIM, SPACE_DIM >::AddNode | ( | Node< SPACE_DIM > * | pNode, |
const unsigned & | rIndex | ||
) |
Add a node to the element between nodes at rIndex and rIndex+1.
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 MutableElement is initially constructed without nodes. We therefore require the two cases below for nodes.
Definition at line 173 of file MutableElement.cpp.
Referenced by Cylindrical2dVertexMesh::Cylindrical2dVertexMesh(), Toroidal2dVertexMesh::Toroidal2dVertexMesh(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformProtorosetteResolution(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformRosetteRankDecrease(), and MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap().
void MutableElement< ELEMENT_DIM, SPACE_DIM >::BuildEdges | ( | ) |
Builds edges from element nodes
Definition at line 286 of file MutableElement.cpp.
void MutableElement< ELEMENT_DIM, SPACE_DIM >::ClearEdges | ( | ) |
Clear edges from element
Definition at line 276 of file MutableElement.cpp.
bool MutableElement< ELEMENT_DIM, SPACE_DIM >::ContainsEdge | ( | const Edge< SPACE_DIM > * | pEdge | ) | const |
Checks if the element contains an edge.
pEdge | pointer to an edge |
Definition at line 331 of file MutableElement.cpp.
void MutableElement< ELEMENT_DIM, SPACE_DIM >::DeleteNode | ( | const unsigned & | rIndex | ) |
Delete a node with given local index.
rIndex | is the local index of the node to remove |
Definition at line 136 of file MutableElement.cpp.
Referenced by PottsMesh< DIM >::DivideElement(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformProtorosetteResolution(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformRosetteRankDecrease(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT2Swap(), and MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap().
Edge< SPACE_DIM > * MutableElement< ELEMENT_DIM, SPACE_DIM >::GetEdge | ( | unsigned | localIndex | ) | const |
Gets the edge at localIndex
localIndex | local index of the edge in this element |
Definition at line 312 of file MutableElement.cpp.
Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT2Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap(), and VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordCellDivideOperation().
unsigned MutableElement< ELEMENT_DIM, SPACE_DIM >::GetEdgeGlobalIndex | ( | unsigned | localIndex | ) | const |
Gets the global index of the edge at localIndex
localIndex | local index of the edge in this element |
Definition at line 305 of file MutableElement.cpp.
long MutableElement< ELEMENT_DIM, SPACE_DIM >::GetLocalEdgeIndex | ( | const Edge< SPACE_DIM > * | pEdge | ) | const |
Return the local index of an edge.
pEdge | pointer to an edge |
Definition at line 344 of file MutableElement.cpp.
Referenced by VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordCellDivideOperation(), and VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordNodeMergeOperation().
std::set< unsigned > MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNeighbouringElementAtEdgeIndex | ( | unsigned | localIndex | ) |
Gets a set of element indices that neighours the element at the specified edge
localIndex | Local index of the edge in this element |
Definition at line 324 of file MutableElement.cpp.
unsigned MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocalIndex | ( | unsigned | globalIndex | ) | const |
Calculate the local index of a node given a global index if node is not contained in element return UINT_MAX.
globalIndex | the global index of the node in the mesh |
Definition at line 225 of file MutableElement.cpp.
Referenced by FarhadifarForce< DIM >::AddForceContribution(), NagaiHondaForce< DIM >::AddForceContribution(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideEdge(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::IdentifySwapType(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformIntersectionSwap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformProtorosetteResolution(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformRosetteRankDecrease(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT2Swap(), and MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap().
unsigned MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNumEdges | ( | ) | const |
Definition at line 319 of file MutableElement.cpp.
Referenced by MutableVertexMesh< 2, 2 >::DeleteElementPriorToReMesh(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT2Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap(), VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordCellDivideOperation(), VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordEdgeMergeOperation(), VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordEdgeSplitOperation(), VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordNewEdgeOperation(), and VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordNodeMergeOperation().
|
virtual |
Get whether or not the element is on the boundary by seeing if contains boundary nodes.
Reimplemented in ImmersedBoundaryElement< ELEMENT_DIM, SPACE_DIM >, ImmersedBoundaryElement< ELEMENT_DIM - 1, SPACE_DIM >, and ImmersedBoundaryElement< ELEMENT_DIM-1, SPACE_DIM >.
Definition at line 255 of file MutableElement.cpp.
|
virtual |
Overridden MarkAsDeleted() method.
Mark an element as having been removed from the mesh. Also notify nodes in the element that it has been removed.
Implements AbstractElement< ELEMENT_DIM, SPACE_DIM >.
Definition at line 74 of file MutableElement.cpp.
void MutableElement< ELEMENT_DIM, SPACE_DIM >::RebuildEdges | ( | ) |
Rebuild edges in this element.
Definition at line 248 of file MutableElement.cpp.
void MutableElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithEdges | ( | ) |
Inform all edges forming this element that they are in this element.
Definition at line 239 of file MutableElement.cpp.
|
virtual |
Overridden RegisterWithNodes() method.
Informs all nodes forming this element that they are in this element.
Implements AbstractElement< ELEMENT_DIM, SPACE_DIM >.
Definition at line 65 of file MutableElement.cpp.
Referenced by MutableElement< ELEMENT_DIM, SPACE_DIM >::MutableElement(), VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement(), VertexElement< ELEMENT_DIM, SPACE_DIM >::VertexElement(), and PottsMesh< DIM >::AddElement().
void MutableElement< ELEMENT_DIM, SPACE_DIM >::ResetIndex | ( | unsigned | index | ) |
Reset the global index of the element and update its nodes.
index | the new global index |
Definition at line 92 of file MutableElement.cpp.
|
inlineprivate |
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 |
Definition at line 71 of file MutableElement.hpp.
void MutableElement< ELEMENT_DIM, SPACE_DIM >::SetEdgeHelper | ( | EdgeHelper< SPACE_DIM > * | pEdgeHelper | ) |
Sets edge helper.
pEdgeHelper | pointer to an edge helper |
Definition at line 270 of file MutableElement.cpp.
|
virtual |
Update node at the given index.
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 110 of file MutableElement.cpp.
Needed for serialization.
Definition at line 58 of file MutableElement.hpp.
|
protected |
EdgeHelper class to keep track of edges
Definition at line 82 of file MutableElement.hpp.
|
protected |
The edges forming this element
Definition at line 79 of file MutableElement.hpp.