36 #ifndef POTTSMESH_HPP_ 37 #define POTTSMESH_HPP_ 40 template<
unsigned DIM>
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" 62 template<
unsigned DIM>
65 friend class TestPottsMesh;
111 friend class boost::serialization::access;
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);
390 bool skipDeletedElements=
true);
421 template<
unsigned DIM>
423 bool skipDeletedElements)
428 template<
unsigned DIM>
434 template<
unsigned DIM>
441 template<
unsigned DIM>
448 template<
unsigned DIM>
454 template<
unsigned DIM>
466 template<
unsigned DIM>
470 bool skipDeletedElements)
475 if (
mrMesh.mElements.empty())
490 template<
unsigned DIM>
496 template<
unsigned DIM>
unsigned AddElement(PottsElement< DIM > *pNewElement)
unsigned SolveBoundaryElementMapping(unsigned index) const
void DeleteNode(unsigned index)
void DeleteElement(unsigned index)
virtual double GetVolumeOfElement(unsigned index)
static std::string GetMeshFilename()
void load(Archive &archive, const unsigned int version)
void ConstructFromMeshReader(AbstractMeshReader< DIM, DIM > &rMeshReader)
std::vector< std::set< unsigned > > mMooreNeighbouringNodeIndices
void RemoveDeletedElements()
std::set< unsigned > GetVonNeumannNeighbouringNodeIndices(unsigned nodeIndex)
unsigned GetNumAllElements() const
void WriteFilesUsingMesh(PottsMesh< SPACE_DIM > &rMesh)
std::vector< PottsElement< DIM > * > mElements
void save(Archive &archive, const unsigned int version) const
std::set< unsigned > GetMooreNeighbouringNodeIndices(unsigned nodeIndex)
unsigned SolveElementMapping(unsigned index) const
unsigned DivideElement(PottsElement< DIM > *pElement, bool placeOriginalElementBelow=false)
PottsElement< DIM > * operator->()
virtual c_vector< double, DIM > GetCentroidOfElement(unsigned index)
PottsElementIterator(PottsMesh< DIM > &rMesh, typename std::vector< PottsElement< DIM > * >::iterator elementIter, bool skipDeletedElements=true)
PottsElementIterator GetElementIteratorBegin(bool skipDeletedElements=true)
virtual unsigned GetNumNodes() const
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
bool operator!=(const typename PottsMesh< DIM >::PottsElementIterator &rOther)
virtual double GetSurfaceAreaOfElement(unsigned index)
bool mSkipDeletedElements
PottsElementIterator GetElementIteratorEnd()
std::set< unsigned > GetNeighbouringElementIndices(unsigned elementIndex)
std::vector< unsigned > mDeletedElementIndices
PottsElement< DIM > * GetElement(unsigned index) const
std::vector< PottsElement< DIM > * >::iterator mElementIter
PottsElement< DIM > & operator*()
virtual unsigned GetNumElements() const
PottsMesh< DIM > & mrMesh
unsigned SolveNodeMapping(unsigned index) const
static std::string GetArchiveDirectory()
static std::string GetArchiveRelativePath()
gcov doesn't like this file...
std::vector< std::set< unsigned > > mVonNeumannNeighbouringNodeIndices
PottsElementIterator & operator++()