36 #ifndef NODESONLYMESH_HPP_
37 #define NODESONLYMESH_HPP_
40 #include <boost/serialization/base_object.hpp>
41 #include <boost/serialization/map.hpp>
44 #include "DistributedBoxCollection.hpp"
45 #include "MutableMesh.hpp"
51 template<
unsigned SPACE_DIM>
56 friend class TestNodesOnlyMesh;
59 friend class boost::serialization::access;
72 template<
class Archive>
73 void serialize(Archive & archive,
const unsigned int version)
77 archive & boost::serialization::base_object<MutableMesh<SPACE_DIM, SPACE_DIM> >(*this);
81 std::vector<boost::shared_ptr<Node<SPACE_DIM> > >
mHaloNodes;
188 virtual void SetUpBoxCollection(
double cutOffLength, c_vector<double, 2*SPACE_DIM> domainSize,
int numLocalRows = PETSC_DECIDE,
bool isPeriodic =
false);
252 bool IsOwned(c_vector<double, SPACE_DIM>& location);
285 double GetWidth(
const unsigned& rDimension)
const;
bool IsANodeCloseToDomainBoundary()
bool mCalculateNodeNeighbours
std::vector< unsigned > & rGetNodesToSendLeft()
virtual unsigned GetMaximumNodeIndex()
std::vector< unsigned > & rGetHaloNodesToSendLeft()
void EnlargeBoxCollection()
void SetNode(unsigned nodeIndex, ChastePoint< SPACE_DIM > point, bool concreteMove=false)
std::vector< bool > & rGetInitiallyOwnedNodes()
Node< SPACE_DIM > * GetNodeOrHaloNode(unsigned index) const
double mMaximumInteractionDistance
void ConstructFromMeshReader(AbstractMeshReader< SPACE_DIM, SPACE_DIM > &rMeshReader)
void AddNodeWithFixedIndex(Node< SPACE_DIM > *pNewNode)
void SetUpBoxCollection(const std::vector< Node< SPACE_DIM > * > &rNodes)
std::vector< unsigned > & rGetHaloNodesToSendRight()
void SetCalculateNodeNeighbours(bool calculateNodeNeighbours)
void AddHaloNodesToBoxes()
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
void DeleteNode(unsigned index)
double GetWidth(const unsigned &rDimension) const
double GetMaximumInteractionDistance()
void DeleteMovedNode(unsigned index)
void serialize(Archive &archive, const unsigned int version)
unsigned GetNextAvailableIndex()
void RemoveDeletedNodes(NodeMap &map)
void ResizeBoxCollection()
unsigned SolveNodeMapping(unsigned index) const
void SetInitialBoxCollection(const c_vector< double, 2 *SPACE_DIM > domainSize, double maxInteractionDistance)
DistributedBoxCollection< SPACE_DIM > * mpBoxCollection
void SetMaximumInteractionDistance(double maxDistance)
void UpdateBoxCollection()
void AddHaloNode(boost::shared_ptr< Node< SPACE_DIM > > pNewNode)
void CalculateNodesOutsideLocalDomain()
std::vector< unsigned > mNodesToSendLeft
void ConstructNodesWithoutMesh(const std::vector< Node< SPACE_DIM > * > &rNodes, double maxInteractionDistance)
void SetMinimumNodeDomainBoundarySeparation(double separation)
unsigned AddNode(Node< SPACE_DIM > *pNewNode)
DistributedBoxCollection< SPACE_DIM > * GetBoxCollection()
void CalculateBoundaryNodePairs(std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &rNodePairs, std::map< unsigned, std::set< unsigned > > &rNodeNeighbours)
std::vector< unsigned > & rGetNodesToSendRight()
unsigned mMaxAddedNodeIndex
std::vector< boost::shared_ptr< Node< SPACE_DIM > > > mHaloNodes
std::vector< bool > mLocalInitialNodes
void CalculateInteriorNodePairs(std::vector< std::pair< Node< SPACE_DIM > *, Node< SPACE_DIM > * > > &rNodePairs, std::map< unsigned, std::set< unsigned > > &rNodeNeighbours)
double mMinimumNodeDomainBoundarySeparation
std::vector< unsigned > mDeletedGlobalNodeIndices
std::map< unsigned, unsigned > mNodesMapping
bool IsOwned(c_vector< double, SPACE_DIM > &location)
void ClearBoxCollection()
void AddMovedNode(boost::shared_ptr< Node< SPACE_DIM > > pMovedNode)
std::map< unsigned, unsigned > mHaloNodesMapping
unsigned GetNumNodes() const
std::vector< unsigned > mNodesToSendRight