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" 44 #include "NodeMap.hpp" 49 template<
unsigned ELEMENT_DIM,
unsigned SPACE_DIM>
53 friend class boost::serialization::access;
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()
252 void MoveMergeNode(
unsigned index,
unsigned targetIndex,
bool concreteMove=
true);
331 std::vector<c_vector<unsigned, 5> >
SplitLongEdges(
double cutoffLength);
std::vector< c_vector< unsigned, 5 > > SplitLongEdges(double cutoffLength)
std::vector< unsigned > mDeletedBoundaryElementIndices
void DeleteNodePriorToReMesh(unsigned index)
unsigned RefineElement(Element< ELEMENT_DIM, SPACE_DIM > *pElement, ChastePoint< SPACE_DIM > point)
void RescaleMeshFromBoundaryNode(ChastePoint< 1 > updatedPoint, unsigned boundaryNodeIndex)
void ReIndex(NodeMap &map)
bool CheckIsVoronoi(Element< ELEMENT_DIM, SPACE_DIM > *pElement, double maxPenetration)
virtual void SetNode(unsigned index, ChastePoint< SPACE_DIM > point, bool concreteMove=true)
unsigned GetNumElements() const
virtual unsigned AddNode(Node< SPACE_DIM > *pNewNode)
unsigned GetNumNodes() const
std::vector< unsigned > mDeletedNodeIndices
virtual void DeleteNode(unsigned index)
std::vector< Node< SPACE_DIM > * > mNodes
void load(Archive &archive, const unsigned int version)
void save(Archive &archive, const unsigned int version) const
virtual void DeleteElement(unsigned index)
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
unsigned AddElement(Element< ELEMENT_DIM, SPACE_DIM > *pNewElement)
void MoveMergeNode(unsigned index, unsigned targetIndex, bool concreteMove=true)
unsigned GetNumBoundaryElements() const
c_vector< unsigned, 3 > SplitEdge(Node< SPACE_DIM > *pNodeA, Node< SPACE_DIM > *pNodeB)
gcov doesn't like this file...
void DeleteBoundaryNodeAt(unsigned index)
std::vector< unsigned > mDeletedElementIndices