95 node_iter != rCellPopulation.
rGetMesh().GetNodeIteratorEnd();
99 unsigned node_index = node_iter->GetIndex();
100 double node_radius = node_iter->GetRadius();
103 if (node_radius == 0.0)
106 EXCEPTION(
"SetRadius() must be called on each Node before calling DiffusionForce::AddForceContribution() to avoid a division by zero error");
119 double diffusion_const_scaling = GetDiffusionScalingConstant();
120 double diffusion_constant = diffusion_const_scaling/node_radius;
122 c_vector<double, DIM> force_contribution;
123 for (
unsigned i=0; i<DIM; i++)
136 force_contribution[i] = (nu*sqrt(2.0*diffusion_constant*dt)/dt)*xi;
138 node_iter->AddAppliedForceContribution(force_contribution);