mirror of https://github.com/lammps/lammps.git
need to use fabs() when computing deltas when checking image flags for consistency
This commit is contained in:
parent
c4fd658e9d
commit
b685a0a7b8
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue