AbstractElement< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <AbstractElement.hpp>

Inheritance diagram for AbstractElement< ELEMENT_DIM, SPACE_DIM >:

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

Collaboration graph
[legend]

List of all members.

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


Detailed Description

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

Abstract base class for all elements that can occur in meshes.

Definition at line 49 of file AbstractElement.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual void AbstractElement< ELEMENT_DIM, SPACE_DIM >::UpdateNode ( const unsigned &  rIndex,
Node< SPACE_DIM > *  pNode 
) [pure 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

Referenced by AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.

Parameters:
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().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
virtual void AbstractElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes (  )  [pure virtual]

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.

Parameters:
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.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.

Parameters:
localIndex the index of the node to query, in [0,N) where N is the number of nodes in this element.
Todo:
this used to return a reference to a c_vector, in which case a weird error arose where it compiled, ran and passed on some machines but failed the tests (bad_size errors) on another machine.

Definition at line 168 of file AbstractElement.hpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<Node<SPACE_DIM>*> AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes [protected]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::mRegion [protected]

A region ID

Definition at line 57 of file AbstractElement.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::mOwnership [protected]

Whether the current process owns this element

Definition at line 65 of file AbstractElement.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
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.


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

Generated on Wed Mar 18 12:52:04 2009 for Chaste by  doxygen 1.5.5