Chaste Release::3.1
Node< SPACE_DIM > Class Template Reference

#include <Node.hpp>

Collaboration diagram for Node< SPACE_DIM >:

List of all members.

Classes

class  ContainingBoundaryElementIterator
class  ContainingElementIterator

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)
 Node (unsigned index, double *location, bool isBoundaryNode=false)
void SetPoint (ChastePoint< SPACE_DIM > point)
void SetIndex (unsigned index)
void AddNodeAttribute (double attribute)
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::vector< double > & rGetNodeAttributes ()
std::set< unsigned > & rGetContainingBoundaryElementIndices ()
unsigned GetNumContainingElements () const
unsigned GetNumBoundaryElements () const
void MarkAsDeleted ()
bool IsDeleted () const
void MarkAsInternal ()
bool IsInternal () const
template<unsigned ELEMENT_DIM>
bool IsFlagged (AbstractTetrahedralMesh< 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

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
void CommonConstructor (unsigned index, bool isBoundaryNode)

Private Attributes

unsigned mIndex
unsigned mRegion
c_vector< double, SPACE_DIM > mLocation
bool mIsBoundaryNode
bool mIsInternal
bool mIsDeleted
std::set< unsignedmElementIndices
std::set< unsignedmBoundaryElementIndices
std::vector< doublemNodeAttributes

Friends

class boost::serialization::access

Detailed Description

template<unsigned SPACE_DIM>
class Node< SPACE_DIM >

A node in a finite element mesh.

Definition at line 57 of file Node.hpp.


Constructor & Destructor Documentation

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
ChastePoint< SPACE_DIM >  point,
bool  isBoundaryNode = false 
)

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.

Parameters:
indexthe index of the node in the mesh
pointthe location of the node in the mesh
isBoundaryNodewhether the node is a boundary node (defaults to false)

Definition at line 56 of file Node.cpp.

References ChastePoint< DIM >::rGetLocation().

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
std::vector< double coords,
bool  isBoundaryNode = false 
)

Constructor which takes the node's location as a std::vector.

Parameters:
indexthe index of the node in the mesh
coordsthe location of the node in the mesh
isBoundaryNodewhether the node is a boundary node (defaults to false)

Definition at line 63 of file Node.cpp.

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
c_vector< double, SPACE_DIM >  location,
bool  isBoundaryNode = false 
)

Constructor which takes the node's location as a c_vector.

Parameters:
indexthe index of the node in the mesh
locationthe location of the node in the mesh
isBoundaryNodewhether the node is a boundary node (defaults to false)

Definition at line 73 of file Node.cpp.

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
bool  isBoundaryNode = false,
double  v1 = 0,
double  v2 = 0,
double  v3 = 0 
)

Constructor which takes the coordinates of the node's location as separate input arguments.

Parameters:
indexthe index of the node in the mesh
isBoundaryNodewhether the node is a boundary node (defaults to false)
v1the x-coordinate of the node in the mesh (defaults to 0)
v2the y-coordinate of the node in the mesh (defaults to 0)
v3the z-coordinate of the node in the mesh (defaults to 0)

Definition at line 80 of file Node.cpp.

template<unsigned SPACE_DIM>
Node< SPACE_DIM >::Node ( unsigned  index,
double location,
bool  isBoundaryNode = false 
)

Constructor which takes the coordinates of the node's location as array pointer.

Parameters:
indexthe index of the node in the mesh
isBoundaryNodewhether the node is a boundary node (defaults to false)
locationaddress of the x-coordinate of the node in the mesh (other coordinates are assumed to be in contiguous memory)

Definition at line 94 of file Node.cpp.


Member Function Documentation

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::AddBoundaryElement ( unsigned  index)

Add an boundary element that contains this node.

Parameters:
indexof the element to add.

Definition at line 202 of file Node.cpp.

Referenced by BoundaryElement< ELEMENT_DIM, SPACE_DIM >::UpdateNode().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::AddNodeAttribute ( double  attribute)

Add an attribute to the list of node attributes.

Parameters:
attribute,:the value of the attribute to be added

Definition at line 160 of file Node.cpp.

Referenced by TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), and DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::CommonConstructor ( unsigned  index,
bool  isBoundaryNode 
) [private]

