Skip to content

Commit

Permalink
fix issue with KuzminKutuzov potential in C at very large distances
Browse files Browse the repository at this point in the history
  • Loading branch information
jobovy committed Jun 22, 2015
1 parent 6cebe94 commit 62c5099
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ double KuzminKutuzovStaeckelPotentialEval(double R,double z, double phi,
double discr = pow(R*R + z*z - Delta*Delta, 2.) + (4. * Delta*Delta * R*R);
double l = 0.5 * (term + sqrt(discr));
double n = 0.5 * (term - sqrt(discr));
n= ((n > 0.) ? n: 0.);
//Calculate potential
return -amp /(sqrt(l) + sqrt(n));
}
Expand Down

0 comments on commit 62c5099

Please sign in to comment.