git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8803 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -603,13 +603,12 @@ void Atom::data_atoms(int n, char *buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (imageflag)
|
if (imageflag)
|
||||||
imagedata =
|
imagedata = ((tagint) (atoi(values[iptr]) + IMGMAX) & IMGMASK) |
|
||||||
(((tagint) atoi(values[iptr+2]) + IMGMAX & IMGMASK) << IMG2BITS) |
|
(((tagint) (atoi(values[iptr+1]) + IMGMAX) & IMGMASK) << IMGBITS) |
|
||||||
(((tagint) atoi(values[iptr+1]) + IMGMAX & IMGMASK) << IMGBITS) |
|
(((tagint) (atoi(values[iptr+2]) + IMGMAX) & IMGMASK) << IMG2BITS);
|
||||||
(atoi(values[iptr]) + IMGMAX & IMGMASK);
|
|
||||||
else imagedata = ((tagint) IMGMAX << IMG2BITS) |
|
else imagedata = ((tagint) IMGMAX << IMG2BITS) |
|
||||||
((tagint) IMGMAX << IMGBITS) | IMGMAX;
|
((tagint) IMGMAX << IMGBITS) | IMGMAX;
|
||||||
|
|
||||||
xdata[0] = atof(values[xptr]);
|
xdata[0] = atof(values[xptr]);
|
||||||
xdata[1] = atof(values[xptr+1]);
|
xdata[1] = atof(values[xptr+1]);
|
||||||
xdata[2] = atof(values[xptr+2]);
|
xdata[2] = atof(values[xptr+2]);
|
||||||
|
|||||||
@ -1147,9 +1147,9 @@ void Domain::image_flip(int m, int n, int p)
|
|||||||
ybox -= p*zbox;
|
ybox -= p*zbox;
|
||||||
xbox -= m*ybox + n*zbox;
|
xbox -= m*ybox + n*zbox;
|
||||||
|
|
||||||
image[i] = ((zbox + (tagint) IMGMAX & IMGMASK) << IMG2BITS) |
|
image[i] = ((tagint) (xbox + IMGMAX) & IMGMASK) |
|
||||||
((ybox + (tagint) IMGMAX & IMGMASK) << IMGBITS) |
|
(((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) |
|
||||||
(xbox + IMGMAX & IMGMASK);
|
(((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -200,7 +200,8 @@ void FixAdapt::init()
|
|||||||
Pair *pair = force->pair_match(ad->pstyle,1);
|
Pair *pair = force->pair_match(ad->pstyle,1);
|
||||||
if (pair == NULL) error->all(FLERR,"Fix adapt pair style does not exist");
|
if (pair == NULL) error->all(FLERR,"Fix adapt pair style does not exist");
|
||||||
void *ptr = pair->extract(ad->pparam,ad->pdim);
|
void *ptr = pair->extract(ad->pparam,ad->pdim);
|
||||||
if (ptr == NULL) error->all(FLERR,"Fix adapt pair style param not supported");
|
if (ptr == NULL)
|
||||||
|
error->all(FLERR,"Fix adapt pair style param not supported");
|
||||||
|
|
||||||
ad->pdim = 2;
|
ad->pdim = 2;
|
||||||
if (ad->pdim == 0) ad->scalar = (double *) ptr;
|
if (ad->pdim == 0) ad->scalar = (double *) ptr;
|
||||||
|
|||||||
@ -166,7 +166,8 @@ void PairCoulCut::settings(int narg, char **arg)
|
|||||||
|
|
||||||
void PairCoulCut::coeff(int narg, char **arg)
|
void PairCoulCut::coeff(int narg, char **arg)
|
||||||
{
|
{
|
||||||
if (narg < 2 || narg > 3) error->all(FLERR,"Incorrect args for pair coefficients");
|
if (narg < 2 || narg > 3)
|
||||||
|
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||||
if (!allocated) allocate();
|
if (!allocated) allocate();
|
||||||
|
|
||||||
int ilo,ihi,jlo,jhi;
|
int ilo,ihi,jlo,jhi;
|
||||||
|
|||||||
@ -729,8 +729,9 @@ void ReadDump::process_atoms(int n)
|
|||||||
|
|
||||||
// replace image flag in case changed by ix,iy,iz fields
|
// replace image flag in case changed by ix,iy,iz fields
|
||||||
|
|
||||||
image[m] = ((tagint) xbox << IMG2BITS) |
|
image[m] = ((tagint) (xbox + IMGMAX) & IMGMASK) |
|
||||||
((tagint) ybox << IMGBITS) | zbox;
|
(((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) |
|
||||||
|
(((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -786,9 +787,8 @@ void ReadDump::process_atoms(int n)
|
|||||||
m = atom->nlocal;
|
m = atom->nlocal;
|
||||||
|
|
||||||
// set atom attributes from other dump file fields
|
// set atom attributes from other dump file fields
|
||||||
// xyzbox = IMGMAX is default value set by create_atom()
|
|
||||||
|
|
||||||
xbox = ybox = zbox = IMGMAX;
|
xbox = ybox = zbox = 0;
|
||||||
|
|
||||||
for (ifield = 1; ifield < nfield; ifield++) {
|
for (ifield = 1; ifield < nfield; ifield++) {
|
||||||
switch (fieldtype[ifield]) {
|
switch (fieldtype[ifield]) {
|
||||||
@ -814,8 +814,9 @@ void ReadDump::process_atoms(int n)
|
|||||||
|
|
||||||
// replace image flag in case changed by ix,iy,iz fields
|
// replace image flag in case changed by ix,iy,iz fields
|
||||||
|
|
||||||
image[m] = ((tagint) xbox << IMG2BITS) |
|
image[m] = ((tagint) (xbox + IMGMAX) & IMGMASK) |
|
||||||
((tagint) ybox << IMGBITS) | zbox;
|
(((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) |
|
||||||
|
(((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -496,9 +496,9 @@ void Set::set(int keyword)
|
|||||||
if (ximageflag) xbox = ximage;
|
if (ximageflag) xbox = ximage;
|
||||||
if (yimageflag) ybox = yimage;
|
if (yimageflag) ybox = yimage;
|
||||||
if (zimageflag) zbox = zimage;
|
if (zimageflag) zbox = zimage;
|
||||||
atom->image[i] = ((zbox + (tagint) IMGMAX & IMGMASK) << IMG2BITS) |
|
atom->image[i] = ((tagint) (xbox + IMGMAX) & IMGMASK) |
|
||||||
((ybox + (tagint) IMGMAX & IMGMASK) << IMGBITS) |
|
(((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) |
|
||||||
(xbox + IMGMAX & IMGMASK);
|
(((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS);
|
||||||
|
|
||||||
// set dipole moment
|
// set dipole moment
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user