need to use fabs() when computing deltas when checking image flags for consistency

This commit is contained in:
Axel Kohlmeyer 2019-03-27 15:47:14 -04:00
parent c4fd658e9d
commit b685a0a7b8
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 3 additions and 3 deletions

View File

@ -763,9 +763,9 @@ void Domain::image_check()
continue;
}
delx = unwrap[i][0] - unwrap[k][0];
dely = unwrap[i][1] - unwrap[k][1];
delz = unwrap[i][2] - unwrap[k][2];
delx = fabs(unwrap[i][0] - unwrap[k][0]);
dely = fabs(unwrap[i][1] - unwrap[k][1]);
delz = fabs(unwrap[i][2] - unwrap[k][2]);
if (xperiodic && delx > xprd_half) flag = 1;
if (yperiodic && dely > yprd_half) flag = 1;