git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11735 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-04-07 22:53:02 +00:00
parent 119c473498
commit 2292ba2c67
2 changed files with 6 additions and 6 deletions

View File

@ -161,9 +161,8 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp)
tag_enable = 1; tag_enable = 1;
map_style = map_user = 0; map_style = map_user = 0;
map_tag_max = 0; map_tag_max = -1;
map_maxarray = 0; map_maxarray = map_nhash = 0;
map_nhash = 0;
max_same = 0; max_same = 0;
sametag = NULL; sametag = NULL;
@ -350,7 +349,8 @@ void Atom::create_avec(const char *style, int narg, char **arg, char *suffix)
// if molecular system: // if molecular system:
// atom IDs must be defined // atom IDs must be defined
// force atom map to be created, style will reset by map_init() // force atom map to be created
// map style may be reset by map_init() and its call to map_style_set()
molecular = avec->molecular; molecular = avec->molecular;
if (molecular && tag_enable == 0) if (molecular && tag_enable == 0)
@ -480,7 +480,6 @@ void Atom::modify_params(int narg, char **arg)
if (strcmp(arg[iarg+1],"array") == 0) map_user = 1; if (strcmp(arg[iarg+1],"array") == 0) map_user = 1;
else if (strcmp(arg[iarg+1],"hash") == 0) map_user = 2; else if (strcmp(arg[iarg+1],"hash") == 0) map_user = 2;
else error->all(FLERR,"Illegal atom_modify command"); else error->all(FLERR,"Illegal atom_modify command");
map_style = map_user;
iarg += 2; iarg += 2;
} else if (strcmp(arg[iarg],"first") == 0) { } else if (strcmp(arg[iarg],"first") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal atom_modify command"); if (iarg+2 > narg) error->all(FLERR,"Illegal atom_modify command");

View File

@ -290,8 +290,9 @@ int Atom::map_style_set()
error->all(FLERR,"Cannot create an atom map unless atoms have IDs"); error->all(FLERR,"Cannot create an atom map unless atoms have IDs");
// map_tag_max = max ID of any atom that will be in new map // map_tag_max = max ID of any atom that will be in new map
// map_tag_max = -1 if no atoms
tagint max = 0; tagint max = -1;
for (int i = 0; i < nlocal; i++) max = MAX(max,tag[i]); for (int i = 0; i < nlocal; i++) max = MAX(max,tag[i]);
MPI_Allreduce(&max,&map_tag_max,1,MPI_LMP_TAGINT,MPI_MAX,world); MPI_Allreduce(&max,&map_tag_max,1,MPI_LMP_TAGINT,MPI_MAX,world);