66 cell_iter != rCellPopulation.
End();
70 if (cell_iter->template HasCellProperty<CellLabel>())
74 c_vector<double,DIM>& r_gradient = gradients.
rGetGradient(node_global_index);
75 double nutrient_concentration = cell_iter->GetCellData()->GetItem(
"nutrient");
76 double magnitude_of_gradient = norm_2(r_gradient);
78 double force_magnitude = GetChemotacticForceMagnitude(nutrient_concentration, magnitude_of_gradient);
81 if (magnitude_of_gradient > 0)
83 c_vector<double,DIM> force = (force_magnitude/magnitude_of_gradient)*r_gradient;
84 rCellPopulation.
GetNode(node_global_index)->AddAppliedForceContribution(force);