#include <PottsElement.hpp>
Inherits MutableElement< DIM, 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 () |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | boost::serialization::access |
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.
PottsElement< DIM >::PottsElement | ( | unsigned | index, | |
const std::vector< Node< DIM > * > & | rNodes | |||
) | [inline] |
Constructor.
index | global index of the element | |
rNodes | vector of Nodes associated with the element |
Definition at line 45 of file PottsElement.cpp.
References MutableElement< DIM, DIM >::RegisterWithNodes().
PottsElement< DIM >::~PottsElement | ( | ) | [inline] |
Destructor.
Definition at line 52 of file PottsElement.cpp.
void PottsElement< DIM >::AddNode | ( | Node< DIM > * | pNode, | |
const unsigned & | rIndex = UINT_MAX | |||
) | [inline] |
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.
pNode | is a pointer to the new node | |
rIndex | the location in this->mNodes to place node. Defaults to the end. |
Definition at line 57 of file PottsElement.cpp.
References Node< SPACE_DIM >::AddElement(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::mIndex, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes.
double PottsElement< DIM >::GetAspectRatio | ( | ) | [inline] |
Method to calculate the aspect ratio of the element. Currently only works on 2D
Definition at line 67 of file PottsElement.cpp.
References EXCEPTION, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::mNodes, and NEVER_REACHED.
void PottsElement< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
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.
archive | the archive | |
version | the current version of this class |
Reimplemented from MutableElement< DIM, DIM >.
Definition at line 73 of file PottsElement.hpp.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from MutableElement< DIM, DIM >.
Definition at line 60 of file PottsElement.hpp.