36#ifndef NODEBASEDCELLPOPULATION_HPP_
37#define NODEBASEDCELLPOPULATION_HPP_
40#include <boost/serialization/base_object.hpp>
43#include "ObjectCommunicator.hpp"
44#include "AbstractCentreBasedCellPopulation.hpp"
45#include "NodesOnlyMesh.hpp"
54 friend class TestNodeBasedCellPopulation;
55 friend class TestNodeBasedCellPopulationParallelMethods;
56 friend class TestPeriodicNodeBasedCellPopulationParallelMethods;
90 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > >
mpCellsRecvLeft;
127 template<
class Archive>
128 void serialize(Archive & archive,
const unsigned int version)
130 archive & boost::serialization::base_object<AbstractCentreBasedCellPopulation<DIM> >(*this);
267 std::vector<CellPtr>& rCells,
268 const std::vector<unsigned> locationIndices=std::vector<unsigned>(),
269 bool deleteMesh=
false,
349 void Update(
bool hasHadBirthsOrDeaths=
true);
439 double GetWidth(
const unsigned& rDimension);
482 virtual CellPtr
AddCell(CellPtr pNewCell, CellPtr pParentCell);
541namespace serialization
546template<
class Archive,
unsigned DIM>
547inline void save_construct_data(
559template<
class Archive,
unsigned DIM>
560inline void load_construct_data(
gcov doesn't like this file...
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
boost::shared_ptr< std::vector< std::pair< CellPtr, Node< DIM > * > > > mpCellsRecvLeft
c_vector< double, DIM > GetSizeOfCellPopulation()
unsigned CalculateMessageTag(unsigned senderI, unsigned receiverJ)
void SendCellsToNeighbourProcesses()
c_vector< double, DIM > mMaxSpatialPositions
void SetNode(unsigned nodeIndex, ChastePoint< DIM > &rNewLocation)
ObjectCommunicator< std::vector< std::pair< CellPtr, Node< DIM > * > > > mLeftCommunicator
ObjectCommunicator< std::vector< std::pair< CellPtr, Node< DIM > * > > > mRightCommunicator
void AddCellsToSendRight(std::vector< unsigned > &cellLocationIndices)
std::vector< std::pair< Node< DIM > *, Node< DIM > * > > mNodePairs
void AddHaloCell(CellPtr pCell, boost::shared_ptr< Node< DIM > > pNode)
static const unsigned mCellCommunicationTag
Node< DIM > * GetNode(unsigned index)
virtual void AcceptPopulationCountWriter(boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
void OutputCellPopulationParameters(out_stream &rParamsFile)
void AddNodeAndCellToSendLeft(unsigned nodeIndex)
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
NodesOnlyMesh< DIM > & rGetMesh()
void serialize(Archive &archive, const unsigned int version)
void SetUseVariableRadii(bool useVariableRadii=true)
virtual void UpdateCellProcessLocation()
std::vector< CellPtr > mHaloCells
std::pair< CellPtr, Node< DIM > * > GetCellNodePair(unsigned nodeIndex)
c_vector< double, DIM > mMinSpatialPositions
void SetLoadBalanceMesh(bool loadBalanceMesh)
virtual void WriteVtkResultsToFile(const std::string &rDirectory)
void AddCellsToSendLeft(std::vector< unsigned > &cellLocationIndices)
virtual void AcceptCellWriter(boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
unsigned AddNode(Node< DIM > *pNewNode)
std::set< unsigned > GetNodesWithinNeighbourhoodRadius(unsigned index, double neighbourhoodRadius)
double GetWidth(const unsigned &rDimension)
void UpdateMapsAfterRemesh(NodeMap &map)
void DeleteMovedCell(unsigned index)
virtual TetrahedralMesh< DIM, DIM > * GetTetrahedralMeshForPdeModifier()
NodesOnlyMesh< DIM > * mpNodesOnlyMesh
void SetLoadBalanceFrequency(unsigned loadBalanceFrequency)
virtual ~NodeBasedCellPopulation()
std::map< CellPtr, unsigned > mHaloCellLocationMap
bool GetUseVariableRadii()
unsigned RemoveDeadCells()
boost::shared_ptr< std::vector< std::pair< CellPtr, Node< DIM > * > > > mpCellsRecvRight
double GetMechanicsCutOffLength()
double GetVolumeOfCell(CellPtr pCell)
void Update(bool hasHadBirthsOrDeaths=true)
virtual CellPtr AddCell(CellPtr pNewCell, CellPtr pParentCell)
friend class boost::serialization::access
std::vector< std::pair< CellPtr, Node< DIM > * > > mCellsToSendLeft
unsigned mLoadBalanceFrequency
void AddNodeAndCellToSendRight(unsigned nodeIndex)
std::map< unsigned, CellPtr > mLocationHaloCellMap
void AddMovedCell(CellPtr pCell, boost::shared_ptr< Node< DIM > > pNode)
std::set< unsigned > GetNeighbouringNodeIndices(unsigned index)
void AddReceivedHaloCells()
virtual void UpdateParticlesAfterReMesh(NodeMap &rMap)
virtual void AcceptPopulationEventWriter(boost::shared_ptr< AbstractCellPopulationEventWriter< DIM, DIM > > pPopulationEventWriter)
void NonBlockingSendCellsToNeighbourProcesses()
std::vector< std::pair< CellPtr, Node< DIM > * > > mCellsToSendRight
std::vector< std::pair< Node< DIM > *, Node< DIM > * > > & rGetNodePairs()
virtual void AcceptPopulationWriter(boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)