51 this->mCellDensityOnCoarseElements.resize(rCoarseMesh.
GetNumElements());
52 for (
unsigned elem_index=0; elem_index<this->mCellDensityOnCoarseElements.size(); elem_index++)
54 this->mCellDensityOnCoarseElements[elem_index] = 0.0;
59 cell_iter != this->mrCellPopulation.End();
62 unsigned elem_index = 0;
63 const ChastePoint<DIM>& r_position_of_cell = this->mrCellPopulation.GetLocationOfCellCentre(*cell_iter);
65 if (pCellPdeElementMap !=
nullptr)
67 elem_index = (*pCellPdeElementMap)[*cell_iter];
74 unsigned node_index = this->mrCellPopulation.GetLocationIndexUsingCell(*cell_iter);
76 Node<DIM>* p_node = this->mrCellPopulation.GetNode(node_index);
80 double cell_weight = radius*radius;
82 bool cell_is_apoptotic = cell_iter->template HasCellProperty<ApoptoticCellProperty>();
83 if (!cell_is_apoptotic)
85 this->mCellDensityOnCoarseElements[elem_index] += cell_weight;
90 c_matrix<double, DIM, DIM> jacobian;
92 for (
unsigned elem_index=0; elem_index<this->mCellDensityOnCoarseElements.size(); elem_index++)
94 rCoarseMesh.
GetElement(elem_index)->CalculateJacobian(jacobian, det);
95 this->mCellDensityOnCoarseElements[elem_index] /= rCoarseMesh.
GetElement(elem_index)->GetVolume(det);