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" 51 template<
unsigned DIM>
54 friend class TestNodeBasedCellPopulation;
55 friend class TestNodeBasedCellPopulationParallelMethods;
89 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > >
mpCellsRecvLeft;
126 template<
class Archive>
127 void serialize(Archive & archive,
const unsigned int version)
129 archive & boost::serialization::base_object<AbstractCentreBasedCellPopulation<DIM> >(*this);
255 std::vector<CellPtr>& rCells,
256 const std::vector<unsigned> locationIndices=std::vector<unsigned>(),
257 bool deleteMesh=
false,
337 void Update(
bool hasHadBirthsOrDeaths=
true);
419 double GetWidth(
const unsigned& rDimension);
462 virtual CellPtr
AddCell(CellPtr pNewCell, CellPtr pParentCell);
521 namespace serialization
526 template<
class Archive,
unsigned DIM>
527 inline void save_construct_data(
539 template<
class Archive,
unsigned DIM>
540 inline void load_construct_data(
void AddCellsToSendRight(std::vector< unsigned > &cellLocationIndices)
double GetMechanicsCutOffLength()
void OutputCellPopulationParameters(out_stream &rParamsFile)
std::set< unsigned > GetNodesWithinNeighbourhoodRadius(unsigned index, double neighbourhoodRadius)
NodesOnlyMesh< DIM > & rGetMesh()
bool GetUseVariableRadii()
virtual ~NodeBasedCellPopulation()
boost::shared_ptr< std::vector< std::pair< CellPtr, Node< DIM > * > > > mpCellsRecvLeft
NodeBasedCellPopulation(NodesOnlyMesh< DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false, bool validate=true)
virtual TetrahedralMesh< DIM, DIM > * GetTetrahedralMeshForPdeModifier()
unsigned mLoadBalanceFrequency
c_vector< double, DIM > GetSizeOfCellPopulation()
unsigned RemoveDeadCells()
Node< DIM > * GetNode(unsigned index)
void serialize(Archive &archive, const unsigned int version)
void AddCellsToSendLeft(std::vector< unsigned > &cellLocationIndices)
static const unsigned mCellCommunicationTag
std::map< CellPtr, unsigned > mHaloCellLocationMap
ObjectCommunicator< std::vector< std::pair< CellPtr, Node< DIM > * > > > mRightCommunicator
void SetNode(unsigned nodeIndex, ChastePoint< DIM > &rNewLocation)
std::vector< std::pair< Node< DIM > *, Node< DIM > * > > mNodePairs
void SetUseVariableRadii(bool useVariableRadii=true)
ObjectCommunicator< std::vector< std::pair< CellPtr, Node< DIM > * > > > mLeftCommunicator
std::vector< CellPtr > mHaloCells
boost::shared_ptr< std::vector< std::pair< CellPtr, Node< DIM > * > > > mpCellsRecvRight
void AddMovedCell(CellPtr pCell, boost::shared_ptr< Node< DIM > > pNode)
std::pair< CellPtr, Node< DIM > * > GetCellNodePair(unsigned nodeIndex)
void NonBlockingSendCellsToNeighbourProcesses()
double GetVolumeOfCell(CellPtr pCell)
virtual void AcceptPopulationWriter(boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
virtual void WriteVtkResultsToFile(const std::string &rDirectory)
virtual CellPtr AddCell(CellPtr pNewCell, CellPtr pParentCell)
std::vector< std::pair< CellPtr, Node< DIM > * > > mCellsToSendRight
std::set< unsigned > GetNeighbouringNodeIndices(unsigned index)
void SendCellsToNeighbourProcesses()
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
void UpdateMapsAfterRemesh(NodeMap &map)
void SetLoadBalanceMesh(bool loadBalanceMesh)
friend class boost::serialization::access
c_vector< double, DIM > mMaxSpatialPositions
virtual void AcceptCellWriter(boost::shared_ptr< AbstractCellWriter< DIM, DIM > > pCellWriter, CellPtr pCell)
void AddHaloCell(CellPtr pCell, boost::shared_ptr< Node< DIM > > pNode)
double GetWidth(const unsigned &rDimension)
unsigned AddNode(Node< DIM > *pNewNode)
c_vector< double, DIM > mMinSpatialPositions
std::vector< std::pair< Node< DIM > *, Node< DIM > * > > & rGetNodePairs()
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
NodesOnlyMesh< DIM > * mpNodesOnlyMesh
std::map< unsigned, CellPtr > mLocationHaloCellMap
std::vector< std::pair< CellPtr, Node< DIM > * > > mCellsToSendLeft
virtual void UpdateCellProcessLocation()
void DeleteMovedCell(unsigned index)
void Update(bool hasHadBirthsOrDeaths=true)
virtual void AcceptPopulationCountWriter(boost::shared_ptr< AbstractCellPopulationCountWriter< DIM, DIM > > pPopulationCountWriter)
gcov doesn't like this file...
void SetLoadBalanceFrequency(unsigned loadBalanceFrequency)
void AddNodeAndCellToSendLeft(unsigned nodeIndex)
void AddReceivedHaloCells()
void AddNodeAndCellToSendRight(unsigned nodeIndex)
virtual void UpdateParticlesAfterReMesh(NodeMap &rMap)