Extraction of commonality between the constructors.

Parameters:
indexthe index of the node in the mesh
isBoundaryNodewhether the node is a boundary node

Definition at line 46 of file Node.cpp.

template<unsigned SPACE_DIM>
ContainingBoundaryElementIterator Node< SPACE_DIM >::ContainingBoundaryElementsBegin ( ) const [inline]

Get a ContainingBoundaryElementIterator pointing to the first containing boundary element

Definition at line 468 of file Node.hpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
ContainingBoundaryElementIterator Node< SPACE_DIM >::ContainingBoundaryElementsEnd ( ) const [inline]

Get a ContainingBoundaryElementIterator pointing to one past the last containing boundary element

Definition at line 476 of file Node.hpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetIndex ( ) const

Get the index of this node in the mesh.

Definition at line 147 of file Node.cpp.

Referenced by RepulsionForce< DIM >::AddForceContribution(), AbstractTwoBodyInteractionForce< ELEMENT_DIM, SPACE_DIM >::AddForceContribution(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), QuadraticMeshHelper< DIM >::AddNodesToBoundaryElements(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CalculateRestLengths(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::CheckForT1Swaps(), CellwiseSourcePde< DIM >::ComputeLinearInUCoeffInSourceTermAtNode(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DeleteElementPriorToReMesh(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideEdge(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideElementAlongGivenAxis(), StreeterFibreGenerator< SPACE_DIM >::GetAveragedThicknessLocalNode(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::IdentifySwapType(), LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::IncrementInterpolatedQuantities(), AbstractCorrectionTermAssembler< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::IncrementInterpolatedQuantities(), LessThanNode< SPACE_DIM >::operator()(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformIntersectionSwap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformNodeMerge(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT1Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT2Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformVoidRemoval(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), SemMesh< DIM >::ReMesh(), PottsBasedCellPopulation< DIM >::UpdateCellLocations(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh(), and DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::WorkOnLocalQueue().

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetNumBoundaryElements ( ) const

Get the number of boundary elements in the mesh that contain this node.

Definition at line 226 of file Node.cpp.

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetNumContainingElements ( ) const
template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetRegion ( ) const

Get the node's region ID.

Definition at line 266 of file Node.cpp.

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::IsDeleted ( ) const

Get whether the node is marked as deleted.

Definition at line 242 of file Node.cpp.

Referenced by AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMesh(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::DeleteBoundaryNodeAt().

template<unsigned SPACE_DIM>
template<unsigned ELEMENT_DIM>
bool Node< SPACE_DIM >::IsFlagged ( AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &  rMesh) [inline]

Determine if a node lives within a flagged element.

Parameters:
rMeshthe mesh containing the nodes and elements

Definition at line 319 of file Node.hpp.

References Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement().

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::IsInternal ( ) const

Get whether the node is internal (not vertex) in a quadratic element.

Definition at line 254 of file Node.cpp.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::MarkAsDeleted ( )

Mark the node as having been removed from the mesh.

Definition at line 236 of file Node.cpp.

Referenced by SemMesh< DIM >::DeleteElement().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::MarkAsInternal ( )

Mark the node as being internal (not vertex) in a quadratic element.

Definition at line 248 of file Node.cpp.

Referenced by QuadraticMeshHelper< DIM >::AddInternalNodesToElements(), and QuadraticMesh< DIM >::ConstructLinearMesh().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::RemoveBoundaryElement ( unsigned  index)

Remove an boundary element that contains this node.

Parameters:
indexof the boundary element to be removed.

Definition at line 192 of file Node.cpp.

References EXCEPTION.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::RemoveElement ( unsigned  index)

Remove an element that contains this node.

Parameters:
indexof the element to be removed.

Definition at line 182 of file Node.cpp.

References EXCEPTION.

template<unsigned SPACE_DIM>
std::set< unsigned > & Node< SPACE_DIM >::rGetContainingBoundaryElementIndices ( )

Return a set of indices of boundary elements containing this node as a vertex.

Definition at line 214 of file Node.cpp.

template<unsigned SPACE_DIM>
const c_vector< double, SPACE_DIM > & Node< SPACE_DIM >::rGetLocation ( ) const

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 133 of file Node.cpp.

Referenced by AbstractFeCableIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::AssembleOnCableElement(), AbstractFeVolumeIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::AssembleOnElement(), BoxCollection< DIM >::CalculateContainingBox(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::CalculateRestLengths(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CheckOutwardNormals(), FineCoarseMeshPair< DIM >::ComputeFineElementsAndWeightsForCoarseNodes(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMesh(), Cylindrical2dMesh::Cylindrical2dMesh(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideEdge(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideElementAlongGivenAxis(), CryptSimulationBoundaryCondition< DIM >::ImposeBoundaryCondition(), PlaneBoundaryCondition< DIM >::ImposeBoundaryCondition(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformIntersectionSwap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformNodeMerge(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT1Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformT3Swap(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::PerformVoidRemoval(), SemMesh< DIM >::ReMesh(), CryptSimulationBoundaryCondition< DIM >::VerifyBoundaryCondition(), VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh(), and DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::WorkOnLocalQueue().

template<unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > & Node< SPACE_DIM >::rGetModifiableLocation ( )
template<unsigned SPACE_DIM>
std::vector< double > & Node< SPACE_DIM >::rGetNodeAttributes ( )

Returs a vector containing the ndoe attributes.

Definition at line 166 of file Node.cpp.

template<unsigned SPACE_DIM>
template<class Archive >
void Node< SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archive the member variables.

Parameters:
archivethe archive
versionthe current version of this class

Definition at line 100 of file Node.hpp.

References Node< SPACE_DIM >::mRegion.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetIndex ( unsigned  index)

Set the index of this node in the mesh.

Parameters:
indexthe index of the node

Definition at line 114 of file Node.cpp.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), and MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetPoint ( ChastePoint< SPACE_DIM >  point)

Set the node's location.

Note: setting the point in space is dangerous. Jacobian and JacobianDeterminant of element need to be updated.

Parameters:
pointthe new location of the node

Definition at line 108 of file Node.cpp.

References ChastePoint< DIM >::rGetLocation().

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::DivideEdge().

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetRegion ( unsigned  region)

Set the node's region ID.

Parameters:
regionthe new region ID

Definition at line 260 of file Node.cpp.


Friends And Related Function Documentation

template<unsigned SPACE_DIM>
friend class boost::serialization::access [friend]

Needed for serialization.

Definition at line 92 of file Node.hpp.


Member Data Documentation

template<unsigned SPACE_DIM>
std::set<unsigned> Node< SPACE_DIM >::mBoundaryElementIndices [private]

Set of indices of boundary elements containing this node as a vertex.

Definition at line 86 of file Node.hpp.

Referenced by Node< SPACE_DIM >::ContainingBoundaryElementsBegin(), and Node< SPACE_DIM >::ContainingBoundaryElementsEnd().

template<unsigned SPACE_DIM>
std::set<unsigned> Node< SPACE_DIM >::mElementIndices [private]

Set of indices of elements containing this node as a vertex.

Definition at line 83 of file Node.hpp.

Referenced by Node< SPACE_DIM >::ContainingElementsBegin(), and Node< SPACE_DIM >::ContainingElementsEnd().

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::mIndex [private]

The index of this node within the mesh.

Definition at line 62 of file Node.hpp.

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::mIsBoundaryNode [private]

Whether this node is a boundary node.

Definition at line 71 of file Node.hpp.

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::mIsDeleted [private]

Whether this node has been deleted, and hence whether its location in the mesh can be re-used. (For use in MutableMesh)

Definition at line 80 of file Node.hpp.

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::mIsInternal [private]

Whether this node is an internal node. (For use with QuadraticMesh)

Definition at line 74 of file Node.hpp.

template<unsigned SPACE_DIM>
c_vector<double, SPACE_DIM> Node< SPACE_DIM >::mLocation [private]

The location of this node within the mesh.

Definition at line 68 of file Node.hpp.

template<unsigned SPACE_DIM>
std::vector<double> Node< SPACE_DIM >::mNodeAttributes [private]

Set of node attributes

Definition at line 89 of file Node.hpp.

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::mRegion [private]

A region ID.

Definition at line 65 of file Node.hpp.

Referenced by Node< SPACE_DIM >::serialize().


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