36#include "NodeBasedCellPopulation.hpp"
38#include "VtkMeshWriter.hpp"
42 std::vector<CellPtr>& rCells,
43 const std::vector<unsigned> locationIndices,
47 mDeleteMesh(deleteMesh),
48 mUseVariableRadii(false),
49 mLoadBalanceMesh(false),
50 mLoadBalanceFrequency(100)
64 mUseVariableRadii(false),
65 mLoadBalanceMesh(false),
66 mLoadBalanceFrequency(100)
84 return *mpNodesOnlyMesh;
90 return *mpNodesOnlyMesh;
99 std::vector<Node<DIM>*> temp_nodes;
103 node_iter != mpNodesOnlyMesh->GetNodeIteratorEnd();
106 temp_nodes.push_back(
new Node<DIM>(node_iter->GetIndex(), node_iter->rGetLocation(), node_iter->IsBoundaryNode()));
112template<
unsigned DIM>
115 this->mNodePairs.clear();
118template<
unsigned DIM>
122 node_iter != this->mrMesh.GetNodeIteratorEnd();
127 this->GetCellUsingLocationIndex(node_iter->GetIndex());
136template<
unsigned DIM>
139 return mpNodesOnlyMesh->GetNodeOrHaloNode(index);
142template<
unsigned DIM>
145 mpNodesOnlyMesh->SetNode(nodeIndex, rNewLocation,
false);
148template<
unsigned DIM>
151 UpdateCellProcessLocation();
153 mpNodesOnlyMesh->UpdateBoxCollection();
155 if (mLoadBalanceMesh)
159 mpNodesOnlyMesh->LoadBalanceMesh();
161 UpdateCellProcessLocation();
163 mpNodesOnlyMesh->UpdateBoxCollection();
169 mpNodesOnlyMesh->CalculateInteriorNodePairs(this->mNodePairs);
171 AddReceivedHaloCells();
173 mpNodesOnlyMesh->CalculateBoundaryNodePairs(this->mNodePairs);
178 if (mUseVariableRadii)
181 cell_iter != this->End();
184 double cell_radius = cell_iter->GetCellData()->GetItem(
"Radius");
185 unsigned node_index = this->GetLocationIndexUsingCell(*cell_iter);
186 this->GetNode(node_index)->SetRadius(cell_radius);
194template<
unsigned DIM>
199 UpdateParticlesAfterReMesh(map);
203 std::map<Cell*, unsigned> old_map = this->mCellLocationMap;
206 this->mLocationCellMap.clear();
207 this->mCellLocationMap.clear();
209 for (std::list<CellPtr>::iterator it = this->mCells.begin();
210 it != this->mCells.end();
213 unsigned old_node_index = old_map[(*it).get()];
218 unsigned new_node_index = map.
GetNewIndex(old_node_index);
219 this->SetCellUsingLocationIndex(new_node_index,*it);
226template<
unsigned DIM>
229 unsigned num_removed = 0;
230 for (std::list<CellPtr>::iterator cell_iter = this->mCells.begin();
231 cell_iter != this->mCells.end();
234 if ((*cell_iter)->IsDead())
238 unsigned location_index = mpNodesOnlyMesh->SolveNodeMapping(this->GetLocationIndexUsingCell((*cell_iter)));
239 mpNodesOnlyMesh->DeleteNodePriorToReMesh(location_index);
242 unsigned location_index_of_removed_node = this->GetLocationIndexUsingCell((*cell_iter));
243 this->RemoveCellUsingLocationIndex(location_index_of_removed_node, (*cell_iter));
246 cell_iter = this->mCells.erase(cell_iter);
257template<
unsigned DIM>
260 return mpNodesOnlyMesh->AddNode(pNewNode);
263template<
unsigned DIM>
266 return mpNodesOnlyMesh->GetNumNodes();
269template<
unsigned DIM>
272 std::map<unsigned, CellPtr>::iterator iter = mLocationHaloCellMap.find(index);
273 if (iter != mLocationHaloCellMap.end())
283template<
unsigned DIM>
288template<
unsigned DIM>
291 *rParamsFile <<
"\t\t<MechanicsCutOffLength>" << mpNodesOnlyMesh->GetMaximumInteractionDistance() <<
"</MechanicsCutOffLength>\n";
292 *rParamsFile <<
"\t\t<UseVariableRadii>" << mUseVariableRadii <<
"</UseVariableRadii>\n";
298template<
unsigned DIM>
301 pPopulationWriter->Visit(
this);
304template<
unsigned DIM>
307 pPopulationCountWriter->Visit(
this);
310template<
unsigned DIM>
313 pPopulationEventWriter->Visit(
this);
316template<
unsigned DIM>
319 pCellWriter->VisitCell(pCell,
this);
322template<
unsigned DIM>
325 return mpNodesOnlyMesh->GetMaximumInteractionDistance();
328template<
unsigned DIM>
331 return mUseVariableRadii;
334template<
unsigned DIM>
337 mUseVariableRadii = useVariableRadii;
340template<
unsigned DIM>
343 mLoadBalanceMesh = loadBalanceMesh;
346template<
unsigned DIM>
349 mLoadBalanceFrequency = loadBalanceFrequency;
352template<
unsigned DIM>
355 return mpNodesOnlyMesh->GetWidth(rDimension);
358template<
unsigned DIM>
362 c_vector<double, DIM> global_size;
364 for (
unsigned i=0; i<DIM; i++)
372template<
unsigned DIM>
376 if (neighbourhoodRadius > mpNodesOnlyMesh->GetMaximumInteractionDistance())
378 EXCEPTION(
"neighbourhoodRadius should be less than or equal to the the maximum interaction radius defined on the NodesOnlyMesh");
381 std::set<unsigned> neighbouring_node_indices;
384 Node<DIM>* p_node_i = this->GetNode(index);
385 const c_vector<double, DIM>& r_node_i_location = p_node_i->
rGetLocation();
390 EXCEPTION(
"mNodeNeighbours not set up. Call Update() before GetNodesWithinNeighbourhoodRadius()");
397 for (std::vector<unsigned>::iterator iter = near_nodes.begin();
398 iter != near_nodes.end();
402 if ((*iter) != index)
404 Node<DIM>* p_node_j = this->GetNode((*iter));
407 const c_vector<double, DIM>& r_node_j_location = p_node_j->
rGetLocation();
410 c_vector<double, DIM> node_to_node_vector = mpNodesOnlyMesh->GetVectorFromAtoB(r_node_j_location, r_node_i_location);
413 double distance_between_nodes = norm_2(node_to_node_vector);
417 if (distance_between_nodes <= neighbourhoodRadius)
420 neighbouring_node_indices.insert((*iter));
425 return neighbouring_node_indices;
428template<
unsigned DIM>
431 std::set<unsigned> neighbouring_node_indices;
434 Node<DIM>* p_node_i = this->GetNode(index);
435 const c_vector<double, DIM>& r_node_i_location = p_node_i->
rGetLocation();
436 double radius_of_cell_i = p_node_i->
GetRadius();
441 EXCEPTION(
"mNodeNeighbours not set up. Call Update() before GetNeighbouringNodeIndices()");
445 if (!(radius_of_cell_i * 2.0 <= mpNodesOnlyMesh->GetMaximumInteractionDistance()))
447 EXCEPTION(
"mpNodesOnlyMesh::mMaxInteractionDistance is smaller than twice the radius of cell " << index <<
" (" << radius_of_cell_i <<
") so interactions may be missed. Make the cut-off larger to avoid errors.");
454 for (std::vector<unsigned>::iterator iter = near_nodes.begin();
455 iter != near_nodes.end();
459 if ((*iter) != index)
461 Node<DIM>* p_node_j = this->GetNode((*iter));
464 const c_vector<double, DIM>& r_node_j_location = p_node_j->
rGetLocation();
467 c_vector<double, DIM> node_to_node_vector = mpNodesOnlyMesh->GetVectorFromAtoB(r_node_j_location, r_node_i_location);
470 double distance_between_nodes = norm_2(node_to_node_vector);
473 double radius_of_cell_j = p_node_j->
GetRadius();
476 double max_interaction_distance = radius_of_cell_i + radius_of_cell_j;
479 if (!(max_interaction_distance <= mpNodesOnlyMesh->GetMaximumInteractionDistance()))
481 EXCEPTION(
"mpNodesOnlyMesh::mMaxInteractionDistance is smaller than the sum of radius of cell " << index <<
" (" << radius_of_cell_i <<
") and cell " << (*iter) <<
" (" << radius_of_cell_j <<
"). Make the cut-off larger to avoid errors.");
483 if (distance_between_nodes <= max_interaction_distance)
486 neighbouring_node_indices.insert((*iter));
491 return neighbouring_node_indices;
494template <
unsigned DIM>
498 if constexpr ((DIM == 2) || (DIM == 3))
501 unsigned node_index = this->GetLocationIndexUsingCell(pCell);
502 Node<DIM>* p_node = this->GetNode(node_index);
505 double cell_radius = p_node->
GetRadius();
508 double averaged_cell_radius = 0.0;
509 unsigned num_cells = 0;
512 const c_vector<double, DIM>& r_node_i_location = GetNode(node_index)->rGetLocation();
515 std::set<unsigned> neighbouring_node_indices = GetNeighbouringNodeIndices(node_index);
518 unsigned num_neighbours_equil;
521 num_neighbours_equil = 6;
525 num_neighbours_equil = 12;
529 for (std::set<unsigned>::iterator iter = neighbouring_node_indices.begin();
530 iter != neighbouring_node_indices.end();
533 Node<DIM>* p_node_j = this->GetNode(*iter);
536 const c_vector<double, DIM>& r_node_j_location = p_node_j->
rGetLocation();
538 double neighbouring_cell_radius = p_node_j->
GetRadius();
541 assert(cell_radius+neighbouring_cell_radius<mpNodesOnlyMesh->GetMaximumInteractionDistance());
544 double separation = norm_2(mpNodesOnlyMesh->GetVectorFromAtoB(r_node_j_location, r_node_i_location));
546 if (separation < cell_radius+neighbouring_cell_radius)
549 averaged_cell_radius = averaged_cell_radius + cell_radius - (cell_radius+neighbouring_cell_radius-separation)/2.0;
553 if (num_cells < num_neighbours_equil)
555 averaged_cell_radius += (num_neighbours_equil-num_cells)*cell_radius;
557 averaged_cell_radius /= num_neighbours_equil;
561 averaged_cell_radius /= num_cells;
563 assert(averaged_cell_radius < mpNodesOnlyMesh->GetMaximumInteractionDistance()/2.0);
565 cell_radius = averaged_cell_radius;
570 double cell_volume = 0.0;
573 cell_volume = M_PI*cell_radius*cell_radius;
577 cell_volume = (4.0/3.0)*M_PI*cell_radius*cell_radius*cell_radius;
588template<
unsigned DIM>
593 std::stringstream time;
597 NodeMap map(1 + this->mpNodesOnlyMesh->GetMaximumNodeIndex());
598 this->mpNodesOnlyMesh->ReMesh(map);
604 auto num_nodes = GetNumNodes();
607 std::vector<unsigned> node_indices_in_cell_order;
608 for (
auto cell_iter = this->Begin(); cell_iter != this->End(); ++cell_iter)
611 unsigned global_index = this->GetLocationIndexUsingCell(*cell_iter);
612 unsigned node_index = this->rGetMesh().SolveNodeMapping(global_index);
614 node_indices_in_cell_order.emplace_back(node_index);
619 for (
auto&& p_cell_writer : this->mCellWriters)
622 if (p_cell_writer->GetOutputScalarData())
624 std::vector<double> vtk_cell_data(num_nodes);
626 unsigned loop_it = 0;
627 for (
auto cell_iter = this->Begin(); cell_iter != this->End(); ++cell_iter, ++loop_it)
629 unsigned node_idx = node_indices_in_cell_order[loop_it];
630 vtk_cell_data[node_idx] = p_cell_writer->GetCellDataForVtkOutput(*cell_iter,
this);
633 mesh_writer.
AddPointData(p_cell_writer->GetVtkCellDataName(), vtk_cell_data);
637 if (p_cell_writer->GetOutputVectorData())
639 std::vector<c_vector<double, DIM>> vtk_cell_data(num_nodes);
641 unsigned loop_it = 0;
642 for (
auto cell_iter = this->Begin(); cell_iter != this->End(); ++cell_iter, ++loop_it)
644 unsigned node_idx = node_indices_in_cell_order[loop_it];
645 vtk_cell_data[node_idx] = p_cell_writer->GetVectorCellDataForVtkOutput(*cell_iter,
this);
648 mesh_writer.
AddPointData(p_cell_writer->GetVtkVectorCellDataName(), vtk_cell_data);
654 if (this->Begin() != this->End())
656 auto num_cell_data_items = this->Begin()->GetCellData()->GetNumItems();
657 std::vector<std::string> cell_data_names = this->Begin()->GetCellData()->GetKeys();
658 std::vector<std::vector<double>> cell_data(num_cell_data_items, std::vector<double>(num_nodes));
660 std::vector<double> rank(num_nodes);
662 unsigned loop_it = 0;
663 for (
auto cell_iter = this->Begin(); cell_iter != this->End(); ++cell_iter, ++loop_it)
665 unsigned node_idx = node_indices_in_cell_order[loop_it];
667 for (
unsigned cell_data_idx = 0; cell_data_idx < num_cell_data_items; ++cell_data_idx)
669 cell_data[cell_data_idx][node_idx] = cell_iter->GetCellData()->GetItem(cell_data_names[cell_data_idx]);
677 for (
unsigned cell_data_idx = 0; cell_data_idx < num_cell_data_items; ++cell_data_idx)
679 mesh_writer.
AddPointData(cell_data_names[cell_data_idx], cell_data[cell_data_idx]);
685 *(this->mpVtkMetaFile) <<
" <DataSet timestep=\"";
687 *(this->mpVtkMetaFile) << R
"(" group="" part="0" file="results_)";
691 *(this->mpVtkMetaFile) <<
".vtu\"/>\n";
696 *(this->mpVtkMetaFile) <<
".pvtu\"/>\n";
701template<
unsigned DIM>
708 assert(p_created_cell == pNewCell);
711 unsigned parent_node_index = this->GetLocationIndexUsingCell(pParentCell);
712 Node<DIM>* p_parent_node = this->GetNode(parent_node_index);
714 unsigned new_node_index = this->GetLocationIndexUsingCell(p_created_cell);
715 Node<DIM>* p_new_node = this->GetNode(new_node_index);
720 return p_created_cell;
723template<
unsigned DIM>
727 mpNodesOnlyMesh->AddMovedNode(pNode);
730 this->mCells.push_back(pCell);
733 this->AddCellUsingLocationIndex(pNode->GetIndex(), pCell);
736template<
unsigned DIM>
739 mpNodesOnlyMesh->DeleteMovedNode(index);
742 for (std::list<CellPtr>::iterator cell_iter = this->mCells.begin();
743 cell_iter != this->mCells.end();
746 if (this->GetLocationIndexUsingCell(*cell_iter) == index)
749 this->RemoveCellUsingLocationIndex(index, (*cell_iter));
750 cell_iter = this->mCells.erase(cell_iter);
757template<
unsigned DIM>
764 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_right(&mCellsToSendRight,
null_deleter());
769 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_left(&mCellsToSendLeft,
null_deleter());
772 else if ( mpNodesOnlyMesh->GetIsPeriodicAcrossProcsFromBoxCollection() )
774 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_left(&mCellsToSendLeft,
null_deleter());
782 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_right(&mCellsToSendRight,
null_deleter());
783 mpCellsRecvRight = mRightCommunicator.SendRecvObject(p_cells_right, 0, mCellCommunicationTag, 0, mCellCommunicationTag, status);
788template<
unsigned DIM>
795 unsigned tag = 0.5*((senderI+receiverJ)*(senderI+receiverJ+1) + 2*receiverJ);
796 assert(tag < UINT_MAX);
800template<
unsigned DIM>
805 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_right(&mCellsToSendRight,
null_deleter());
812 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_left(&mCellsToSendLeft,
null_deleter());
815 else if ( mpNodesOnlyMesh->GetIsPeriodicAcrossProcsFromBoxCollection() )
818 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_left(&mCellsToSendLeft,
null_deleter());
824 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_right(&mCellsToSendRight,
null_deleter());
825 mRightCommunicator.ISendObject(p_cells_right, 0, tag);
839 else if ( mpNodesOnlyMesh->GetIsPeriodicAcrossProcsFromBoxCollection() )
847 mRightCommunicator.IRecvObject(0, tag);
851template<
unsigned DIM>
856 mpCellsRecvRight = mRightCommunicator.GetRecvObject();
860 mpCellsRecvLeft = mLeftCommunicator.GetRecvObject();
865 mpCellsRecvRight = mRightCommunicator.GetRecvObject();
869template<
unsigned DIM>
872 Node<DIM>* p_node = this->GetNode(nodeIndex);
874 CellPtr p_cell = this->GetCellUsingLocationIndex(nodeIndex);
876 std::pair<CellPtr, Node<DIM>* > new_pair(p_cell, p_node);
881template<
unsigned DIM>
884 std::pair<CellPtr, Node<DIM>* > pair = GetCellNodePair(nodeIndex);
886 mCellsToSendRight.push_back(pair);
889template<
unsigned DIM>
892 std::pair<CellPtr, Node<DIM>* > pair = GetCellNodePair(nodeIndex);
894 mCellsToSendLeft.push_back(pair);
897template<
unsigned DIM>
902 for (
typename std::vector<std::pair<CellPtr,
Node<DIM>* > >::iterator iter = mpCellsRecvLeft->begin();
903 iter != mpCellsRecvLeft->end();
907 boost::shared_ptr<Node<DIM> > p_node(iter->second);
908 AddMovedCell(iter->first, p_node);
913 for (
typename std::vector<std::pair<CellPtr,
Node<DIM>* > >::iterator iter = mpCellsRecvRight->begin();
914 iter != mpCellsRecvRight->end();
917 boost::shared_ptr<Node<DIM> > p_node(iter->second);
918 AddMovedCell(iter->first, p_node);
923template<
unsigned DIM>
926 mpNodesOnlyMesh->ResizeBoxCollection();
928 mpNodesOnlyMesh->CalculateNodesOutsideLocalDomain();
930 std::vector<unsigned> nodes_to_send_right = mpNodesOnlyMesh->rGetNodesToSendRight();
931 AddCellsToSendRight(nodes_to_send_right);
933 std::vector<unsigned> nodes_to_send_left = mpNodesOnlyMesh->rGetNodesToSendLeft();
934 AddCellsToSendLeft(nodes_to_send_left);
937 SendCellsToNeighbourProcesses();
942 for (std::vector<unsigned>::iterator iter = nodes_to_send_right.begin();
943 iter != nodes_to_send_right.end();
946 DeleteMovedCell(*iter);
949 for (std::vector<unsigned>::iterator iter = nodes_to_send_left.begin();
950 iter != nodes_to_send_left.end();
953 DeleteMovedCell(*iter);
958 NodeMap map(1 + mpNodesOnlyMesh->GetMaximumNodeIndex());
959 mpNodesOnlyMesh->ReMesh(map);
960 UpdateMapsAfterRemesh(map);
963template<
unsigned DIM>
966 mpNodesOnlyMesh->ClearHaloNodes();
969 mHaloCellLocationMap.clear();
970 mLocationHaloCellMap.clear();
972 std::vector<unsigned> halos_to_send_right = mpNodesOnlyMesh->rGetHaloNodesToSendRight();
973 AddCellsToSendRight(halos_to_send_right);
975 std::vector<unsigned> halos_to_send_left = mpNodesOnlyMesh->rGetHaloNodesToSendLeft();
976 AddCellsToSendLeft(halos_to_send_left);
978 NonBlockingSendCellsToNeighbourProcesses();
981template<
unsigned DIM>
984 mCellsToSendRight.clear();
986 for (
unsigned i=0; i < cellLocationIndices.size(); i++)
988 AddNodeAndCellToSendRight(cellLocationIndices[i]);
992template<
unsigned DIM>
995 mCellsToSendLeft.clear();
997 for (
unsigned i=0; i < cellLocationIndices.size(); i++)
999 AddNodeAndCellToSendLeft(cellLocationIndices[i]);
1003template<
unsigned DIM>
1010 for (
typename std::vector<std::pair<CellPtr,
Node<DIM>* > >::iterator iter = mpCellsRecvLeft->begin();
1011 iter != mpCellsRecvLeft->end();
1014 boost::shared_ptr<Node<DIM> > p_node(iter->second);
1015 AddHaloCell(iter->first, p_node);
1021 for (
typename std::vector<std::pair<CellPtr,
Node<DIM>* > >::iterator iter = mpCellsRecvRight->begin();
1022 iter != mpCellsRecvRight->end();
1025 boost::shared_ptr<Node<DIM> > p_node(iter->second);
1026 AddHaloCell(iter->first, p_node);
1030 mpNodesOnlyMesh->AddHaloNodesToBoxes();
1033template<
unsigned DIM>
1036 mHaloCells.push_back(pCell);
1038 mpNodesOnlyMesh->AddHaloNode(pNode);
1040 mHaloCellLocationMap[pCell] = pNode->GetIndex();
1042 mLocationHaloCellMap[pNode->GetIndex()] = pCell;
#define EXCEPTION(message)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
AbstractMesh< ELEMENT_DIM, SPACE_DIM > & mrMesh
virtual CellPtr GetCellUsingLocationIndex(unsigned index)
c_vector< double, SPACE_DIM > GetSizeOfCellPopulation()
virtual void OutputCellPopulationParameters(out_stream &rParamsFile)
CellPtr AddCell(CellPtr pNewCell, CellPtr pParentCell=CellPtr())
c_vector< double, DIM > GetSizeOfCellPopulation()
unsigned CalculateMessageTag(unsigned senderI, unsigned receiverJ)
void SendCellsToNeighbourProcesses()
void SetNode(unsigned nodeIndex, ChastePoint< DIM > &rNewLocation)
void AddCellsToSendRight(std::vector< unsigned > &cellLocationIndices)
void AddHaloCell(CellPtr pCell, boost::shared_ptr< Node< DIM > > pNode)
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()
NodeBasedCellPopulation(NodesOnlyMesh< DIM > &rMesh, std::vector< CellPtr > &rCells, const std::vector< unsigned > locationIndices=std::vector< unsigned >(), bool deleteMesh=false, bool validate=true)
void SetUseVariableRadii(bool useVariableRadii=true)
virtual void UpdateCellProcessLocation()
std::pair< CellPtr, Node< DIM > * > GetCellNodePair(unsigned nodeIndex)
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()
bool GetUseVariableRadii()
unsigned RemoveDeadCells()
double GetMechanicsCutOffLength()
double GetVolumeOfCell(CellPtr pCell)
void Update(bool hasHadBirthsOrDeaths=true)
virtual CellPtr AddCell(CellPtr pNewCell, CellPtr pParentCell)
void AddNodeAndCellToSendRight(unsigned nodeIndex)
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()
virtual void AcceptPopulationWriter(boost::shared_ptr< AbstractCellPopulationWriter< DIM, DIM > > pPopulationWriter)
unsigned GetNewIndex(unsigned oldIndex) const
bool IsDeleted(unsigned index)
void SetRadius(double radius)
const c_vector< double, SPACE_DIM > & rGetLocation() const
bool GetNeighboursSetUp()
std::vector< unsigned > & rGetNeighbours()
static SimulationTime * Instance()
unsigned GetTimeStepsElapsed() const
void AddPointData(std::string name, std::vector< double > data)
void SetParallelFiles(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh)
void WriteFilesUsingMesh(AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, bool keepOriginalElementIndexing=true)