git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8037 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -758,7 +758,7 @@ void Domain::closest_image(const double * const xi, const double * const xj,
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
remap the point into the periodic box no matter how far away
|
||||
adjust image accordingly
|
||||
adjust 3 image flags encoded in image accordingly
|
||||
resulting coord must satisfy lo <= coord < hi
|
||||
MAX is important since coord - prd < lo can happen when coord = hi
|
||||
for triclinic, point is converted to lamda coords (0-1) before doing remap
|
||||
@ -849,6 +849,7 @@ void Domain::remap(double *x, int &image)
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
remap the point into the periodic box no matter how far away
|
||||
no image flag calculation
|
||||
resulting coord must satisfy lo <= coord < hi
|
||||
MAX is important since coord - prd < lo can happen when coord = hi
|
||||
for triclinic, point is converted to lamda coords (0-1) before remap
|
||||
|
||||
@ -636,9 +636,11 @@ void FixDeform::init()
|
||||
/* ----------------------------------------------------------------------
|
||||
box flipped on previous step
|
||||
reset box tilts for flipped config and create new box in domain
|
||||
image_flip() adjusts image flags due to box shape change induced by flip
|
||||
remap() puts atoms outside the new box back into the new box
|
||||
image_tilt() adjusts image flags due to box shape change induced by flip
|
||||
perform irregular on atoms in lamda coords to migrate atoms to new procs
|
||||
important that image_flip comes before remap, since remap may change
|
||||
image flags to new values, making eqs in doc of Domain:image_flip incorrect
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixDeform::pre_exchange()
|
||||
@ -651,11 +653,12 @@ void FixDeform::pre_exchange()
|
||||
domain->set_global_box();
|
||||
domain->set_local_box();
|
||||
|
||||
domain->image_flip(flipxy,flipxz,flipyz);
|
||||
|
||||
double **x = atom->x;
|
||||
int *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
for (int i = 0; i < nlocal; i++) domain->remap(x[i],image[i]);
|
||||
domain->image_flip(flipxy,flipxz,flipyz);
|
||||
|
||||
domain->x2lamda(atom->nlocal);
|
||||
irregular->migrate_atoms();
|
||||
|
||||
@ -2146,9 +2146,11 @@ void FixNH::nh_omega_dot()
|
||||
if xy tilt exceeded, adjust B vector by one A vector
|
||||
check yz first since it may change xz, then xz check comes after
|
||||
if any flip occurs, create new box in domain
|
||||
remap() puts atoms outside the new box back into the new box
|
||||
image_flip() adjusts image flags due to box shape change induced by flip
|
||||
remap() puts atoms outside the new box back into the new box
|
||||
perform irregular on atoms in lamda coords to migrate atoms to new procs
|
||||
important that image_flip comes before remap, since remap may change
|
||||
image flags to new values, making eqs in doc of Domain:image_flip incorrect
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixNH::pre_exchange()
|
||||
@ -2201,11 +2203,12 @@ void FixNH::pre_exchange()
|
||||
domain->set_global_box();
|
||||
domain->set_local_box();
|
||||
|
||||
domain->image_flip(flipxy,flipxz,flipyz);
|
||||
|
||||
double **x = atom->x;
|
||||
int *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
for (int i = 0; i < nlocal; i++) domain->remap(x[i],image[i]);
|
||||
domain->image_flip(flipxy,flipxz,flipyz);
|
||||
|
||||
domain->x2lamda(atom->nlocal);
|
||||
irregular->migrate_atoms();
|
||||
|
||||
Reference in New Issue
Block a user