79 cell_iter != this->mpCellPopulation->End();
83 c_vector<double,DIM> cell_location = this->mpCellPopulation->GetLocationOfCellCentre(*cell_iter);
84 double radius = norm_2(cell_location - mCentreOfSphere);
85 assert(radius != 0.0);
88 if (fabs(radius - mRadiusOfSphere) > mMaximumDistance)
91 c_vector<double, DIM> location_on_sphere =
92 mCentreOfSphere + mRadiusOfSphere*(cell_location - mCentreOfSphere)/radius;
94 unsigned node_index = this->mpCellPopulation->GetLocationIndexUsingCell(*cell_iter);
95 Node<DIM>* p_node = this->mpCellPopulation->GetNode(node_index);
105 bool condition_satisfied =
true;
109 cell_iter != this->mpCellPopulation->End();
113 c_vector<double,DIM> cell_location = this->mpCellPopulation->GetLocationOfCellCentre(*cell_iter);
114 double radius = norm_2(cell_location - mCentreOfSphere);
117 if (fabs(radius - mRadiusOfSphere) > mMaximumDistance)
120 condition_satisfied =
false;
124 return condition_satisfied;