Commit 05c25b36 authored by Jose Agustin Arguedas Leiva's avatar Jose Agustin Arguedas Leiva Committed by Cristian Lalescu
Browse files

fixed rod p2p typo

parent 91c0f555
......@@ -218,7 +218,7 @@ public:
real_number /*rhs_part2*/[],
const real_number dist_pow2,
const real_number /*cutoff*/,
const real_number xseparation,
const real_number xseparation, /* This separation is x1-x2 */
const real_number yseparation,
const real_number zseparation){
switch(this->current_particle_shape)
......@@ -250,8 +250,8 @@ public:
xq = x * pos_part2[IDXC_X+3] + y * pos_part2[IDXC_Y+3] + z * pos_part2[IDXC_Z+3];
/* t and s parametrize the two rods. Find min distance: */
assert(this->cylinder_length > 0);
t = 2.0/(this->cylinder_length*(pq*pq-1.0))*(-xp+pq*xq);
s = 2.0/(this->cylinder_length*(pq*pq-1.0))*(-pq*xp+xq);
t = 2.0/(this->cylinder_length*(pq*pq-1.0))*(xp-pq*xq);
s = 2.0/(this->cylinder_length*(pq*pq-1.0))*(pq*xp-xq);
/* Test if -1<s<1 and -1<t<1 */
if( abs(t)<=1.0 and abs(s)<=1.0 )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment