Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
NodeAttributes< SPACE_DIM > Class Template Reference

#include <NodeAttributes.hpp>

+ Collaboration diagram for NodeAttributes< SPACE_DIM >:

Public Member Functions

 NodeAttributes ()
 
std::vector< double > & rGetAttributes ()
 
void AddAttribute (double attribute)
 
unsigned GetRegion ()
 
void SetRegion (unsigned region)
 
c_vector< double, SPACE_DIM > & rGetAppliedForce ()
 
void AddAppliedForceContribution (const c_vector< double, SPACE_DIM > &rForceContribution)
 
void ClearAppliedForce ()
 
void AddNeighbour (unsigned index)
 
void ClearNeighbours ()
 
void RemoveDuplicateNeighbours ()
 
bool NeighboursIsEmpty ()
 
void SetNeighboursSetUp (bool flag)
 
bool GetNeighboursSetUp ()
 
std::vector< unsigned > & rGetNeighbours ()
 
bool IsParticle ()
 
void SetIsParticle (bool isParticle)
 
double GetRadius ()
 
void SetRadius (double radius)
 

Private Member Functions

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

Private Attributes

std::vector< doublemAttributes
 
unsigned mRegion
 
c_vector< double, SPACE_DIM > mAppliedForce
 
double mRadius
 
std::vector< unsignedmNeighbourIndices
 
bool mNeighboursSetUp
 
bool mIsParticle
 

Friends

class boost::serialization::access
 

Detailed Description

template<unsigned SPACE_DIM>
class NodeAttributes< SPACE_DIM >

A container for attributes associated with the Node class.

Definition at line 47 of file NodeAttributes.hpp.

Constructor & Destructor Documentation

◆ NodeAttributes()

template<unsigned SPACE_DIM>
NodeAttributes< SPACE_DIM >::NodeAttributes ( )

Defaults all variables.

Definition at line 42 of file NodeAttributes.cpp.

Member Function Documentation

◆ AddAppliedForceContribution()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::AddAppliedForceContribution ( const c_vector< double, SPACE_DIM > &  rForceContribution)

Add a contribution to the force vector

Parameters
rForceContributionthe contribution to add to mAppliedForce

Definition at line 84 of file NodeAttributes.cpp.

◆ AddAttribute()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::AddAttribute ( double  attribute)

Push an attribute back onto mAttributes

Parameters
attributethe value of the attribute.

Definition at line 60 of file NodeAttributes.cpp.

◆ AddNeighbour()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::AddNeighbour ( unsigned  index)

Add a neighbour to this node's vector of neighbouring node indices.

Parameters
indexof the node to add.

Definition at line 99 of file NodeAttributes.cpp.

◆ ClearAppliedForce()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::ClearAppliedForce ( )

Set mAppliedForce to a zero vector.

Definition at line 90 of file NodeAttributes.cpp.

◆ ClearNeighbours()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::ClearNeighbours ( )

Clear this node's vector of neighbour indices.

Definition at line 105 of file NodeAttributes.cpp.

◆ GetNeighboursSetUp()

template<unsigned SPACE_DIM>
bool NodeAttributes< SPACE_DIM >::GetNeighboursSetUp ( )
Returns
a flag to indicate that the neighbours of this node have/have not been updated.

Definition at line 130 of file NodeAttributes.cpp.

◆ GetRadius()

template<unsigned SPACE_DIM>
double NodeAttributes< SPACE_DIM >::GetRadius ( )

Return the radius associated with the Node

Returns
mRadius

Definition at line 155 of file NodeAttributes.cpp.

◆ GetRegion()

template<unsigned SPACE_DIM>
unsigned NodeAttributes< SPACE_DIM >::GetRegion ( )

Get the region ID

Returns
mRegion

Definition at line 66 of file NodeAttributes.cpp.

◆ IsParticle()

template<unsigned SPACE_DIM>
bool NodeAttributes< SPACE_DIM >::IsParticle ( )

Get whether this node is a particle, or not.

Returns
mIsParticle

Definition at line 143 of file NodeAttributes.cpp.

◆ NeighboursIsEmpty()

template<unsigned SPACE_DIM>
bool NodeAttributes< SPACE_DIM >::NeighboursIsEmpty ( )

Check whether the node neighbours collection is empty.

