From 74577fa5843e2860044ec94b5bcfdc3c01dbe690 Mon Sep 17 00:00:00 2001 From: Tim Bernhard Date: Fri, 19 Nov 2021 08:08:07 +0100 Subject: [PATCH] Fix issue where direction correction in compute pair/local might not have been correct --- src/compute_pair_local.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index af3ebd50a4..ff9acdc4ef 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -268,7 +268,7 @@ int ComputePairLocal::compute_pairs(int flag) else ptr = alocal[m]; // to make sure dx, dy and dz are always from the lower to the higher id - double directionCorrection = i > j ? -1.0 : 1.0; + double directionCorrection = itag > jtag ? -1.0 : 1.0; for (n = 0; n < nvalues; n++) { switch (pstyle[n]) {