#include <AbstractElement.hpp>
Public Member Functions | |
AbstractElement (unsigned index, const std::vector< Node< SPACE_DIM > * > &rNodes) | |
AbstractElement (unsigned index=INDEX_IS_NOT_USED) | |
virtual | ~AbstractElement () |
virtual void | UpdateNode (const unsigned &rIndex, Node< SPACE_DIM > *pNode)=0 |
void | ReplaceNode (Node< SPACE_DIM > *pOldNode, Node< SPACE_DIM > *pNewNode) |
virtual void | MarkAsDeleted ()=0 |
virtual void | RegisterWithNodes ()=0 |
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 > *node) |
bool | IsDeleted () const |
unsigned | GetIndex (void) const |
void | SetIndex (unsigned index) |
bool | GetOwnership () const |
void | SetOwnership (bool ownership) |
void | Flag () |
void | Unflag () |
bool | IsFlagged () const |
void | SetRegion (unsigned region) |
unsigned | GetRegion () |
Protected Attributes | |
std::vector< Node< SPACE_DIM > * > | mNodes |
unsigned | mIndex |
unsigned | mRegion |
bool | mIsDeleted |
bool | mOwnership |
bool | mFlag |
Definition at line 49 of file AbstractElement.hpp.
AbstractElement< ELEMENT_DIM, SPACE_DIM >::AbstractElement | ( | unsigned | index = INDEX_IS_NOT_USED |
) | [inline] |
Default constructor, which doesn't add any nodes: they must be added later.
Definition at line 88 of file AbstractElement.hpp.
virtual AbstractElement< ELEMENT_DIM, SPACE_DIM >::~AbstractElement | ( | ) | [inline, virtual] |
Virtual destructor, since this class has virtual methods. Does nothing special.
Definition at line 100 of file AbstractElement.hpp.
virtual void AbstractElement< ELEMENT_DIM, SPACE_DIM >::UpdateNode | ( | const unsigned & | rIndex, | |
Node< SPACE_DIM > * | pNode | |||
) | [pure 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 |
Referenced by AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode().
void AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode | ( | Node< SPACE_DIM > * | pOldNode, | |
Node< SPACE_DIM > * | pNewNode | |||
) | [inline] |
Replace one of the nodes in this element with another.
pOldNode | pointer to the current node | |
pNewNode | pointer to the replacement node |
Definition at line 117 of file AbstractElement.hpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::UpdateNode().
virtual void AbstractElement< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted | ( | ) | [pure virtual] |
Mark an element as having been removed from the mesh. Also notify nodes in the element that it has been removed.
virtual void AbstractElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes | ( | ) | [pure virtual] |
Inform all nodes forming this element that they are in this element.
double AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation | ( | unsigned | localIndex, | |
unsigned | dimension | |||
) | const [inline] |
Get a single component of the location in space of one of the nodes in this element.
localIndex | the index of the node to query, in [0,N) where N is the number of nodes in this element. | |
dimension | the spatial dimension to query. |
Definition at line 151 of file AbstractElement.hpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
c_vector<double, SPACE_DIM> AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation | ( | unsigned | localIndex | ) | const [inline] |
Get the location in space of one of the nodes in this element.
localIndex | the index of the node to query, in [0,N) where N is the number of nodes in this element. |
Definition at line 168 of file AbstractElement.hpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex | ( | void | ) | const [inline] |
Get the index of this element
Definition at line 205 of file AbstractElement.hpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex.
std::vector<Node<SPACE_DIM>*> AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes [protected] |
The nodes forming this element
Definition at line 53 of file AbstractElement.hpp.
Referenced by AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::AbstractTetrahedralElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode().
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex [protected] |
The index of this element within the mesh
Definition at line 55 of file AbstractElement.hpp.
Referenced by AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex().
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::mRegion [protected] |
A region ID
Definition at line 57 of file AbstractElement.hpp.
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIsDeleted [protected] |
Whether this element has been deleted, and hence it's location in the mesh can be re-used.
Definition at line 63 of file AbstractElement.hpp.
Referenced by AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::GetVolume().
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::mOwnership [protected] |
Whether the current process owns this element
Definition at line 65 of file AbstractElement.hpp.
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::mFlag [protected] |
A flag for the use of higher level algorithms
Definition at line 67 of file AbstractElement.hpp.