Returns
whether this node has any neighbours.

Definition at line 118 of file NodeAttributes.cpp.

◆ RemoveDuplicateNeighbours()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::RemoveDuplicateNeighbours ( )

Remove duplicates from the vector of node neighbour indices.

Definition at line 111 of file NodeAttributes.cpp.

◆ rGetAppliedForce()

template<unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > & NodeAttributes< SPACE_DIM >::rGetAppliedForce ( )

Get the current value of the applied force on the node.

Returns
mAppliedForce

Definition at line 78 of file NodeAttributes.cpp.

◆ rGetAttributes()

template<unsigned SPACE_DIM>
std::vector< double > & NodeAttributes< SPACE_DIM >::rGetAttributes ( )
Returns
mAttributes

Definition at line 54 of file NodeAttributes.cpp.

◆ rGetNeighbours()

template<unsigned SPACE_DIM>
std::vector< unsigned > & NodeAttributes< SPACE_DIM >::rGetNeighbours ( )
Returns
this node's vector of neighbour indices.

Definition at line 136 of file NodeAttributes.cpp.

◆ serialize()

template<unsigned SPACE_DIM>
template<class Archive >
void NodeAttributes< SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

◆ SetIsParticle()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::SetIsParticle ( bool  isParticle)

Set the flag mIsParticle.

Parameters
isParticlewhether this node is particle or not.

Definition at line 149 of file NodeAttributes.cpp.

◆ SetNeighboursSetUp()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::SetNeighboursSetUp ( bool  flag)

Sets a flag to indicate that the neighbours of this node have/have not been updated.

Parameters
flagwhether the neighbours are set up or not

Definition at line 124 of file NodeAttributes.cpp.

◆ SetRadius()

template<unsigned SPACE_DIM>
void NodeAttributes< SPACE_DIM >::SetRadius ( double  radius)

Set the value of the radius.

Parameters
radiusthe value to assign to mRadius. Must be >= 0.0

Definition at line 161 of file NodeAttributes.cpp.

References EXCEPTION.

◆ SetRegion()

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

Set the region ID

Parameters
regionthe value to to assign to mRegion.

Definition at line 72 of file NodeAttributes.cpp.

Friends And Related Symbol Documentation

◆ boost::serialization::access

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

Needed for serialization.

Definition at line 73 of file NodeAttributes.hpp.

Member Data Documentation

◆ mAppliedForce

template<unsigned SPACE_DIM>
c_vector<double, SPACE_DIM> NodeAttributes< SPACE_DIM >::mAppliedForce
private

For mutable nodes in OffLatticeSimulations, a container for the force accumulated on this node.

Definition at line 58 of file NodeAttributes.hpp.

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

◆ mAttributes

template<unsigned SPACE_DIM>
std::vector<double> NodeAttributes< SPACE_DIM >::mAttributes
private

Arbitrary attributes that a user gives meaning to

Definition at line 52 of file NodeAttributes.hpp.

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

◆ mIsParticle

template<unsigned SPACE_DIM>
bool NodeAttributes< SPACE_DIM >::mIsParticle
private

Whether the node represents a particle or not: Used for NodeBasedCellPopulationWithParticles

Definition at line 70 of file NodeAttributes.hpp.

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

◆ mNeighbourIndices

template<unsigned SPACE_DIM>
std::vector<unsigned> NodeAttributes< SPACE_DIM >::mNeighbourIndices
private

Vector of indices corresponding to neighbouring nodes.

Definition at line 64 of file NodeAttributes.hpp.

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

◆ mNeighboursSetUp

template<unsigned SPACE_DIM>
bool NodeAttributes< SPACE_DIM >::mNeighboursSetUp
private

A bool indicating whether the neighbours of this node have been calculated yet.

Definition at line 67 of file NodeAttributes.hpp.

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

◆ mRadius

template<unsigned SPACE_DIM>
double NodeAttributes< SPACE_DIM >::mRadius
private

The radius associated with the Node

Definition at line 61 of file NodeAttributes.hpp.

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

◆ mRegion

template<unsigned SPACE_DIM>
unsigned NodeAttributes< SPACE_DIM >::mRegion
private

The ID of the region of mesh in which the Node lies

Definition at line 55 of file NodeAttributes.hpp.

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


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