36#ifndef MUTABLEMESH_HPP_
37#define MUTABLEMESH_HPP_
40#include <boost/serialization/base_object.hpp>
41#include <boost/serialization/split_member.hpp>
43#include "TetrahedralMesh.hpp"
49template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
61 template<
class Archive>
62 void save(Archive & archive,
const unsigned int version)
const
64 archive & boost::serialization::base_object<TetrahedralMesh<ELEMENT_DIM, SPACE_DIM> >(*this);
67 bool does_have_attributes = this->
mNodes[0]->HasNodeAttributes();
69 archive & does_have_attributes;
71 if (does_have_attributes)
73 for (
unsigned i=0; i<this->
mNodes.size(); i++)
76 radius = this->
mNodes[i]->GetRadius();
80 is_particle = this->
mNodes[i]->IsParticle();
81 archive & is_particle;
92 template<
class Archive>
93 void load(Archive & archive,
const unsigned int version)
95 archive & boost::serialization::base_object<TetrahedralMesh<ELEMENT_DIM, SPACE_DIM> >(*this);
97 bool does_have_attributes;
99 archive & does_have_attributes;
101 if (does_have_attributes)
103 for (
unsigned i=0; i<this->
mNodes.size(); i++)
107 this->
mNodes[i]->SetRadius(radius);
110 archive & is_particle;
114 this->
mNodes[i]->SetIsParticle(
true);
121 if (ELEMENT_DIM == SPACE_DIM)
128 BOOST_SERIALIZATION_SPLIT_MEMBER()
226 virtual
unsigned AddNode(
Node<SPACE_DIM>* pNewNode);
244 virtual
void SetNode(
unsigned index,
ChastePoint<SPACE_DIM> point,
bool concreteMove=true);
255 void MoveMergeNode(
unsigned index,
unsigned targetIndex,
bool concreteMove=true);
334 std::vector<c_vector<
unsigned, 5> >
SplitLongEdges(
double cutoffLength);
343 c_vector<
unsigned, 3>
SplitEdge(
Node<SPACE_DIM>* pNodeA,
Node<SPACE_DIM>* pNodeB);
356#include "SerializationExportWrapper.hpp"
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
std::vector< Node< SPACE_DIM > * > mNodes
void save(Archive &archive, const unsigned int version) const
unsigned GetNumElements() const
bool CheckIsVoronoi(Element< ELEMENT_DIM, SPACE_DIM > *pElement, double maxPenetration)
c_vector< unsigned, 3 > SplitEdge(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB)
void ReIndex(NodeMap &map)
unsigned AddElement(Element< ELEMENT_DIM, SPACE_DIM > *pNewElement)
unsigned GetNumNodes() const
void DeleteNodePriorToReMesh(unsigned index)
virtual void SetNode(unsigned index, ChastePoint< SPACE_DIM > point, bool concreteMove=true)
std::vector< unsigned > mDeletedBoundaryElementIndices
virtual void DeleteNode(unsigned index)
void RescaleMeshFromBoundaryNode(ChastePoint< 1 > updatedPoint, unsigned boundaryNodeIndex)
void DeleteBoundaryNodeAt(unsigned index)
std::vector< c_vector< unsigned, 5 > > SplitLongEdges(double cutoffLength)
unsigned RefineElement(Element< ELEMENT_DIM, SPACE_DIM > *pElement, ChastePoint< SPACE_DIM > point)
friend class boost::serialization::access
std::vector< unsigned > mDeletedElementIndices
unsigned GetNumBoundaryElements() const
void load(Archive &archive, const unsigned int version)
std::vector< unsigned > mDeletedNodeIndices
virtual unsigned AddNode(Node< SPACE_DIM > *pNewNode)
void MoveMergeNode(unsigned index, unsigned targetIndex, bool concreteMove=true)
virtual void DeleteElement(unsigned index)