Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
MutableElement< 1, SPACE_DIM > Class Template Reference

#include <MutableElement.hpp>

+ Inheritance diagram for MutableElement< 1, SPACE_DIM >:
+ Collaboration diagram for MutableElement< 1, SPACE_DIM >:

Public Member Functions

 MutableElement (unsigned index, const std::vector< Node< SPACE_DIM > * > &rNodes)
 
 MutableElement (unsigned index)
 
virtual ~MutableElement ()
 
void UpdateNode (const unsigned &rIndex, Node< SPACE_DIM > *pNode)
 
void RegisterWithNodes ()
 
void MarkAsDeleted ()
 
void ResetIndex (unsigned index)
 
void DeleteNode (const unsigned &rIndex)
 
void AddNode (Node< SPACE_DIM > *pNode, const unsigned &rIndex)
 
Edge< SPACE_DIM > * GetEdge (unsigned localIndex) const
 
bool ContainsEdge (const Edge< SPACE_DIM > *pEdge) const
 
unsigned GetNumEdges () const
 
void SetEdgeHelper (EdgeHelper< SPACE_DIM > *pEdgeHelper)
 
void BuildEdges ()
 
void ClearEdges ()
 
unsigned GetEdgeGlobalIndex (unsigned localIndex) const
 
std::set< unsignedGetNeighbouringElementAtEdgeIndex (unsigned localIndex)
 
unsigned GetNodeLocalIndex (unsigned globalIndex) const
 
void RegisterWithEdges ()
 
void RebuildEdges ()
 
virtual bool IsElementOnBoundary () const
 
long GetLocalEdgeIndex (const Edge< SPACE_DIM > *pEdge) const
 
- Public Member Functions inherited from AbstractElement< 1, SPACE_DIM >
 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
 
- Protected Attributes inherited from AbstractElement< 1, SPACE_DIM >
std::vector< Node< SPACE_DIM > * > mNodes
 
unsigned mIndex
 
bool mIsDeleted
 
bool mOwnership
 
ElementAttributes< ELEMENT_DIM, SPACE_DIM > * mpElementAttributes
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractElement< 1, SPACE_DIM >
void ConstructElementAttributes ()
 

Detailed Description

template<unsigned SPACE_DIM>
class MutableElement< 1, SPACE_DIM >

Specialization for 1d elements so we don't get errors from Boost on some compilers.

Definition at line 253 of file MutableElement.hpp.

Constructor & Destructor Documentation

◆ MutableElement() [1/2]

template<unsigned SPACE_DIM>
MutableElement< 1, SPACE_DIM >::MutableElement ( unsigned  index,
const std::vector< Node< SPACE_DIM > * > &  rNodes 
)

Constructor which takes in a vector of nodes.

Parameters
indexthe index of the element in the mesh
rNodesthe nodes owned by the element

Specialization for 1d elements so we don't get errors from Boost on some compilers.

Definition at line 368 of file MutableElement.cpp.

◆ MutableElement() [2/2]

template<unsigned SPACE_DIM>
MutableElement< 1, SPACE_DIM >::MutableElement ( unsigned  index)

Alternative constructor.

Parameters
indexglobal index of the element

◆ ~MutableElement()

template<unsigned SPACE_DIM>
MutableElement< 1, SPACE_DIM >::~MutableElement ( )
virtual

Virtual destructor, since this class has virtual methods.

Definition at line 377 of file MutableElement.cpp.

Member Function Documentation

◆ AddNode()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::AddNode ( Node< SPACE_DIM > *  pNode,
const unsigned rIndex 
)

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

Parameters
rIndexthe local index of the node after which the new node is added
pNodea pointer to the new node

Definition at line 532 of file MutableElement.cpp.

◆ BuildEdges()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::BuildEdges ( )

Builds edges from element nodes

Definition at line 448 of file MutableElement.cpp.

◆ ClearEdges()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::ClearEdges ( )

Clear edges from element

Definition at line 467 of file MutableElement.cpp.

◆ ContainsEdge()

template<unsigned SPACE_DIM>
bool MutableElement< 1, SPACE_DIM >::ContainsEdge ( const Edge< SPACE_DIM > *  pEdge) const

Check if the element contains an edge.

Parameters
pEdgepointer to an edge
Returns
whether the element contains pEdge

Definition at line 429 of file MutableElement.cpp.

◆ DeleteNode()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::DeleteNode ( const unsigned rIndex)

Delete a node with given local index.

Parameters
rIndexis the local index of the node to remove

Definition at line 520 of file MutableElement.cpp.

◆ GetEdge()

