forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@706 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
33d2806fd8
commit
884cf474f1
|
@ -260,9 +260,16 @@ void CreateAtoms::add_many()
|
|||
if (zmin < 0.0) klo--;
|
||||
|
||||
// set bounds for my proc
|
||||
// if periodic and I am lo/hi proc, adjust bounds by EPSILON
|
||||
// on lower boundary, allows triclinic atoms just outside box to be added
|
||||
// on upper boundary, prevents atoms with lower images from being added
|
||||
// if periodic:
|
||||
// should create exactly 1 atom when 2 images are both "on" the boundary
|
||||
// either image may be slightly inside/outside true box due to round-off
|
||||
// if I am lo proc, decrement lower bound by EPSILON
|
||||
// this will insure lo image is created
|
||||
// if I am hi proc, decrement upper bound by 2.0*EPSILON
|
||||
// this will insure hi image is not created
|
||||
// thus insertion box is EPSILON smaller than true box
|
||||
// and is shifted away from true boundary
|
||||
// which is where atoms are likely to be generated
|
||||
|
||||
double sublo[3],subhi[3];
|
||||
|
||||
|
@ -277,20 +284,20 @@ void CreateAtoms::add_many()
|
|||
}
|
||||
|
||||
if (domain->xperiodic) {
|
||||
if (triclinic && comm->myloc[0] == 0) sublo[0] -= EPSILON;
|
||||
if (comm->myloc[0] == comm->procgrid[0]-1) subhi[0] -= EPSILON;
|
||||
if (comm->myloc[0] == 0) sublo[0] -= EPSILON;
|
||||
if (comm->myloc[0] == comm->procgrid[0]-1) subhi[0] -= 2.0*EPSILON;
|
||||
}
|
||||
if (domain->yperiodic) {
|
||||
if (triclinic && comm->myloc[1] == 0) sublo[1] -= EPSILON;
|
||||
if (comm->myloc[1] == comm->procgrid[1]-1) subhi[1] -= EPSILON;
|
||||
if (comm->myloc[1] == 0) sublo[1] -= EPSILON;
|
||||
if (comm->myloc[1] == comm->procgrid[1]-1) subhi[1] -= 2.0*EPSILON;
|
||||
}
|
||||
if (domain->zperiodic) {
|
||||
if (triclinic && comm->myloc[2] == 0) sublo[2] -= EPSILON;
|
||||
if (comm->myloc[2] == comm->procgrid[2]-1) subhi[2] -= EPSILON;
|
||||
if (comm->myloc[2] == 0) sublo[2] -= EPSILON;
|
||||
if (comm->myloc[2] == comm->procgrid[2]-1) subhi[2] -= 2.0*EPSILON;
|
||||
}
|
||||
|
||||
// iterate on 3d periodic lattice using loop bounds
|
||||
// invoke add_atom for nbasis atoms in each unit cell
|
||||
// iterate on 3d periodic lattice of unit cells using loop bounds
|
||||
// iterate on nbasis atoms in each unit cell
|
||||
// convert lattice coords to box coords
|
||||
// add atom if it meets all criteria
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ void LAMMPS::init()
|
|||
// used by fix shear_history::unpack_restart()
|
||||
// when force->pair->gran_history creates fix ??
|
||||
modify->init(); // modify must come after update, force, atom
|
||||
neighbor->init(); // neighbor must come after force, modify (due to min)
|
||||
neighbor->init(); // neighbor must come after force, modify
|
||||
output->init(); // output must come after domain, force, modify
|
||||
comm->init(); // comm must come after force, modify
|
||||
timer->init();
|
||||
|
@ -329,7 +329,7 @@ void LAMMPS::destroy()
|
|||
delete output;
|
||||
delete modify; // modify must come after output, force, update
|
||||
// since they delete fixes
|
||||
delete atom; // must come after modify, neighbor
|
||||
delete atom; // atom must come after modify, neighbor
|
||||
// since fixes delete callbacks in atom
|
||||
delete timer;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue