Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -218,7 +218,7 @@ public: ...@@ -218,7 +218,7 @@ public:
real_number /*rhs_part2*/[], real_number /*rhs_part2*/[],
const real_number dist_pow2, const real_number dist_pow2,
const real_number /*cutoff*/, const real_number /*cutoff*/,
const real_number xseparation, const real_number xseparation, /* This separation is x1-x2 */
const real_number yseparation, const real_number yseparation,
const real_number zseparation){ const real_number zseparation){
switch(this->current_particle_shape) switch(this->current_particle_shape)
...@@ -250,8 +250,8 @@ public: ...@@ -250,8 +250,8 @@ public:
xq = x * pos_part2[IDXC_X+3] + y * pos_part2[IDXC_Y+3] + z * pos_part2[IDXC_Z+3]; 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: */ /* t and s parametrize the two rods. Find min distance: */
assert(this->cylinder_length > 0); assert(this->cylinder_length > 0);
t = 2.0/(this->cylinder_length*(pq*pq-1.0))*(-xp+pq*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); s = 2.0/(this->cylinder_length*(pq*pq-1.0))*(pq*xp-xq);
/* Test if -1<s<1 and -1<t<1 */ /* Test if -1<s<1 and -1<t<1 */
if( abs(t)<=1.0 and abs(s)<=1.0 ) if( abs(t)<=1.0 and abs(s)<=1.0 )
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment