61 unsigned nodeBGlobalIndex,
68 assert(nodeAGlobalIndex != nodeBGlobalIndex);
74 const c_vector<double, DIM>& r_node_a_location = p_node_a->
rGetLocation();
75 const c_vector<double, DIM>& r_node_b_location = p_node_b->
rGetLocation();
78 c_vector<double, DIM> unit_vector = r_node_b_location - r_node_a_location;
81 double distance_between_nodes = norm_2(unit_vector);
84 if (this->mUseCutOffLength)
86 if (distance_between_nodes >= this->GetCutOffLength())
88 return zero_vector<double>(DIM);
93 assert(distance_between_nodes > 0);
94 assert(!std::isnan(distance_between_nodes));
97 unit_vector /= distance_between_nodes;
100 double radius_of_cell_one = p_node_a->
GetRadius();
101 double radius_of_cell_two = p_node_b->
GetRadius();
104 c_vector<double, DIM> force_between_nodes = GetMagnitudeOfForce(distance_between_nodes,radius_of_cell_one,radius_of_cell_two) * unit_vector;
106 return force_between_nodes;
115 if (distanceBetweenNodes < radiusOfCellOne + radiusOfCellTwo)
117 dWDdd = -pow(radiusOfCellOne + radiusOfCellTwo - distanceBetweenNodes,1.5)
118 *pow(radiusOfCellOne*radiusOfCellTwo/(radiusOfCellOne+radiusOfCellTwo),0.5)
119 /mDeformationEnergyParameter;
virtual void OutputForceParameters(out_stream &rParamsFile)