Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
PottsElement< DIM > Class Template Reference

#include <PottsElement.hpp>

+ Inheritance diagram for PottsElement< DIM >:
+ Collaboration diagram for PottsElement< DIM >:

Public Member Functions

 PottsElement (unsigned index, const std::vector< Node< DIM > * > &rNodes)
 
 ~PottsElement ()
 
void AddNode (Node< DIM > *pNode, const unsigned &rIndex=UINT_MAX)
 
double GetAspectRatio ()
 
- Public Member Functions inherited from MutableElement< DIM, DIM >
 MutableElement (unsigned index)
 
 MutableElement (unsigned index, const std::vector< Node< SPACE_DIM > * > &rNodes)
 
virtual ~MutableElement ()
 
void RegisterWithNodes ()
 
void MarkAsDeleted ()
 
void ResetIndex (unsigned index)
 
void UpdateNode (const unsigned &rIndex, Node< SPACE_DIM > *pNode)
 
void DeleteNode (const unsigned &rIndex)
 
void AddNode (Node< SPACE_DIM > *pNode, const unsigned &rIndex)
 
unsigned GetNodeLocalIndex (unsigned globalIndex) const
 
void RegisterWithEdges ()
 
void RebuildEdges ()
 
virtual bool IsElementOnBoundary () const
 
void SetEdgeHelper (EdgeHelper< SPACE_DIM > *pEdgeHelper)
 
void ClearEdges ()
 
void BuildEdges ()
 
unsigned GetEdgeGlobalIndex (unsigned localIndex) const
 
Edge< SPACE_DIM > * GetEdge (unsigned localIndex) const
 
unsigned GetNumEdges () const
 
std::set< unsignedGetNeighbouringElementAtEdgeIndex (unsigned localIndex)
 
bool ContainsEdge (const Edge< SPACE_DIM > *pEdge) const
 
long GetLocalEdgeIndex (const Edge< SPACE_DIM > *pEdge) const
 
- Public Member Functions inherited from AbstractElement< ELEMENT_DIM, SPACE_DIM >
 AbstractElement (unsigned index, const std::vector< Node< SPACE_DIM > * > &rNodes)
 
 AbstractElement (unsigned index=INDEX_IS_NOT_USED)
 
virtual ~AbstractElement ()
 
void ReplaceNode (Node< SPACE_DIM > *pOldNode, Node< SPACE_DIM > *pNewNode)
 
double GetNodeLocation (unsigned localIndex, unsigned dimension) const
 
c_vector< double, SPACE_DIM > GetNodeLocation (unsigned localIndex) const
 
unsigned GetNodeGlobalIndex (unsigned localIndex) const
 
Node< SPACE_DIM > * GetNode (unsigned localIndex) const
 
unsigned GetNumNodes () const
 
void AddNode (Node< SPACE_DIM > *pNode)
 
bool IsDeleted () const
 
unsigned GetIndex () const
 
void SetIndex (unsigned index)
 
bool GetOwnership () const
 
void SetOwnership (bool ownership)
 
void SetAttribute (double attribute)
 
double GetAttribute ()
 
unsigned GetUnsignedAttribute ()
 
void AddElementAttribute (double attribute)
 
std::vector< double > & rGetElementAttributes ()
 
unsigned GetNumElementAttributes ()
 

Private Member Functions

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

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractElement< ELEMENT_DIM, SPACE_DIM >
void ConstructElementAttributes ()
 
- Protected Attributes inherited from MutableElement< DIM, DIM >
std::vector< Edge< SPACE_DIM > * > mEdges
 
EdgeHelper< SPACE_DIM > * mEdgeHelper
 
- Protected Attributes inherited from AbstractElement< ELEMENT_DIM, SPACE_DIM >
std::vector< Node< SPACE_DIM > * > mNodes
 
unsigned mIndex
 
bool mIsDeleted
 
bool mOwnership
 
ElementAttributes< ELEMENT_DIM, SPACE_DIM > * mpElementAttributes
 

Detailed Description

template<unsigned DIM>
class PottsElement< DIM >

An element class for use in the PottsMesh class.

The main difference between this and the Element class is that a PottsElement can have a variable number of nodes associated with it and these represent the lattice sites contained in the element. As they are just a collection of sites there is no concept of Element Dimension.

Definition at line 55 of file PottsElement.hpp.

Constructor & Destructor Documentation

◆ PottsElement()

template<unsigned DIM>
PottsElement< DIM >::PottsElement ( unsigned  index,
const std::vector< Node< DIM > * > &  rNodes 
)

Constructor.

Parameters
indexglobal index of the element
rNodesvector of Nodes associated with the element

Definition at line 40 of file PottsElement.cpp.

References MutableElement< DIM, DIM >::RegisterWithNodes().

◆ ~PottsElement()

template<unsigned DIM>
PottsElement< DIM >::~PottsElement ( )

Destructor.

Definition at line 47 of file PottsElement.cpp.

Member Function Documentation

◆ AddNode()

template<unsigned DIM>
void PottsElement< DIM >::AddNode ( Node< DIM > *  pNode,
const unsigned rIndex = UINT_MAX 
)

Add node to element. Note that we don't care about ordering in a Potts element so just add it to the end of the mNodes vector.

Parameters
pNodeis a pointer to the new node
rIndexthe location in this->mNodes to place node. Defaults to the end.

Definition at line 52 of file PottsElement.cpp.

References Node< SPACE_DIM >::AddElement().

◆ GetAspectRatio()

template<unsigned DIM>
double PottsElement< DIM >::GetAspectRatio ( )

Method to calculate the aspect ratio of the element. Currently only works on 2D

Returns
the aspect ratio

Definition at line 62 of file PottsElement.cpp.

References EXCEPTION, and NEVER_REACHED.

◆ serialize()

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

Serialize the object and its member variables.

Note that serialization of the mesh and cells is handled by load/save_construct_data.

Note also that member data related to writers is not saved - output must be set up again by the caller after a restart.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 73 of file PottsElement.hpp.

Friends And Related Symbol Documentation

◆ boost::serialization::access

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

Needed for serialization.

Definition at line 60 of file PottsElement.hpp.


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