59 unsigned nodeBGlobalIndex,
66 assert(nodeAGlobalIndex != nodeBGlobalIndex);
72 const c_vector<double, DIM>& r_node_a_location = p_node_a->
rGetLocation();
73 const c_vector<double, DIM>& r_node_b_location = p_node_b->
rGetLocation();
76 c_vector<double, DIM> unit_vector = r_node_b_location - r_node_a_location;
79 double distance_between_nodes = norm_2(unit_vector);
82 if (this->mUseCutOffLength)
84 if (distance_between_nodes >= this->GetCutOffLength())
86 return zero_vector<double>(DIM);
91 assert(distance_between_nodes > 0);
92 assert(!std::isnan(distance_between_nodes));
95 unit_vector /= distance_between_nodes;
98 double radius_of_cell_one = p_node_a->
GetRadius();
99 double radius_of_cell_two = p_node_b->
GetRadius();
102 c_vector<double, DIM> force_between_nodes = GetMagnitudeOfForce(distance_between_nodes,radius_of_cell_one,radius_of_cell_two) * unit_vector;
104 return force_between_nodes;
113 if (distanceBetweenNodes < radiusOfCellOne + radiusOfCellTwo)
115 dWDdd = -pow(radiusOfCellOne + radiusOfCellTwo - distanceBetweenNodes,1.5)
116 *pow(radiusOfCellOne*radiusOfCellTwo/(radiusOfCellOne+radiusOfCellTwo),0.5)
117 /mDeformationEnergyParameter;
virtual void OutputForceParameters(out_stream &rParamsFile)