Skip to content

Commit

Permalink
corrrect a bug when S != 2
Browse files Browse the repository at this point in the history
I used S=2 and did not notice this before.
  • Loading branch information
brucefan1983 committed Nov 26, 2019
1 parent 7f86f8c commit dd07c1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/potential.cu
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ static __device__ void find_fr_and_frp
{

fr = d0 / (s - 1.0f) * exp(-sqrt(2.0f * s) * a * (d12 - r0));
frp = -2.0f * a * fr;
frp = -sqrt(2.0f * s) * a * fr;
}


static __device__ void find_fa_and_fap
(float d0, float a, float r0, float s, float d12, float &fa, float &fap)
{
fa = s * d0 / (s - 1.0f) * exp(-sqrt(2.0f / s) * a * (d12 - r0));
fap = -a * fa;
fap = -sqrt(2.0f / s) * a * fa;
}


Expand Down

0 comments on commit dd07c1f

Please sign in to comment.