Chaste
Release::3.4
|
#include <MutableElement.hpp>
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) |
unsigned | GetNodeLocalIndex (unsigned globalIndex) const |
bool | IsElementOnBoundary () 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 () |
Additional Inherited Members | |
Protected Member Functions inherited from AbstractElement< 1, SPACE_DIM > | |
void | ConstructElementAttributes () |
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 |
Specialization for 1d elements so we don't get errors from Boost on some compilers.
Definition at line 173 of file MutableElement.hpp.
MutableElement< 1, SPACE_DIM >::MutableElement | ( | unsigned | index, |
const std::vector< Node< SPACE_DIM > * > & | rNodes | ||
) |
Constructor which takes in a vector of nodes.
index | the index of the element in the mesh |
rNodes | the nodes owned by the element |
Specialization for 1d elements so we don't get errors from Boost on some compilers.
Definition at line 190 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
MutableElement< 1, SPACE_DIM >::MutableElement | ( | unsigned | index | ) |
Alternative constructor.
index | global index of the element |
|
virtual |
Virtual destructor, since this class has virtual methods.
Definition at line 199 of file MutableElement.cpp.
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.
rIndex | the local index of the node after which the new node is added |
pNode | a pointer to the new node |
Definition at line 264 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
void MutableElement< 1, 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 252 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
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
globalIndex | the global index of the node in the mesh |
Definition at line 276 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
bool MutableElement< 1, SPACE_DIM >::IsElementOnBoundary | ( | ) | const |
Get whether or not the element is on the boundary by seeing if contains boundary nodes.
Definition at line 290 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
|
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 213 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIsDeleted, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
|
virtual |
Overridden RegisterWithNodes() method.
Informs all nodes forming this element that they are in this element.
Implements AbstractElement< 1, SPACE_DIM >.
Definition at line 204 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
void MutableElement< 1, SPACE_DIM >::ResetIndex | ( | unsigned | index | ) |
Reset the global index of the element and update its nodes.
index | the new global index |
Definition at line 226 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes, and MutableElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().
|
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< 1, SPACE_DIM >.
Definition at line 237 of file MutableElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.