Chaste Release::3.1
|
#include <SemMesh.hpp>
Classes | |
class | SemElementIterator |
Public Member Functions | |
SemElementIterator | GetElementIteratorBegin (bool skipDeletedElements=true) |
SemElementIterator | GetElementIteratorEnd () |
SemMesh (std::vector< Node< DIM > * > nodes, std::vector< PottsElement< DIM > * > pottsElements) | |
SemMesh () | |
virtual | ~SemMesh () |
virtual unsigned | GetNumNodes () const |
virtual unsigned | GetNumAllNodes () const |
virtual unsigned | GetNumElements () const |
unsigned | GetNumAllElements () const |
PottsElement< DIM > * | GetElement (unsigned index) const |
void | ConstructFromMeshReader (AbstractMeshReader< DIM, DIM > &rMeshReader) |
virtual void | Clear () |
void | ReMesh () |
void | DeleteElement (unsigned index) |
unsigned | AddElement (PottsElement< DIM > *pNewElement, std::vector< Node< DIM > * > pNewNodes) |
Protected Member Functions | |
unsigned | SolveNodeMapping (unsigned index) const |
unsigned | SolveElementMapping (unsigned index) const |
unsigned | SolveBoundaryElementMapping (unsigned index) const |
template<class Archive > | |
void | save (Archive &archive, const unsigned int version) const |
template<class Archive > | |
void | load (Archive &archive, const unsigned int version) |
Protected Attributes | |
std::vector< PottsElement< DIM > * > | mElements |
std::vector< unsigned > | mDeletedElementIndices |
std::vector< unsigned > | mDeletedNodeIndices |
Friends | |
class | TestSemMesh |
class | boost::serialization::access |
A Subcellular Element mesh class, for use in subcellular element model simulations.
Definition at line 63 of file SemMesh.hpp.
SemMesh< DIM >::SemMesh | ( | std::vector< Node< DIM > * > | nodes, |
std::vector< PottsElement< DIM > * > | pottsElements | ||
) |
Default constructor.
nodes | a vector of all the nodes contained in all elements |
pottsElements | vector of pointers to PottsElements |
Definition at line 42 of file SemMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes().
Default constructor for use by serializer.
Definition at line 81 of file SemMesh.cpp.
Destructor.
Definition at line 89 of file SemMesh.cpp.
unsigned SemMesh< DIM >::AddElement | ( | PottsElement< DIM > * | pNewElement, |
std::vector< Node< DIM > * > | pNewNodes | ||
) |
Add an element to the mesh.
pNewElement | the new element |
pNewNodes | the new nodes associated with the element. |
Definition at line 306 of file SemMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), MutableElement< DIM, DIM >::RegisterWithNodes(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetIndex().
void SemMesh< DIM >::Clear | ( | ) | [virtual] |
Delete mNodes and mElements.
Definition at line 115 of file SemMesh.cpp.
void SemMesh< DIM >::ConstructFromMeshReader | ( | AbstractMeshReader< DIM, DIM > & | rMeshReader | ) |
Construct the mesh using a MeshReader.
rMeshReader | the mesh reader |
Definition at line 136 of file SemMesh.cpp.
References ElementData::AttributeValue, AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextElementData(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElementAttributes(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), ElementData::NodeIndices, AbstractMeshReader< ELEMENT_DIM, SPACE_DIM >::Reset(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::SetAttribute().
Referenced by SemMesh< SPACE_DIM >::load().
Mark an element as deleted.
index | the global index of a specified Potts element |
Definition at line 290 of file SemMesh.cpp.
References Node< SPACE_DIM >::MarkAsDeleted().
PottsElement< DIM > * SemMesh< DIM >::GetElement | ( | unsigned | index | ) | const |
index | the global index of a specified PottsElement. |
Definition at line 215 of file SemMesh.cpp.
SemMesh< DIM >::SemElementIterator SemMesh< DIM >::GetElementIteratorBegin | ( | bool | skipDeletedElements = true | ) | [inline] |
Get an iterator to the first element in the mesh.
skipDeletedElements | whether to include deleted element |
Definition at line 337 of file SemMesh.hpp.
SemMesh< DIM >::SemElementIterator SemMesh< DIM >::GetElementIteratorEnd | ( | ) | [inline] |
Get an iterator to one past the last element in the mesh.
Definition at line 344 of file SemMesh.hpp.
Definition at line 209 of file SemMesh.cpp.
Reimplemented from AbstractMesh< DIM, DIM >.
Definition at line 197 of file SemMesh.cpp.
Definition at line 203 of file SemMesh.cpp.
Reimplemented from AbstractMesh< DIM, DIM >.
Definition at line 191 of file SemMesh.cpp.
Referenced by SemMeshWriter< SPACE_DIM >::WriteFilesUsingMesh().
void SemMesh< DIM >::load | ( | Archive & | archive, |
const unsigned int | version | ||
) | [inline, protected] |
Loads a mesh by using SemMeshReader and the location in ArchiveLocationInfo.
archive | the archive |
version | the current version of this class |
Definition at line 140 of file SemMesh.hpp.
void SemMesh< DIM >::ReMesh | ( | ) |
Remesh the SemMesh. This cleans out elements and nodes that are marked as deleted and tidys up the vectors mElements and mNodes.
Definition at line 222 of file SemMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and Node< SPACE_DIM >::rGetLocation().
void SemMesh< DIM >::save | ( | Archive & | archive, |
const unsigned int | version | ||
) | const [inline, protected] |
Archive the SemMesh and its member variables. Note that this will write out a SemMeshWriter file to wherever ArchiveLocationInfo has specified.
archive | the archive |
version | the current version of this class |
Definition at line 119 of file SemMesh.hpp.
unsigned SemMesh< DIM >::SolveBoundaryElementMapping | ( | unsigned | index | ) | const [protected] |
Solve boundary element mapping method. This overridden method is required as it is pure virtual in the base class.
index | the global index of the boundary element |
Definition at line 109 of file SemMesh.cpp.
unsigned SemMesh< DIM >::SolveElementMapping | ( | unsigned | index | ) | const [protected] |
Solve element mapping method. This overridden method is required as it is pure virtual in the base class.
index | the global index of the element |
Definition at line 102 of file SemMesh.cpp.
unsigned SemMesh< DIM >::SolveNodeMapping | ( | unsigned | index | ) | const [protected, virtual] |
Solve node mapping method. This overridden method is required as it is pure virtual in the base class.
index | the global index of the node |
Implements AbstractMesh< DIM, DIM >.
Definition at line 95 of file SemMesh.cpp.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractMesh< DIM, DIM >.
Definition at line 109 of file SemMesh.hpp.
std::vector<unsigned> SemMesh< DIM >::mDeletedElementIndices [protected] |
Indices of elements that have been marked as deleted. These indices can be reused when adding new elements.
Definition at line 76 of file SemMesh.hpp.
Referenced by SemMesh< SPACE_DIM >::load(), and SemMesh< SPACE_DIM >::save().
std::vector<unsigned> SemMesh< DIM >::mDeletedNodeIndices [protected] |
Indices of elements that have been marked as deleted. These indices can be reused when adding new elements.
Definition at line 82 of file SemMesh.hpp.
Referenced by SemMesh< SPACE_DIM >::load(), and SemMesh< SPACE_DIM >::save().
std::vector<PottsElement<DIM>*> SemMesh< DIM >::mElements [protected] |
Vector of pointers to PottsElements.
Definition at line 70 of file SemMesh.hpp.
Referenced by SemMesh< DIM >::SemElementIterator::IsAtEnd().