#include <Node.hpp>
A node in a finite element mesh.
Definition at line 46 of file Node.hpp.
Node< SPACE_DIM >::Node | ( | unsigned | index, | |
ChastePoint< SPACE_DIM > | point, | |||
bool | isBoundaryNode = false | |||
) | [inline] |
There are many ways of creating a node, depending on how you wish to specify its spatial location. Constructor which takes the node's location as a ChastePoint.
index | the index of the node in the mesh | |
point | the location of the node in the mesh | |
isBoundaryNode | whether the node is a boundary node (defaults to false) |
Definition at line 48 of file Node.cpp.
References Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::mLocation, and ChastePoint< DIM >::rGetLocation().
Node< SPACE_DIM >::Node | ( | unsigned | index, | |
std::vector< double > | coords, | |||
bool | isBoundaryNode = false | |||
) | [inline] |
Constructor which takes the node's location as a std::vector.
index | the index of the node in the mesh | |
coords | the location of the node in the mesh | |
isBoundaryNode | whether the node is a boundary node (defaults to false) |
Definition at line 55 of file Node.cpp.
References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.
Node< SPACE_DIM >::Node | ( | unsigned | index, | |
c_vector< double, SPACE_DIM > | location, | |||
bool | isBoundaryNode = false | |||
) | [inline] |
Constructor which takes the node's location as a c_vector.
index | the index of the node in the mesh | |
location | the location of the node in the mesh | |
isBoundaryNode | whether the node is a boundary node (defaults to false) |
Definition at line 65 of file Node.cpp.
References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.
Node< SPACE_DIM >::Node | ( | unsigned | index, | |
bool | isBoundaryNode = false , |
|||
double | v1 = 0 , |
|||
double | v2 = 0 , |
|||
double | v3 = 0 | |||
) | [inline] |
Constructor which takes the coordinates if the node's location as separate input arguments.
index | the index of the node in the mesh | |
isBoundaryNode | whether the node is a boundary node (defaults to false) | |
v1 | the x-coordinate of the node in the mesh (defaults to 0) | |
v2 | the y-coordinate of the node in the mesh (defaults to 0) | |
v3 | the z-coordinate of the node in the mesh (defaults to 0) |
Definition at line 72 of file Node.cpp.
References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.
Add an boundary element that contains this node.
index | of the element to add. |
Definition at line 174 of file Node.cpp.
References Node< SPACE_DIM >::mBoundaryElementIndices.
Add an element that contains this node.
index | of the element to add. |
Definition at line 148 of file Node.cpp.
References Node< SPACE_DIM >::mElementIndices.
Referenced by VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh().
void Node< SPACE_DIM >::CommonConstructor | ( | unsigned | index, | |
bool | isBoundaryNode | |||
) | [inline, private] |
Extraction of commonality between the constructors.
index | the index of the node in the mesh | |
isBoundaryNode | whether the node is a boundary node |
Definition at line 39 of file Node.cpp.
References Node< SPACE_DIM >::mIndex, Node< SPACE_DIM >::mIsBoundaryNode, Node< SPACE_DIM >::mIsDeleted, and Node< SPACE_DIM >::mRegion.
Referenced by Node< SPACE_DIM >::Node().
ContainingBoundaryElementIterator Node< SPACE_DIM >::ContainingBoundaryElementsBegin | ( | ) | const [inline] |
Get a ContainingBoundaryElementIterator pointing to the first containing boundary element
Definition at line 397 of file Node.hpp.
References Node< SPACE_DIM >::mBoundaryElementIndices.
ContainingBoundaryElementIterator Node< SPACE_DIM >::ContainingBoundaryElementsEnd | ( | ) | const [inline] |
Get a ContainingBoundaryElementIterator pointing to one past the last containing boundary element
Definition at line 405 of file Node.hpp.
References Node< SPACE_DIM >::mBoundaryElementIndices.
ContainingElementIterator Node< SPACE_DIM >::ContainingElementsBegin | ( | ) | const [inline] |
Get a ContainingElementIterator pointing to the first containing element
Definition at line 330 of file Node.hpp.
References Node< SPACE_DIM >::mElementIndices.
Referenced by StreeterFibreGenerator< SPACE_DIM >::GetAveragedThicknessLocalNode(), Node< SPACE_DIM >::IsFlagged(), MeshBasedTissue< DIM >::Update(), and DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::WorkOnLocalQueue().
ContainingElementIterator Node< SPACE_DIM >::ContainingElementsEnd | ( | ) | const [inline] |
Get a ContainingElementIterator pointing to one past the last containing element
Definition at line 338 of file Node.hpp.
References Node< SPACE_DIM >::mElementIndices.
Referenced by StreeterFibreGenerator< SPACE_DIM >::GetAveragedThicknessLocalNode(), Node< SPACE_DIM >::IsFlagged(), MeshBasedTissue< DIM >::Update(), and DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::WorkOnLocalQueue().
Get the index of this node in the mesh.
Definition at line 130 of file Node.cpp.
References Node< SPACE_DIM >::mIndex.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), NodeBasedTissue< DIM >::AddNode(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThicknessLocalNode(), MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::IncrementInterpolatedQuantities(), BidomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::IncrementInterpolatedQuantities(), VoronoiTessellation< DIM >::Initialise(), LessThanNode< SPACE_DIM >::operator()(), CellwiseData< DIM >::SetValue(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh(), and DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::WorkOnLocalQueue().
Get the number of boundary elements in the mesh that contain this node.
Definition at line 198 of file Node.cpp.
References Node< SPACE_DIM >::mBoundaryElementIndices.
unsigned Node< SPACE_DIM >::GetNumContainingElements | ( | ) | const [inline] |
Get the number of elements in the mesh that contain this node.
Definition at line 192 of file Node.cpp.
References Node< SPACE_DIM >::mElementIndices.
ChastePoint< SPACE_DIM > Node< SPACE_DIM >::GetPoint | ( | ) | const [inline] |
Get the node's location as a ChastePoint.
Definition at line 110 of file Node.cpp.
References Node< SPACE_DIM >::mLocation.
Referenced by Cylindrical2dMesh::AddNode(), AbstractLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeConstantInUSourceTermAtNode(), AbstractLinearEllipticPde< ELEMENT_DIM, SPACE_DIM >::ComputeLinearInUCoeffInSourceTermAtNode(), AbstractLinearParabolicPde< ELEMENT_DIM, SPACE_DIM >::ComputeLinearSourceTermAtNode(), AbstractLinearParabolicPde< ELEMENT_DIM, SPACE_DIM >::ComputeNonlinearSourceTermAtNode(), and AbstractBoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetDirichletBCValue().
Get the node's region ID.
Definition at line 226 of file Node.cpp.
References Node< SPACE_DIM >::mRegion.
Get whether this node is a boundary node.
Definition at line 136 of file Node.cpp.
References Node< SPACE_DIM >::mIsBoundaryNode.
Referenced by BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AddDirichletBoundaryCondition(), QuadraticMesh< DIM >::AddNodeToBoundaryElement(), VoronoiTessellation< DIM >::Initialise(), and VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh().
Get whether the node is marked as deleted.
Definition at line 214 of file Node.cpp.
References Node< SPACE_DIM >::mIsDeleted.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt().
bool Node< SPACE_DIM >::IsFlagged | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh | ) | [inline] |
Determine if a node lives within a flagged element.
rMesh | the mesh containing the nodes and elements |
Definition at line 248 of file Node.hpp.
References Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement().
void Node< SPACE_DIM >::MarkAsDeleted | ( | ) | [inline] |
Mark the node as having been removed from the mesh.
Definition at line 208 of file Node.cpp.
References Node< SPACE_DIM >::mIsDeleted.
void Node< SPACE_DIM >::RemoveBoundaryElement | ( | unsigned | index | ) | [inline] |
Remove an boundary element that contains this node.
index | of the boundary element to be removed. |
Definition at line 164 of file Node.cpp.
References Node< SPACE_DIM >::mBoundaryElementIndices.
Remove an element that contains this node.
index | of the element to be removed. |
Definition at line 154 of file Node.cpp.
References Node< SPACE_DIM >::mElementIndices.
std::set< unsigned > & Node< SPACE_DIM >::rGetContainingBoundaryElementIndices | ( | ) | [inline] |
Return a set of indices of boundary elements containing this node as a vertex.
Definition at line 186 of file Node.cpp.
References Node< SPACE_DIM >::mBoundaryElementIndices.
std::set< unsigned > & Node< SPACE_DIM >::rGetContainingElementIndices | ( | ) | [inline] |
Return a set of indices of elements containing this node as a vertex.
Definition at line 180 of file Node.cpp.
References Node< SPACE_DIM >::mElementIndices.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::CheckIsVoronoi(), VoronoiTessellation< DIM >::Initialise(), MeshBasedTissue< DIM >::Update(), and VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh().
const c_vector< double, SPACE_DIM > & Node< SPACE_DIM >::rGetLocation | ( | ) | const [inline] |
Get the node's location as a c_vector.
The returned location may not be modified; if you want that functionality use rGetModifiableLocation instead.
Definition at line 116 of file Node.cpp.
References Node< SPACE_DIM >::mIsDeleted, and Node< SPACE_DIM >::mLocation.
Referenced by CryptSimulation2d::ApplyTissueBoundaryConditions(), CryptSimulation1d::ApplyTissueBoundaryConditions(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnElement(), BoxCollection< DIM >::CalculateContainingBox(), Cylindrical2dMesh::Cylindrical2dMesh(), VoronoiTessellation< DIM >::Initialise(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh(), and DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::WorkOnLocalQueue().
c_vector< double, SPACE_DIM > & Node< SPACE_DIM >::rGetModifiableLocation | ( | ) | [inline] |
Get the node's location as a c_vector.
If you modify the returned location, Jacobian and JacobianDeterminant of elements need to be updated.
Don't forget to assign the result of this call to a reference!
Definition at line 123 of file Node.cpp.
References Node< SPACE_DIM >::mIsDeleted, and Node< SPACE_DIM >::mLocation.
Referenced by CryptSimulation2d::ApplyTissueBoundaryConditions(), and CryptSimulation1d::ApplyTissueBoundaryConditions().
void Node< SPACE_DIM >::SetAsBoundaryNode | ( | bool | value = true |
) | [inline] |
Set whether this node is a boundary node.
value | whether the node is a boundary node |
Definition at line 103 of file Node.cpp.
References Node< SPACE_DIM >::mIsBoundaryNode.
Referenced by QuadraticMesh< DIM >::AddNodeToBoundaryElement(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt().
Set the index of this node in the mesh.
index | the index of the node |
Definition at line 97 of file Node.cpp.
References Node< SPACE_DIM >::mIndex.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), and NodeBasedTissue< DIM >::AddNode().
void Node< SPACE_DIM >::SetPoint | ( | ChastePoint< SPACE_DIM > | point | ) | [inline] |
Set the node's location.
Note: setting the point in space is dangerous. Jacobian and JacobianDeterminant of element need to be updated.
point | the new location of the node |
Definition at line 91 of file Node.cpp.
References Node< SPACE_DIM >::mLocation, and ChastePoint< DIM >::rGetLocation().
Set the node's region ID.
region | the new region ID |
Definition at line 220 of file Node.cpp.
References Node< SPACE_DIM >::mRegion.
std::set<unsigned> Node< SPACE_DIM >::mBoundaryElementIndices [private] |
Set of indices of boundary elements containing this node as a vertex.
Definition at line 72 of file Node.hpp.
Referenced by Node< SPACE_DIM >::AddBoundaryElement(), Node< SPACE_DIM >::ContainingBoundaryElementsBegin(), Node< SPACE_DIM >::ContainingBoundaryElementsEnd(), Node< SPACE_DIM >::GetNumBoundaryElements(), Node< SPACE_DIM >::RemoveBoundaryElement(), and Node< SPACE_DIM >::rGetContainingBoundaryElementIndices().
std::set<unsigned> Node< SPACE_DIM >::mElementIndices [private] |
Set of indices of elements containing this node as a vertex.
Definition at line 69 of file Node.hpp.
Referenced by Node< SPACE_DIM >::AddElement(), Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), Node< SPACE_DIM >::GetNumContainingElements(), Node< SPACE_DIM >::RemoveElement(), and Node< SPACE_DIM >::rGetContainingElementIndices().
The index of this node within the mesh.
Definition at line 51 of file Node.hpp.
Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::GetIndex(), and Node< SPACE_DIM >::SetIndex().
bool Node< SPACE_DIM >::mIsBoundaryNode [private] |
Whether this node is a boundary node.
Definition at line 60 of file Node.hpp.
Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::IsBoundaryNode(), and Node< SPACE_DIM >::SetAsBoundaryNode().
bool Node< SPACE_DIM >::mIsDeleted [private] |
Whether this node has been deleted, and hence whether its location in the mesh can be re-used.
Definition at line 66 of file Node.hpp.
Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::IsDeleted(), Node< SPACE_DIM >::MarkAsDeleted(), Node< SPACE_DIM >::rGetLocation(), and Node< SPACE_DIM >::rGetModifiableLocation().
The location of this node within the mesh.
Definition at line 57 of file Node.hpp.
Referenced by Node< SPACE_DIM >::GetPoint(), Node< SPACE_DIM >::Node(), Node< SPACE_DIM >::rGetLocation(), Node< SPACE_DIM >::rGetModifiableLocation(), and Node< SPACE_DIM >::SetPoint().
A region ID.
Definition at line 54 of file Node.hpp.
Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::GetRegion(), and Node< SPACE_DIM >::SetRegion().