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;
97 double radius_of_cell_one = p_node_a->
GetRadius();
98 double radius_of_cell_two = p_node_b->
GetRadius();
101 c_vector<double, DIM> force_between_nodes = GetMagnitudeOfForce(distance_between_nodes,radius_of_cell_one,radius_of_cell_two) * unit_vector;
103 return force_between_nodes;
virtual void OutputForceParameters(out_stream &rParamsFile)