#include <Element.hpp>
Public Member Functions | |
Element (unsigned index, const std::vector< Node< SPACE_DIM > * > &rNodes) | |
Element (const Element &rElement, const unsigned index) | |
void | RegisterWithNodes () |
void | MarkAsDeleted () |
void | UpdateNode (const unsigned &rIndex, Node< SPACE_DIM > *pNode) |
void | ResetIndex (unsigned index) |
c_vector< double, SPACE_DIM+1 > | CalculateCircumsphere (c_matrix< double, SPACE_DIM, ELEMENT_DIM > &rJacobian, c_matrix< double, ELEMENT_DIM, SPACE_DIM > &rInverseJacobian) |
double | CalculateCircumsphereVolume () |
double | CalculateQuality () |
c_vector< double, SPACE_DIM+1 > | CalculateInterpolationWeights (const ChastePoint< SPACE_DIM > &rTestPoint) |
c_vector< double, SPACE_DIM+1 > | CalculateInterpolationWeightsWithProjection (const ChastePoint< SPACE_DIM > &rTestPoint) |
c_vector< double, SPACE_DIM > | CalculateXi (const ChastePoint< SPACE_DIM > &rTestPoint) |
bool | IncludesPoint (const ChastePoint< SPACE_DIM > &rTestPoint, bool strict=false) |
Definition at line 46 of file Element.hpp.
Element< ELEMENT_DIM, SPACE_DIM >::Element | ( | 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 42 of file Element.cpp.
References Element< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().
Element< ELEMENT_DIM, SPACE_DIM >::Element | ( | const Element< ELEMENT_DIM, SPACE_DIM > & | rElement, | |
const unsigned | index | |||
) | [inline] |
"Copy" constructor which allows a new index to be specified.
rElement | an element to copy | |
index | the index of the new element |
Definition at line 49 of file Element.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and Element< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().
void Element< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes | ( | ) | [inline, virtual] |
Inform all nodes forming this element that they are in this element.
Implements AbstractElement< ELEMENT_DIM, SPACE_DIM >.
Definition at line 58 of file Element.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMesh(), Element< ELEMENT_DIM, SPACE_DIM >::Element(), and Element< ELEMENT_DIM, SPACE_DIM >::ResetIndex().
void Element< ELEMENT_DIM, SPACE_DIM >::MarkAsDeleted | ( | ) | [inline, virtual] |
Mark the element as having been removed from the mesh. Also notify nodes in the element that it has been removed.
Implements AbstractElement< ELEMENT_DIM, SPACE_DIM >.
Definition at line 67 of file Element.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.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt().
void Element< ELEMENT_DIM, SPACE_DIM >::UpdateNode | ( | const unsigned & | rIndex, | |
Node< SPACE_DIM > * | pNode | |||
) | [inline, 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 |
rIndex | is an local index to which node to change | |
pNode | is a pointer to the replacement node |
Implements AbstractElement< ELEMENT_DIM, SPACE_DIM >.
Definition at line 82 of file Element.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::RefineElement().
void Element< ELEMENT_DIM, SPACE_DIM >::ResetIndex | ( | unsigned | index | ) | [inline] |
Reset the index of this boundary element in the mesh.
index | the new index of the boundary element |
Definition at line 97 of file Element.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes, and Element< ELEMENT_DIM, SPACE_DIM >::RegisterWithNodes().
c_vector< double, SPACE_DIM+1 > Element< ELEMENT_DIM, SPACE_DIM >::CalculateCircumsphere | ( | c_matrix< double, SPACE_DIM, ELEMENT_DIM > & | rJacobian, | |
c_matrix< double, ELEMENT_DIM, SPACE_DIM > & | rInverseJacobian | |||
) | [inline] |
Calculate the circumsphere/circumcircle of this element.
After reconstructing a cylindrical 2d mesh, the jacobian data of the periodic elements is not valid anymore. We want to use the jacobians computed before swapping the nodes.
rJacobian | the Jacobian matrix | |
rInverseJacobian | the inverse Jacobian matrix |
Definition at line 111 of file Element.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation().
Referenced by Element< ELEMENT_DIM, SPACE_DIM >::CalculateQuality(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckIsVoronoi().
double Element< ELEMENT_DIM, SPACE_DIM >::CalculateCircumsphereVolume | ( | ) |
Get the volume of the circumsphere, or area of the circumcircle, of this element.
double Element< ELEMENT_DIM, SPACE_DIM >::CalculateQuality | ( | ) | [inline] |
The quality of a triangle/tetrahedron is the ratio between the volume of the shape and the volume of its circumsphere. This is normalised by dividing through by the Platonic ratio.
Definition at line 156 of file Element.cpp.
References Element< ELEMENT_DIM, SPACE_DIM >::CalculateCircumsphere(), and AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateInverseJacobian().
c_vector< double, SPACE_DIM+1 > Element< ELEMENT_DIM, SPACE_DIM >::CalculateInterpolationWeights | ( | const ChastePoint< SPACE_DIM > & | rTestPoint | ) | [inline] |
Calculate the interpolation weights: the vector (1-xi(0)-xi(1)-xi(2), xi(0), xi(1), xi(2)) (in the 3D case) for a given point. (see CalculateXi() documentation)
rTestPoint | reference to the point |
Definition at line 196 of file Element.cpp.
References Element< ELEMENT_DIM, SPACE_DIM >::CalculateXi().
Referenced by Element< ELEMENT_DIM, SPACE_DIM >::CalculateInterpolationWeightsWithProjection(), Element< ELEMENT_DIM, SPACE_DIM >::IncludesPoint(), and CellBasedSimulationWithPdes< DIM >::SolvePdeUsingCoarseMesh().
c_vector< double, SPACE_DIM+1 > Element< ELEMENT_DIM, SPACE_DIM >::CalculateInterpolationWeightsWithProjection | ( | const ChastePoint< SPACE_DIM > & | rTestPoint | ) | [inline] |
Calculate the interpolation weights (see CalculateInterpolationWeights() documentation), but if we are not within the element (one or more negative weights), we project onto the element, rather than extrapolating from it.
rTestPoint | reference to the point |
Definition at line 221 of file Element.cpp.
References Element< ELEMENT_DIM, SPACE_DIM >::CalculateInterpolationWeights().
c_vector< double, SPACE_DIM > Element< ELEMENT_DIM, SPACE_DIM >::CalculateXi | ( | const ChastePoint< SPACE_DIM > & | rTestPoint | ) | [inline] |
Calculate xi at a given point. These are the values in the canonical element, using the the canonical element coordinate system (relative to node 0), corresponding to the test point in this element. For example, if the test point is node 0, xi=(0,0,0); if node 2, then xi=(0,1,0); if the test point is halfway between nodes 1 and 2 on the edge between then, then xi=(0.5,0.5,0); if the test point is the interior, then xi=(a,b,c), where a,b,c>0 and 1-a-b-c > 0.
rTestPoint | reference to the point |
Definition at line 263 of file Element.cpp.
References AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateInverseJacobian(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeLocation(), and ChastePoint< DIM >::rGetLocation().
Referenced by Element< ELEMENT_DIM, SPACE_DIM >::CalculateInterpolationWeights().
bool Element< ELEMENT_DIM, SPACE_DIM >::IncludesPoint | ( | const ChastePoint< SPACE_DIM > & | rTestPoint, | |
bool | strict = false | |||
) | [inline] |
Get whether a given point lies inside this element.
rTestPoint | reference to the point | |
strict | whether the point must not be too close to an edge/face (defaults to false) |
Definition at line 287 of file Element.cpp.
References Element< ELEMENT_DIM, SPACE_DIM >::CalculateInterpolationWeights().
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::RefineElement().