Node< SPACE_DIM > Class Template Reference

#include <Node.hpp>

Collaboration diagram for Node< SPACE_DIM >:
Collaboration graph
[legend]

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

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

Detailed Description

template<unsigned SPACE_DIM>
class Node< SPACE_DIM >

A node in a finite element mesh.

Definition at line 46 of file Node.hpp.


Constructor & Destructor Documentation

template<unsigned SPACE_DIM>
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.

Parameters:
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 49 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::mLocation, and ChastePoint< DIM >::rGetLocation().

template<unsigned SPACE_DIM>
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.

Parameters:
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 56 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.

template<unsigned SPACE_DIM>
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.

Parameters:
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 66 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.

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

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

Parameters:
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 73 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.

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

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

Parameters:
index the index of the node in the mesh
isBoundaryNode whether the node is a boundary node (defaults to false)
location address of the x-coordinate of the node in the mesh (other coordinates are assumed to be in contiguous memory)

Definition at line 87 of file Node.cpp.

References Node< SPACE_DIM >::CommonConstructor(), and Node< SPACE_DIM >::mLocation.


Member Function Documentation

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

Add an boundary element that contains this node.

Parameters:
index of the element to add.

Definition at line 195 of file Node.cpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::AddElement ( unsigned  index  )  [inline]

Add an element that contains this node.

Parameters:
index of the element to add.

Definition at line 169 of file Node.cpp.

References Node< SPACE_DIM >::mElementIndices.

Referenced by PottsElement< DIM >::AddNode(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::MutableVertexMesh(), and VertexMesh< ELEMENT_DIM, SPACE_DIM >::VertexMesh().

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

Add an attribute to the list of node attributes.

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

Definition at line 153 of file Node.cpp.

References Node< SPACE_DIM >::mNodeAttributes.

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 
) [inline, private]

Extraction of commonality between the constructors.

Parameters:
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, Node< SPACE_DIM >::mIsInternal, and Node< SPACE_DIM >::mRegion.

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

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

Get a ContainingBoundaryElementIterator pointing to the first containing boundary element

Definition at line 435 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 443 of file Node.hpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
ContainingElementIterator Node< SPACE_DIM >::ContainingElementsBegin (  )  const [inline]
template<unsigned SPACE_DIM>
ContainingElementIterator Node< SPACE_DIM >::ContainingElementsEnd (  )  const [inline]
template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetIndex (  )  const [inline]

Get the index of this node in the mesh.

Definition at line 140 of file Node.cpp.

References Node< SPACE_DIM >::mIndex.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::AddNode(), MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::CheckForT1Swaps(), CellwiseSourcePde< DIM >::ComputeLinearInUCoeffInSourceTermAtNode(), 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(), 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 [inline]

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

Definition at line 219 of file Node.cpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetNumContainingElements (  )  const [inline]
template<unsigned SPACE_DIM>
ChastePoint< SPACE_DIM > Node< SPACE_DIM >::GetPoint (  )  const [inline]
template<unsigned SPACE_DIM>
unsigned Node< SPACE_DIM >::GetRegion (  )  const [inline]

Get the node's region ID.

Definition at line 259 of file Node.cpp.

References Node< SPACE_DIM >::mRegion.

template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::IsBoundaryNode (  )  const [inline]
template<unsigned SPACE_DIM>
bool Node< SPACE_DIM >::IsDeleted (  )  const [inline]
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:
rMesh the mesh containing the nodes and elements

Definition at line 286 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 [inline]

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

Definition at line 247 of file Node.cpp.

References Node< SPACE_DIM >::mIsInternal.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::MarkAsDeleted (  )  [inline]

Mark the node as having been removed from the mesh.

Definition at line 229 of file Node.cpp.

References Node< SPACE_DIM >::mIsDeleted.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::MarkAsInternal (  )  [inline]

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

Definition at line 241 of file Node.cpp.

References Node< SPACE_DIM >::mIsInternal.

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

Remove an boundary element that contains this node.

Parameters:
index of the boundary element to be removed.

Definition at line 185 of file Node.cpp.

References EXCEPTION, and Node< SPACE_DIM >::mBoundaryElementIndices.

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

Remove an element that contains this node.

Parameters:
index of the element to be removed.

Definition at line 175 of file Node.cpp.

References EXCEPTION, and Node< SPACE_DIM >::mElementIndices.

template<unsigned SPACE_DIM>
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 207 of file Node.cpp.

References Node< SPACE_DIM >::mBoundaryElementIndices.

template<unsigned SPACE_DIM>
std::set< unsigned > & Node< SPACE_DIM >::rGetContainingElementIndices (  )  [inline]
template<unsigned SPACE_DIM>
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 126 of file Node.cpp.

References Node< SPACE_DIM >::mIsDeleted, and Node< SPACE_DIM >::mLocation.

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(), 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(), 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 (  )  [inline]
template<unsigned SPACE_DIM>
std::vector< double > & Node< SPACE_DIM >::rGetNodeAttributes (  )  [inline]

Returs a vector containing the ndoe attributes.

Definition at line 159 of file Node.cpp.

References Node< SPACE_DIM >::mNodeAttributes.

template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetAsBoundaryNode ( bool  value = true  )  [inline]
template<unsigned SPACE_DIM>
void Node< SPACE_DIM >::SetIndex ( unsigned  index  )  [inline]

Set the index of this node in the mesh.

Parameters:
index the index of the node

Definition at line 107 of file Node.cpp.

References Node< SPACE_DIM >::mIndex.

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  )  [inline]

Set the node's location.

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

Parameters:
point the new location of the node

Definition at line 101 of file Node.cpp.

References Node< SPACE_DIM >::mLocation, and ChastePoint< DIM >::rGetLocation().

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

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

Set the node's region ID.

Parameters:
region the new region ID

Definition at line 253 of file Node.cpp.

References Node< SPACE_DIM >::mRegion.


Member Data Documentation

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

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().

template<unsigned SPACE_DIM>
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().

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 69 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().

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

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

Definition at line 63 of file Node.hpp.

Referenced by Node< SPACE_DIM >::CommonConstructor(), Node< SPACE_DIM >::IsInternal(), and Node< SPACE_DIM >::MarkAsInternal().

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

Set of node attributes

Definition at line 78 of file Node.hpp.

Referenced by Node< SPACE_DIM >::AddNodeAttribute(), and Node< SPACE_DIM >::rGetNodeAttributes().

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

The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:06:42 2011 for Chaste by  doxygen 1.6.3