forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2207 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
9bac843ce3
commit
afa4c78a1b
|
@ -271,6 +271,14 @@ void CreateAtoms::add_many()
|
|||
// and is shifted away from true boundary
|
||||
// which is where atoms are likely to be generated
|
||||
|
||||
double epsilon[3];
|
||||
if (triclinic) epsilon[0] = epsilon[1] = epsilon[2] = EPSILON;
|
||||
else {
|
||||
epsilon[0] = domain->prd[0] * EPSILON;
|
||||
epsilon[1] = domain->prd[1] * EPSILON;
|
||||
epsilon[2] = domain->prd[2] * EPSILON;
|
||||
}
|
||||
|
||||
double sublo[3],subhi[3];
|
||||
|
||||
if (triclinic == 0) {
|
||||
|
@ -284,16 +292,16 @@ void CreateAtoms::add_many()
|
|||
}
|
||||
|
||||
if (domain->xperiodic) {
|
||||
if (comm->myloc[0] == 0) sublo[0] -= EPSILON;
|
||||
if (comm->myloc[0] == comm->procgrid[0]-1) subhi[0] -= 2.0*EPSILON;
|
||||
if (comm->myloc[0] == 0) sublo[0] -= epsilon[0];
|
||||
if (comm->myloc[0] == comm->procgrid[0]-1) subhi[0] -= 2.0*epsilon[0];
|
||||
}
|
||||
if (domain->yperiodic) {
|
||||
if (comm->myloc[1] == 0) sublo[1] -= EPSILON;
|
||||
if (comm->myloc[1] == comm->procgrid[1]-1) subhi[1] -= 2.0*EPSILON;
|
||||
if (comm->myloc[1] == 0) sublo[1] -= epsilon[1];
|
||||
if (comm->myloc[1] == comm->procgrid[1]-1) subhi[1] -= 2.0*epsilon[1];
|
||||
}
|
||||
if (domain->zperiodic) {
|
||||
if (comm->myloc[2] == 0) sublo[2] -= EPSILON;
|
||||
if (comm->myloc[2] == comm->procgrid[2]-1) subhi[2] -= 2.0*EPSILON;
|
||||
if (comm->myloc[2] == 0) sublo[2] -= epsilon[2];
|
||||
if (comm->myloc[2] == comm->procgrid[2]-1) subhi[2] -= 2.0*epsilon[2];
|
||||
}
|
||||
|
||||
// iterate on 3d periodic lattice of unit cells using loop bounds
|
||||
|
|
Loading…
Reference in New Issue