#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 > *pNode) |
bool | IsDeleted () const |
unsigned | GetIndex () 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 47 of file AbstractElement.hpp.
AbstractElement< ELEMENT_DIM, SPACE_DIM >::AbstractElement | ( | unsigned | index, | |
const std::vector< Node< SPACE_DIM > * > & | rNodes | |||
) | [inline] |
Constructor which takes in a vector of nodes.
index | the index of the element in the mesh | |
rNodes | the nodes owned by the element |
Definition at line 40 of file AbstractElement.cpp.
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.
index | the index of the element in the mesh (defaults to INDEX_IS_NOT_USED) |
Definition at line 55 of file AbstractElement.cpp.
virtual AbstractElement< ELEMENT_DIM, SPACE_DIM >::~AbstractElement | ( | ) | [inline, virtual] |
Virtual destructor, since this class has virtual methods. Does nothing special.
Definition at line 93 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 |
Implemented in BoundaryElement< ELEMENT_DIM, SPACE_DIM >, and Element< ELEMENT_DIM, SPACE_DIM >.
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 64 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::UpdateNode().
Referenced by Cylindrical2dMesh::ReconstructCylindricalMesh().
virtual void AbstractElement< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted | ( | ) | [pure virtual] |
Mark the element as having been removed from the mesh. Also notify nodes in the element that it has been removed.
Implemented in BoundaryElement< ELEMENT_DIM, SPACE_DIM >, and Element< ELEMENT_DIM, SPACE_DIM >.
virtual void AbstractElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes | ( | ) | [pure virtual] |
Inform all nodes forming this element that they are in this element.
Implemented in BoundaryElement< ELEMENT_DIM, SPACE_DIM >, and Element< ELEMENT_DIM, 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.
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 79 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by Element< ELEMENT_DIM, SPACE_DIM >::CalculateCircumsphere(), Element< ELEMENT_DIM, SPACE_DIM >::CalculatePsi(), and AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::RefreshJacobian().
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 87 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex | ( | unsigned | localIndex | ) | const [inline] |
Given the local index of a node owned by this element, return the global index of the node in the mesh.
localIndex | the node's local index in this element |
Definition at line 94 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by QuadraticMesh< DIM >::AddExtraBoundaryNodes(), QuadraticMesh< DIM >::AddNodesToBoundaryElements(), NonlinearElasticityAssembler< DIM >::AssembleOnBoundaryElement(), NonlinearElasticityAssembler< DIM >::AssembleOnElement(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnElement(), ImplicitCardiacMechanicsAssembler< DIM >::AssembleOnElement(), NonlinearElasticityAssembler< DIM >::AssembleSystem(), AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckVoronoi(), Cylindrical2dMesh::CorrectNonPeriodicMesh(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteNode(), AbstractTetrahedralElement< 0, SPACE_DIM >::GetStiffnessMatrixGlobalIndices(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::GetStiffnessMatrixGlobalIndices(), QuadraticMesh< DIM >::HelperMethod1(), QuadraturePointsGroup< DIM >::QuadraturePointsGroup(), Cylindrical2dMesh::ReconstructCylindricalMesh(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetElementOwnerships(), CardiacElectroMechanicsProblem< DIM >::Solve(), Cylindrical2dMesh::UseTheseElementsToDecideMeshing(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
Node< SPACE_DIM > * AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode | ( | unsigned | localIndex | ) | const [inline] |
Get the node with a given local index in this element.
localIndex | local index of the node in this element |
Definition at line 101 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by QuadraticMesh< DIM >::AddNodeToBoundaryElement(), BidomainProblem< DIM >::AnalyseMeshForBath(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnElement(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnSurfaceElement(), AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckVoronoi(), DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt(), StreeterFibreGenerator< SPACE_DIM >::GenerateOrthotropicFibreOrientation(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThickness(), and Cylindrical2dMesh::ReMesh().
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes | ( | ) | const [inline] |
Get the number of nodes owned by this element.
Definition at line 108 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by BidomainProblem< DIM >::AnalyseMeshForBath(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnElement(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnSurfaceElement(), AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckVoronoi(), DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThickness(), Element< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), Element< ELEMENT_DIM, SPACE_DIM >::ResetIndex(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::ResetIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetElementOwnerships(), CardiacElectroMechanicsProblem< DIM >::Solve(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
void AbstractElement< ELEMENT_DIM, SPACE_DIM >::AddNode | ( | Node< SPACE_DIM > * | pNode | ) | [inline] |
Add a node to this element.
pNode | pointer to the new node |
Definition at line 114 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by QuadraticMesh< DIM >::AddNodeToBoundaryElement().
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsDeleted | ( | ) | const [inline] |
Get whether the element is marked as deleted.
Definition at line 120 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIsDeleted.
Referenced by Cylindrical2dMesh::ReconstructCylindricalMesh(), Cylindrical2dMesh::ReMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex | ( | ) | const [inline] |
Get the index of this element
Definition at line 126 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex.
Referenced by NonlinearElasticityAssembler< DIM >::AssembleOnBoundaryElement(), NonlinearElasticityAssembler< DIM >::AssembleOnElement(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnElement(), ImplicitCardiacMechanicsAssembler< DIM >::AssembleOnElement(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnSurfaceElement(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckVoronoi(), MonodomainPde< ELEM_DIM, SPACE_DIM >::ComputeDiffusionTerm(), BidomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::ComputeMatrixTerm(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt(), and Cylindrical2dMesh::ReconstructCylindricalMesh().
void AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetIndex | ( | unsigned | index | ) | [inline] |
Set the index of this element in the mesh.
index | the new index |
Definition at line 132 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex.
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetOwnership | ( | ) | const [inline] |
Get whether the current process owns this element.
Definition at line 138 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mOwnership.
Referenced by NonlinearElasticityAssembler< DIM >::AssembleSystem(), and AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleSystem().
void AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetOwnership | ( | bool | ownership | ) | [inline] |
Set whether the current process owns this element.
ownership | whether the current process now owns this element |
Definition at line 144 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mOwnership.
Referenced by ParallelTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetElementOwnerships(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::SetElementOwnerships().
void AbstractElement< ELEMENT_DIM, SPACE_DIM >::Flag | ( | ) | [inline] |
Mark the element as flagged.
Definition at line 150 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mFlag.
void AbstractElement< ELEMENT_DIM, SPACE_DIM >::Unflag | ( | ) | [inline] |
Mark the element as not flagged.
Definition at line 156 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mFlag.
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsFlagged | ( | ) | const [inline] |
Get whether the element is flagged.
Definition at line 162 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mFlag.
void AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetRegion | ( | unsigned | region | ) | [inline] |
Set the element's region ID.
region | the element's new region ID |
Definition at line 168 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mRegion.
Referenced by TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), and ParallelTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader().
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetRegion | ( | ) | [inline] |
Get the element's region ID.
Definition at line 174 of file AbstractElement.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mRegion.
Referenced by BidomainProblem< DIM >::AnalyseMeshForBath(), BidomainWithBathRhsMatrixAssembler< DIM >::ComputeMatrixTerm(), BidomainWithBathAssembler< ELEMENT_DIM, SPACE_DIM >::ComputeMatrixTerm(), and BidomainWithBathAssembler< ELEMENT_DIM, SPACE_DIM >::ComputeVectorTerm().
std::vector<Node<SPACE_DIM>*> AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes [protected] |
The nodes forming this element.
Definition at line 52 of file AbstractElement.hpp.
Referenced by AbstractTetrahedralElement< 0, SPACE_DIM >::AbstractTetrahedralElement(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::AbstractTetrahedralElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::AddNode(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::BoundaryElement(), AbstractTetrahedralElement< 0, SPACE_DIM >::CalculateCentroid(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateCentroid(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), Element< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), Element< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::ReplaceNode(), Element< ELEMENT_DIM, SPACE_DIM >::ResetIndex(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::ResetIndex(), Element< ELEMENT_DIM, SPACE_DIM >::UpdateNode(), and BoundaryElement< ELEMENT_DIM, SPACE_DIM >::UpdateNode().
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 AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateJacobian(), Element< ELEMENT_DIM, SPACE_DIM >::Element(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), Element< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), Element< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes(), Element< ELEMENT_DIM, SPACE_DIM >::ResetIndex(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::ResetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetIndex(), Element< ELEMENT_DIM, SPACE_DIM >::UpdateNode(), and BoundaryElement< ELEMENT_DIM, SPACE_DIM >::UpdateNode().
unsigned AbstractElement< ELEMENT_DIM, SPACE_DIM >::mRegion [protected] |
A region ID.
Definition at line 58 of file AbstractElement.hpp.
Referenced by AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetRegion(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetRegion().
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIsDeleted [protected] |
Whether this element has been deleted, and hence whether its location in the mesh can be re-used.
Definition at line 64 of file AbstractElement.hpp.
Referenced by AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::GetVolume(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsDeleted(), Element< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), BoundaryElement< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted(), and AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::RefreshJacobian().
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::mOwnership [protected] |
Whether the current process owns this element.
Definition at line 67 of file AbstractElement.hpp.
Referenced by AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetOwnership(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetOwnership().
bool AbstractElement< ELEMENT_DIM, SPACE_DIM >::mFlag [protected] |
A flag for the use of higher level algorithms.
Definition at line 70 of file AbstractElement.hpp.
Referenced by AbstractElement< ELEMENT_DIM, SPACE_DIM >::Flag(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::IsFlagged(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::Unflag().