forked from lijiext/lammps
fix domain boundary indexing
the compiler pointed out that boundary[2][2] doesn't exist. If I understand this correctly, those checks should be against boundary[*][0].
This commit is contained in:
parent
6328beb7d7
commit
effbe18c46
|
@ -1600,10 +1600,10 @@ int Domain::ownatom(int id, double *x, imageint *image, int shrinkexceed)
|
||||||
if (coord[0] < blo[0] && boundary[0][0] > 1) newcoord[0] = blo[0];
|
if (coord[0] < blo[0] && boundary[0][0] > 1) newcoord[0] = blo[0];
|
||||||
else if (coord[0] >= bhi[0] && boundary[0][1] > 1) newcoord[0] = bhi[0];
|
else if (coord[0] >= bhi[0] && boundary[0][1] > 1) newcoord[0] = bhi[0];
|
||||||
else newcoord[0] = coord[0];
|
else newcoord[0] = coord[0];
|
||||||
if (coord[1] < blo[1] && boundary[1][1] > 1) newcoord[1] = blo[1];
|
if (coord[1] < blo[1] && boundary[1][0] > 1) newcoord[1] = blo[1];
|
||||||
else if (coord[1] >= bhi[1] && boundary[1][1] > 1) newcoord[1] = bhi[1];
|
else if (coord[1] >= bhi[1] && boundary[1][1] > 1) newcoord[1] = bhi[1];
|
||||||
else newcoord[1] = coord[1];
|
else newcoord[1] = coord[1];
|
||||||
if (coord[2] < blo[2] && boundary[2][2] > 1) newcoord[2] = blo[2];
|
if (coord[2] < blo[2] && boundary[2][0] > 1) newcoord[2] = blo[2];
|
||||||
else if (coord[2] >= bhi[2] && boundary[2][1] > 1) newcoord[2] = bhi[2];
|
else if (coord[2] >= bhi[2] && boundary[2][1] > 1) newcoord[2] = bhi[2];
|
||||||
else newcoord[2] = coord[2];
|
else newcoord[2] = coord[2];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue