git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8395 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -75,7 +75,7 @@ FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
double **x = atom->x;
|
||||
int *mask = atom->mask;
|
||||
int *image = atom->image;
|
||||
tagint *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double xprd = domain->xprd;
|
||||
@ -85,9 +85,9 @@ FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
if (mask[i] & groupbit) {
|
||||
xbox = (image[i] & 1023) - 512;
|
||||
ybox = (image[i] >> 10 & 1023) - 512;
|
||||
zbox = (image[i] >> 20) - 512;
|
||||
xbox = (image[i] & IMGMASK) - IMGMAX;
|
||||
ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX;
|
||||
zbox = (image[i] >> IMG2BITS) - IMGMAX;
|
||||
xoriginal[i][0] = x[i][0] + xbox*xprd;
|
||||
xoriginal[i][1] = x[i][1] + ybox*yprd;
|
||||
xoriginal[i][2] = x[i][2] + zbox*zprd;
|
||||
@ -158,7 +158,7 @@ void FixSpringSelf::post_force(int vflag)
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
int *mask = atom->mask;
|
||||
int *image = atom->image;
|
||||
tagint *image = atom->image;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
double xprd = domain->xprd;
|
||||
@ -170,9 +170,9 @@ void FixSpringSelf::post_force(int vflag)
|
||||
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit) {
|
||||
xbox = (image[i] & 1023) - 512;
|
||||
ybox = (image[i] >> 10 & 1023) - 512;
|
||||
zbox = (image[i] >> 20) - 512;
|
||||
xbox = (image[i] & IMGMASK) - IMGMAX;
|
||||
ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX;
|
||||
zbox = (image[i] >> IMG2BITS) - IMGMAX;
|
||||
dx = x[i][0] + xbox*xprd - xoriginal[i][0];
|
||||
dy = x[i][1] + ybox*yprd - xoriginal[i][1];
|
||||
dz = x[i][2] + zbox*zprd - xoriginal[i][2];
|
||||
|
||||
Reference in New Issue
Block a user