template<unsigned SPACE_DIM>
Edge< SPACE_DIM > * MutableElement< 1, SPACE_DIM >::GetEdge ( unsigned  localIndex) const

Get the edge at localIndex.

Parameters
localIndexlocal index of an edge in this element
Returns
pointer to the edge with given local index

Definition at line 422 of file MutableElement.cpp.

◆ GetEdgeGlobalIndex()

template<unsigned SPACE_DIM>
unsigned MutableElement< 1, SPACE_DIM >::GetEdgeGlobalIndex ( unsigned  localIndex) const

Gets the global index of the edge at localIndex

Parameters
localIndexlocal index of the edge in this element
Returns
Global index of the edge

Definition at line 491 of file MutableElement.cpp.

◆ GetLocalEdgeIndex()

template<unsigned SPACE_DIM>
long MutableElement< 1, SPACE_DIM >::GetLocalEdgeIndex ( const Edge< SPACE_DIM > *  pEdge) const

Return the local index of an edge.

Parameters
pEdgepointer to an edge
Returns
-1 if an edge was not found, else the local index of pEdge

Definition at line 477 of file MutableElement.cpp.

◆ GetNeighbouringElementAtEdgeIndex()

template<unsigned SPACE_DIM>
std::set< unsigned > MutableElement< 1, SPACE_DIM >::GetNeighbouringElementAtEdgeIndex ( unsigned  localIndex)

Gets a set of element indices that neighours the element at the specified edge

Parameters
localIndexLocal index of the edge in this element
Returns
A set of element indices that neighbours this edge

Definition at line 498 of file MutableElement.cpp.

◆ GetNodeLocalIndex()

template<unsigned SPACE_DIM>
unsigned MutableElement< 1, 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

Parameters
globalIndexthe global index of the node in the mesh
Returns
local_index.

Definition at line 544 of file MutableElement.cpp.

◆ GetNumEdges()

template<unsigned SPACE_DIM>
unsigned MutableElement< 1, SPACE_DIM >::GetNumEdges ( ) const
Returns
Number of edges associated with this element

Definition at line 417 of file MutableElement.cpp.

◆ IsElementOnBoundary()

template<unsigned SPACE_DIM>
bool MutableElement< 1, SPACE_DIM >::IsElementOnBoundary ( ) const
virtual

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.

Reimplemented in ImmersedBoundaryElement< 1, SPACE_DIM >.

Definition at line 569 of file MutableElement.cpp.

◆ MarkAsDeleted()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::MarkAsDeleted ( )
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< 1, SPACE_DIM >.

Definition at line 391 of file MutableElement.cpp.

◆ RebuildEdges()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::RebuildEdges ( )

Rebuild edges in this element.

Definition at line 564 of file MutableElement.cpp.

◆ RegisterWithEdges()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::RegisterWithEdges ( )

Inform all edges forming this element that they are in this element.

Definition at line 559 of file MutableElement.cpp.

◆ RegisterWithNodes()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::RegisterWithNodes ( )
virtual

Overridden RegisterWithNodes() method.

Informs all nodes forming this element that they are in this element.

Implements AbstractElement< 1, SPACE_DIM >.

Definition at line 382 of file MutableElement.cpp.

◆ ResetIndex()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::ResetIndex ( unsigned  index)

Reset the global index of the element and update its nodes.

Parameters
indexthe new global index

Definition at line 404 of file MutableElement.cpp.

◆ SetEdgeHelper()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::SetEdgeHelper ( EdgeHelper< SPACE_DIM > *  pEdgeHelper)

Sets edge helper.

Parameters
pEdgeHelperpointer to an edge helper

Definition at line 442 of file MutableElement.cpp.

◆ UpdateNode()

template<unsigned SPACE_DIM>
void MutableElement< 1, SPACE_DIM >::UpdateNode ( const unsigned rIndex,
Node< SPACE_DIM > *  pNode 
)
virtual

Update node at the given index.

Parameters
rIndexis an local index to which node to change
pNodeis a pointer to the replacement node

Implements AbstractElement< 1, SPACE_DIM >.

Definition at line 505 of file MutableElement.cpp.

References Node< SPACE_DIM >::AddElement().

Member Data Documentation

◆ mEdgeHelper

template<unsigned SPACE_DIM>
EdgeHelper<SPACE_DIM>* MutableElement< 1, SPACE_DIM >::mEdgeHelper
protected

EdgeHelper class to keep track of edges

Definition at line 261 of file MutableElement.hpp.

◆ mEdges

template<unsigned SPACE_DIM>
std::vector<Edge<SPACE_DIM>*> MutableElement< 1, SPACE_DIM >::mEdges
protected

The edges forming this element

Definition at line 258 of file MutableElement.hpp.


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