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>
592 std::stringstream time;
596 NodeMap map(1 + this->mpNodesOnlyMesh->GetMaximumNodeIndex());
597 this->mpNodesOnlyMesh->ReMesh(map);
603 auto num_nodes = GetNumNodes();
606 std::vector<unsigned> node_indices_in_cell_order;
607 for (
auto cell_iter = this->Begin(); cell_iter != this->End(); ++cell_iter)
610 unsigned global_index = this->GetLocationIndexUsingCell(*cell_iter);
611 unsigned node_index = this->rGetMesh().SolveNodeMapping(global_index);
613 node_indices_in_cell_order.emplace_back(node_index);
618 for (
auto&& p_cell_writer : this->mCellWriters)
621 if (p_cell_writer->GetOutputScalarData())
623 std::vector<double> vtk_cell_data(num_nodes);
625 unsigned loop_it = 0;
626 for (
auto cell_iter = this->Begin(); cell_iter != this->End(); ++cell_iter, ++loop_it)
628 unsigned node_idx = node_indices_in_cell_order[loop_it];
629 vtk_cell_data[node_idx] = p_cell_writer->GetCellDataForVtkOutput(*cell_iter,
this);
632 mesh_writer.
AddPointData(p_cell_writer->GetVtkCellDataName(), vtk_cell_data);
636 if (p_cell_writer->GetOutputVectorData())
638 std::vector<c_vector<double, DIM>> vtk_cell_data(num_nodes);
640 unsigned loop_it = 0;
641 for (
auto cell_iter = this->Begin(); cell_iter != this->End(); ++cell_iter, ++loop_it)
643 unsigned node_idx = node_indices_in_cell_order[loop_it];
644 vtk_cell_data[node_idx] = p_cell_writer->GetVectorCellDataForVtkOutput(*cell_iter,
this);
647 mesh_writer.
AddPointData(p_cell_writer->GetVtkVectorCellDataName(), vtk_cell_data);
653 if (this->Begin() != this->End())
655 auto num_cell_data_items = this->Begin()->GetCellData()->GetNumItems();
656 std::vector<std::string> cell_data_names = this->Begin()->GetCellData()->GetKeys();
657 std::vector<std::vector<double>> cell_data(num_cell_data_items, std::vector<double>(num_nodes));
659 std::vector<double> rank(num_nodes);
661 unsigned loop_it = 0;
662 for (
auto cell_iter = this->Begin(); cell_iter != this->End(); ++cell_iter, ++loop_it)
664 unsigned node_idx = node_indices_in_cell_order[loop_it];
666 for (
unsigned cell_data_idx = 0; cell_data_idx < num_cell_data_items; ++cell_data_idx)
668 cell_data[cell_data_idx][node_idx] = cell_iter->GetCellData()->GetItem(cell_data_names[cell_data_idx]);
676 for (
unsigned cell_data_idx = 0; cell_data_idx < num_cell_data_items; ++cell_data_idx)
678 mesh_writer.
AddPointData(cell_data_names[cell_data_idx], cell_data[cell_data_idx]);
684 *(this->mpVtkMetaFile) <<
" <DataSet timestep=\"";
686 *(this->mpVtkMetaFile) << R
"(" group="" part="0" file="results_)";
690 *(this->mpVtkMetaFile) <<
".vtu\"/>\n";
695 *(this->mpVtkMetaFile) <<
".pvtu\"/>\n";
699template<
unsigned DIM>
706 assert(p_created_cell == pNewCell);
709 unsigned parent_node_index = this->GetLocationIndexUsingCell(pParentCell);
710 Node<DIM>* p_parent_node = this->GetNode(parent_node_index);
712 unsigned new_node_index = this->GetLocationIndexUsingCell(p_created_cell);
713 Node<DIM>* p_new_node = this->GetNode(new_node_index);
718 return p_created_cell;
721template<
unsigned DIM>
725 mpNodesOnlyMesh->AddMovedNode(pNode);
728 this->mCells.push_back(pCell);
731 this->AddCellUsingLocationIndex(pNode->GetIndex(), pCell);
734template<
unsigned DIM>
737 mpNodesOnlyMesh->DeleteMovedNode(index);
740 for (std::list<CellPtr>::iterator cell_iter = this->mCells.begin();
741 cell_iter != this->mCells.end();
744 if (this->GetLocationIndexUsingCell(*cell_iter) == index)
747 this->RemoveCellUsingLocationIndex(index, (*cell_iter));
748 cell_iter = this->mCells.erase(cell_iter);
755template<
unsigned DIM>
762 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_right(&mCellsToSendRight,
null_deleter());
767 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_left(&mCellsToSendLeft,
null_deleter());
770 else if ( mpNodesOnlyMesh->GetIsPeriodicAcrossProcsFromBoxCollection() )
772 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_left(&mCellsToSendLeft,
null_deleter());
780 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_right(&mCellsToSendRight,
null_deleter());
781 mpCellsRecvRight = mRightCommunicator.SendRecvObject(p_cells_right, 0, mCellCommunicationTag, 0, mCellCommunicationTag, status);
786template<
unsigned DIM>
793 unsigned tag = 0.5*((senderI+receiverJ)*(senderI+receiverJ+1) + 2*receiverJ);
794 assert(tag < UINT_MAX);
798template<
unsigned DIM>
803 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_right(&mCellsToSendRight,
null_deleter());
810 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_left(&mCellsToSendLeft,
null_deleter());
813 else if ( mpNodesOnlyMesh->GetIsPeriodicAcrossProcsFromBoxCollection() )
816 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_left(&mCellsToSendLeft,
null_deleter());
822 boost::shared_ptr<std::vector<std::pair<CellPtr, Node<DIM>* > > > p_cells_right(&mCellsToSendRight,
null_deleter());
823 mRightCommunicator.ISendObject(p_cells_right, 0, tag);
837 else if ( mpNodesOnlyMesh->GetIsPeriodicAcrossProcsFromBoxCollection() )
845 mRightCommunicator.IRecvObject(0, tag);
849template<
unsigned DIM>
854 mpCellsRecvRight = mRightCommunicator.GetRecvObject();
858 mpCellsRecvLeft = mLeftCommunicator.GetRecvObject();
863 mpCellsRecvRight = mRightCommunicator.GetRecvObject();
867template<
unsigned DIM>
870 Node<DIM>* p_node = this->GetNode(nodeIndex);
872 CellPtr p_cell = this->GetCellUsingLocationIndex(nodeIndex);
874 std::pair<CellPtr, Node<DIM>* > new_pair(p_cell, p_node);
879template<
unsigned DIM>
882 std::pair<CellPtr, Node<DIM>* > pair = GetCellNodePair(nodeIndex);
884 mCellsToSendRight.push_back(pair);
887template<
unsigned DIM>
890 std::pair<CellPtr, Node<DIM>* > pair = GetCellNodePair(nodeIndex);
892 mCellsToSendLeft.push_back(pair);
895template<
unsigned DIM>
900 for (
typename std::vector<std::pair<CellPtr,
Node<DIM>* > >::iterator iter = mpCellsRecvLeft->begin();
901 iter != mpCellsRecvLeft->end();
905 boost::shared_ptr<Node<DIM> > p_node(iter->second);
906 AddMovedCell(iter->first, p_node);
911 for (
typename std::vector<std::pair<CellPtr,
Node<DIM>* > >::iterator iter = mpCellsRecvRight->begin();
912 iter != mpCellsRecvRight->end();
915 boost::shared_ptr<Node<DIM> > p_node(iter->second);
916 AddMovedCell(iter->first, p_node);
921template<
unsigned DIM>
924 mpNodesOnlyMesh->ResizeBoxCollection();
926 mpNodesOnlyMesh->CalculateNodesOutsideLocalDomain();
928 std::vector<unsigned> nodes_to_send_right = mpNodesOnlyMesh->rGetNodesToSendRight();
929 AddCellsToSendRight(nodes_to_send_right);
931 std::vector<unsigned> nodes_to_send_left = mpNodesOnlyMesh->rGetNodesToSendLeft();
932 AddCellsToSendLeft(nodes_to_send_left);
935 SendCellsToNeighbourProcesses();
940 for (std::vector<unsigned>::iterator iter = nodes_to_send_right.begin();
941 iter != nodes_to_send_right.end();
944 DeleteMovedCell(*iter);
947 for (std::vector<unsigned>::iterator iter = nodes_to_send_left.begin();
948 iter != nodes_to_send_left.end();
951 DeleteMovedCell(*iter);
956 NodeMap map(1 + mpNodesOnlyMesh->GetMaximumNodeIndex());
957 mpNodesOnlyMesh->ReMesh(map);
958 UpdateMapsAfterRemesh(map);
961template<
unsigned DIM>
964 mpNodesOnlyMesh->ClearHaloNodes();
967 mHaloCellLocationMap.clear();
968 mLocationHaloCellMap.clear();
970 std::vector<unsigned> halos_to_send_right = mpNodesOnlyMesh->rGetHaloNodesToSendRight();
971 AddCellsToSendRight(halos_to_send_right);
973 std::vector<unsigned> halos_to_send_left = mpNodesOnlyMesh->rGetHaloNodesToSendLeft();
974 AddCellsToSendLeft(halos_to_send_left);
976 NonBlockingSendCellsToNeighbourProcesses();
979template<
unsigned DIM>
982 mCellsToSendRight.clear();
984 for (
unsigned i=0; i < cellLocationIndices.size(); i++)
986 AddNodeAndCellToSendRight(cellLocationIndices[i]);
990template<
unsigned DIM>
993 mCellsToSendLeft.clear();
995 for (
unsigned i=0; i < cellLocationIndices.size(); i++)
997 AddNodeAndCellToSendLeft(cellLocationIndices[i]);
1001template<
unsigned DIM>
1008 for (
typename std::vector<std::pair<CellPtr,
Node<DIM>* > >::iterator iter = mpCellsRecvLeft->begin();
1009 iter != mpCellsRecvLeft->end();
1012 boost::shared_ptr<Node<DIM> > p_node(iter->second);
1013 AddHaloCell(iter->first, p_node);
1019 for (
typename std::vector<std::pair<CellPtr,
Node<DIM>* > >::iterator iter = mpCellsRecvRight->begin();
1020 iter != mpCellsRecvRight->end();
1023 boost::shared_ptr<Node<DIM> > p_node(iter->second);
1024 AddHaloCell(iter->first, p_node);
1028 mpNodesOnlyMesh->AddHaloNodesToBoxes();
1031template<
unsigned DIM>
1034 mHaloCells.push_back(pCell);
1036 mpNodesOnlyMesh->AddHaloNode(pNode);
1038 mHaloCellLocationMap[pCell] = pNode->GetIndex();
1040 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)