#include <Node.hpp>
Public Member Functions | |
Node (unsigned index, ChastePoint< SPACE_DIM > point, bool isBoundaryNode=false) | |
Node (unsigned index, std::vector< double > coords, bool isBoundaryNode=false) | |
Node (unsigned index, c_vector< double, SPACE_DIM > location, bool isBoundaryNode=false) | |
Node (unsigned index, bool isBoundaryNode=false, double v1=0, double v2=0, double v3=0) | |
void | SetPoint (ChastePoint< SPACE_DIM > point) |
void | SetIndex (unsigned index) |
void | SetAsBoundaryNode (bool value=true) |
ChastePoint< SPACE_DIM > | GetPoint () const |
const c_vector< double, SPACE_DIM > & | rGetLocation () const |
c_vector< double, SPACE_DIM > & | rGetModifiableLocation () |
unsigned | GetIndex () const |
bool | IsBoundaryNode () const |
void | AddElement (unsigned index) |
void | RemoveElement (unsigned index) |
void | RemoveBoundaryElement (unsigned index) |
void | AddBoundaryElement (unsigned index) |
std::set< unsigned > & | rGetContainingElementIndices () |
std::set< unsigned > & | rGetContainingBoundaryElementIndices () |
unsigned | GetNumContainingElements () const |
unsigned | GetNumBoundaryElements () const |
void | MarkAsDeleted () |
bool | IsDeleted () const |
template<unsigned ELEMENT_DIM> | |
bool | IsFlagged (TetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
void | SetRegion (unsigned region) |
unsigned | GetRegion () const |
ContainingElementIterator | ContainingElementsBegin () const |
ContainingElementIterator | ContainingElementsEnd () const |
ContainingBoundaryElementIterator | ContainingBoundaryElementsBegin () const |
ContainingBoundaryElementIterator | ContainingBoundaryElementsEnd () const |
Private Member Functions | |
void | CommonConstructor (unsigned index, bool isBoundaryNode) |
Private Attributes | |
unsigned | mIndex |
unsigned | mRegion |
c_vector< double, SPACE_DIM > | mLocation |
bool | mIsBoundaryNode |
bool | mIsDeleted |
std::set< unsigned > | mElementIndices |
std::set< unsigned > | mBoundaryElementIndices |
Classes | |
class | ContainingBoundaryElementIterator |
class | ContainingElementIterator |
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.
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().
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().
void Node< SPACE_DIM >::SetIndex | ( | unsigned | index | ) | [inline] |
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 >::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().
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< ELEM_DIM, SPACE_DIM >::ComputeConstantInUSourceTermAtNode(), AbstractLinearEllipticPde< ELEM_DIM, SPACE_DIM >::ComputeLinearInUCoeffInSourceTermAtNode(), AbstractLinearParabolicPde< ELEM_DIM, SPACE_DIM >::ComputeLinearSourceTermAtNode(), AbstractLinearParabolicPde< ELEM_DIM, SPACE_DIM >::ComputeNonlinearSourceTermAtNode(), AbstractBoundaryConditionsContainer< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::GetDirichletBCValue(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
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(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleOnElement(), NodeBoxCollection< DIM >::CalculateContainingBox(), DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), AbstractConvergenceTester< CELL, CARDIAC_PROBLEM, DIM, PROBLEM_DIM >::Converge(), Cylindrical2dMesh::Cylindrical2dMesh(), and VoronoiTessellation< DIM >::Initialise().
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().
unsigned Node< SPACE_DIM >::GetIndex | ( | ) | const [inline] |
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(), DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), MonodomainPde< ELEM_DIM, SPACE_DIM >::ComputeNonlinearSourceTermAtNode(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThickness(), MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::IncrementInterpolatedQuantities(), BidomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::IncrementInterpolatedQuantities(), VoronoiTessellation< DIM >::Initialise(), LessThanNode< SPACE_DIM >::operator()(), and CellwiseData< DIM >::SetValue().
bool Node< SPACE_DIM >::IsBoundaryNode | ( | ) | const [inline] |
Get whether this node is a boundary node.
Definition at line 136 of file Node.cpp.
References Node< SPACE_DIM >::mIsBoundaryNode.
Referenced by BoundaryConditionsContainer< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AddDirichletBoundaryCondition(), QuadraticMesh< DIM >::AddNodeToBoundaryElement(), and VoronoiTessellation< DIM >::Initialise().
void Node< SPACE_DIM >::AddElement | ( | unsigned | index | ) | [inline] |
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.
void Node< SPACE_DIM >::RemoveElement | ( | unsigned | index | ) | [inline] |
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.
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.
void Node< SPACE_DIM >::AddBoundaryElement | ( | unsigned | index | ) | [inline] |
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.
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 >::CheckVoronoi(), VoronoiTessellation< DIM >::Initialise(), and MeshBasedTissue< DIM >::Update().
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.
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.
unsigned Node< SPACE_DIM >::GetNumBoundaryElements | ( | ) | const [inline] |
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.
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.
bool Node< SPACE_DIM >::IsDeleted | ( | ) | const [inline] |
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(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
bool Node< SPACE_DIM >::IsFlagged | ( | TetrahedralMesh< 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 >::SetRegion | ( | unsigned | region | ) | [inline] |
Set the node's region ID.
region | the new region ID |
Definition at line 220 of file Node.cpp.
References Node< SPACE_DIM >::mRegion.
unsigned Node< SPACE_DIM >::GetRegion | ( | ) | const [inline] |
Get the node's region ID.
Definition at line 226 of file Node.cpp.
References Node< SPACE_DIM >::mRegion.
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 DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThickness(), Node< SPACE_DIM >::IsFlagged(), and MeshBasedTissue< DIM >::Update().
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 DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThickness(), Node< SPACE_DIM >::IsFlagged(), and MeshBasedTissue< DIM >::Update().
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.
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().
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().
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().
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().
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().
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().