git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14220 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
18
src/set.cpp
18
src/set.cpp
@ -11,10 +11,10 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "mpi.h"
|
||||
#include "math.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <mpi.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "set.h"
|
||||
#include "atom.h"
|
||||
#include "atom_vec.h"
|
||||
@ -565,7 +565,7 @@ void Set::set(int keyword)
|
||||
|
||||
// overwrite dvalue, ivalue, xyzw value if variables defined
|
||||
// else the input script scalar value remains in place
|
||||
|
||||
|
||||
if (varflag) {
|
||||
if (varflag1) {
|
||||
dvalue = xvalue = vec1[i];
|
||||
@ -583,7 +583,7 @@ void Set::set(int keyword)
|
||||
if (ivalue <= 0 || ivalue > atom->ntypes)
|
||||
error->one(FLERR,"Invalid value in set command");
|
||||
atom->type[i] = ivalue;
|
||||
}
|
||||
}
|
||||
else if (keyword == MOLECULE) atom->molecule[i] = ivalue;
|
||||
else if (keyword == X) atom->x[i][0] = dvalue;
|
||||
else if (keyword == Y) atom->x[i][1] = dvalue;
|
||||
@ -592,7 +592,7 @@ void Set::set(int keyword)
|
||||
else if (keyword == MASS) {
|
||||
if (dvalue <= 0.0) error->one(FLERR,"Invalid mass in set command");
|
||||
atom->rmass[i] = dvalue;
|
||||
}
|
||||
}
|
||||
else if (keyword == DIAMETER) {
|
||||
if (dvalue < 0.0) error->one(FLERR,"Invalid diameter in set command");
|
||||
atom->radius[i] = 0.5 * dvalue;
|
||||
@ -730,8 +730,8 @@ void Set::set(int keyword)
|
||||
if (ximageflag) xbox = ximage;
|
||||
if (yimageflag) ybox = yimage;
|
||||
if (zimageflag) zbox = zimage;
|
||||
atom->image[i] = ((imageint) (xbox + IMGMAX) & IMGMASK) |
|
||||
(((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) |
|
||||
atom->image[i] = ((imageint) (xbox + IMGMAX) & IMGMASK) |
|
||||
(((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) |
|
||||
(((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user