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 = mCentreOfSphere + mRadiusOfSphere*(cell_location - mCentreOfSphere)/radius;
93 unsigned node_index = this->mpCellPopulation->GetLocationIndexUsingCell(*cell_iter);
94 Node<DIM>* p_node = this->mpCellPopulation->GetNode(node_index);
104 bool condition_satisfied =
true;
108 cell_iter != this->mpCellPopulation->End();
112 c_vector<double,DIM> cell_location = this->mpCellPopulation->GetLocationOfCellCentre(*cell_iter);
113 double radius = norm_2(cell_location - mCentreOfSphere);
116 if (fabs(radius - mRadiusOfSphere) > mMaximumDistance)
119 condition_satisfied =
false;
123 return condition_satisfied;