From 628e5c63bf2d23cc03009d8638c441deb4472b6d Mon Sep 17 00:00:00 2001 From: Kevin Zhong Date: Mon, 16 Dec 2024 12:04:21 +0100 Subject: [PATCH] bugfix: periodicity correction in k for rr --- calcSlipVels.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/calcSlipVels.f90 b/calcSlipVels.f90 index 7fdf65d..01c15ae 100644 --- a/calcSlipVels.f90 +++ b/calcSlipVels.f90 @@ -148,9 +148,9 @@ subroutine calcRelShellVel jj = modulo(j-1,n2m) + 1 ! Abs distances to centroid from the (i,j,k) cell - rr_x = norm2 ( [ xc(i), ym(j), zm(k) ] - pos_CM(:,1) ) - rr_y = norm2 ( [ xm(i), yc(j), zm(k) ] - pos_CM(:,1) ) - rr_z = norm2 ( [ xm(i), ym(j), zc(k) ] - pos_CM(:,1) ) + rr_x = norm2 ( [ xc(i), ym(j), zm(kk) ] - pos_CM(:,1) ) + rr_y = norm2 ( [ xm(i), yc(j), zm(kk) ] - pos_CM(:,1) ) + rr_z = norm2 ( [ xm(i), ym(j), zc(kk) ] - pos_CM(:,1) ) do nshell = 1,6 ! loop over each shell