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:
Dan Ibanez 2017-01-25 15:24:01 -07:00
parent 6328beb7d7
commit effbe18c46
1 changed files with 2 additions and 2 deletions

View File

@ -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];
else if (coord[0] >= bhi[0] && boundary[0][1] > 1) newcoord[0] = bhi[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 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 newcoord[2] = coord[2];