Skip to content

Commit dd07c1f

Browse files
committed
corrrect a bug when S != 2
I used S=2 and did not notice this before.
1 parent 7f86f8c commit dd07c1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/potential.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ static __device__ void find_fr_and_frp
8282
{
8383

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

8888

8989
static __device__ void find_fa_and_fap
9090
(float d0, float a, float r0, float s, float d12, float &fa, float &fap)
9191
{
9292
fa = s * d0 / (s - 1.0f) * exp(-sqrt(2.0f / s) * a * (d12 - r0));
93-
fap = -a * fa;
93+
fap = -sqrt(2.0f / s) * a * fa;
9494
}
9595

9696

0 commit comments

Comments
 (0)