48#include <boost/serialization/vector.hpp>
49#include <boost/serialization/set.hpp>
50#include <boost/serialization/base_object.hpp>
51#include <boost/serialization/split_member.hpp>
53#include "AbstractMesh.hpp"
54#include "ArchiveLocationInfo.hpp"
55#include "PottsMeshReader.hpp"
56#include "PottsMeshWriter.hpp"
57#include "PottsElement.hpp"
65 friend class TestPottsMesh;
120 template<
class Archive>
121 void save(Archive & archive,
const unsigned int version)
const
127 archive & boost::serialization::base_object<AbstractMesh<DIM, DIM> >(*this);
142 template<
class Archive>
143 void load(Archive & archive,
const unsigned int version)
149 archive & boost::serialization::base_object<AbstractMesh<DIM, DIM> >(*this);
154 BOOST_SERIALIZATION_SPLIT_MEMBER()
163 class PottsElementIterator;
191 std::vector< std::set<
unsigned> > vonNeumannNeighbouringNodeIndices,
192 std::vector< std::set<
unsigned> > mooreNeighbouringNodeIndices);
247 virtual
void Clear();
319 bool placeOriginalElementBelow=false);
376 inline PottsElementIterator& operator++();
390 bool skipDeletedElements=
true);
405 inline bool IsAtEnd();
410 inline bool IsAllowedElement();
421template<
unsigned DIM>
423 bool skipDeletedElements)
428template<
unsigned DIM>
434template<
unsigned DIM>
441template<
unsigned DIM>
445 return *mElementIter;
448template<
unsigned DIM>
454template<
unsigned DIM>
461 while (!IsAtEnd() && !IsAllowedElement());
466template<
unsigned DIM>
470 bool skipDeletedElements)
472 mElementIter(elementIter),
473 mSkipDeletedElements(skipDeletedElements)
475 if (
mrMesh.mElements.empty())
490template<
unsigned DIM>
493 return mElementIter == mrMesh.mElements.end();
496template<
unsigned DIM>
499 return !(mSkipDeletedElements && (*this)->IsDeleted());
gcov doesn't like this file...
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
static std::string GetMeshFilename()
static std::string GetArchiveDirectory()
static std::string GetArchiveRelativePath()
void WriteFilesUsingMesh(PottsMesh< SPACE_DIM > &rMesh)
PottsElementIterator(PottsMesh< DIM > &rMesh, typename std::vector< PottsElement< DIM > * >::iterator elementIter, bool skipDeletedElements=true)
PottsElement< DIM > & operator*()
std::vector< PottsElement< DIM > * >::iterator mElementIter
bool operator!=(const typename PottsMesh< DIM >::PottsElementIterator &rOther)
PottsElement< DIM > * operator->()
PottsElementIterator & operator++()
bool mSkipDeletedElements
PottsMesh< DIM > & mrMesh
unsigned SolveElementMapping(unsigned index) const
std::vector< std::set< unsigned > > mMooreNeighbouringNodeIndices
void save(Archive &archive, const unsigned int version) const
void ConstructFromMeshReader(AbstractMeshReader< DIM, DIM > &rMeshReader)
virtual c_vector< double, DIM > GetCentroidOfElement(unsigned index)
std::vector< std::set< unsigned > > mVonNeumannNeighbouringNodeIndices
virtual double GetVolumeOfElement(unsigned index)
PottsElementIterator GetElementIteratorBegin(bool skipDeletedElements=true)
unsigned SolveBoundaryElementMapping(unsigned index) const
virtual double GetSurfaceAreaOfElement(unsigned index)
std::set< unsigned > GetMooreNeighbouringNodeIndices(unsigned nodeIndex)
virtual unsigned GetNumElements() const
virtual unsigned GetNumNodes() const
void RemoveDeletedElements()
std::vector< PottsElement< DIM > * > mElements
unsigned SolveNodeMapping(unsigned index) const
void DeleteElement(unsigned index)
std::vector< unsigned > mDeletedElementIndices
unsigned DivideElement(PottsElement< DIM > *pElement, bool placeOriginalElementBelow=false)
void DeleteNode(unsigned index)
friend class boost::serialization::access
unsigned AddElement(PottsElement< DIM > *pNewElement)
unsigned GetNumAllElements() const
PottsElementIterator GetElementIteratorEnd()
void load(Archive &archive, const unsigned int version)
std::set< unsigned > GetVonNeumannNeighbouringNodeIndices(unsigned nodeIndex)
std::set< unsigned > GetNeighbouringElementIndices(unsigned elementIndex)
PottsElement< DIM > * GetElement(unsigned index) const