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

This commit is contained in:
sjplimp
2014-01-17 18:43:09 +00:00
parent 961be6ee48
commit bad19033d0
172 changed files with 2523 additions and 2184 deletions

View File

@ -444,7 +444,6 @@ void ReadDump::atoms()
int mapflag = 0;
if (atom->map_style == 0) {
mapflag = 1;
atom->map_style = 1;
atom->map_init();
atom->map_set();
}
@ -477,11 +476,9 @@ void ReadDump::atoms()
if (addflag) {
bigint nblocal = atom->nlocal;
MPI_Allreduce(&nblocal,&atom->natoms,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (atom->natoms < 0 || atom->natoms > MAXBIGINT)
if (atom->natoms < 0 || atom->natoms >= MAXBIGINT)
error->all(FLERR,"Too many total atoms");
// change these to MAXTAGINT when allow tagint = bigint
if (atom->natoms > MAXSMALLINT) atom->tag_enable = 0;
if (atom->natoms <= MAXSMALLINT) atom->tag_extend();
if (atom->tag_enable) atom->tag_extend();
}
// if trimflag set, delete atoms not replaced by snapshot atoms
@ -553,6 +550,10 @@ void ReadDump::atoms()
irregular->migrate_atoms();
delete irregular;
if (triclinic) domain->lamda2x(atom->nlocal);
// check that atom IDs are valid
atom->tag_check();
}
/* ----------------------------------------------------------------------
@ -710,24 +711,27 @@ int ReadDump::fields_and_keywords(int narg, char **arg)
void ReadDump::process_atoms(int n)
{
int i,m,ifield,itype,itag;;
int i,m,ifield,itype;
int xbox,ybox,zbox;
tagint tag;
double **x = atom->x;
double **v = atom->v;
double *q = atom->q;
imageint *image = atom->image;
int nlocal = atom->nlocal;
int map_tag_max = atom->map_tag_max;
tagint map_tag_max = atom->map_tag_max;
for (i = 0; i < n; i++) {
ucflag[i] = 0;
// check if new atom matches one I own
// setting m = -1 forces new atom not to match
// NOTE: atom ID in fields is stored as double, not as ubuf
// so can only cast it to tagint, thus cannot be full 64-bit ID
itag = static_cast<int> (fields[i][0]);
if (itag <= map_tag_max) m = atom->map(static_cast<int> (fields[i][0]));
tag = static_cast<tagint> (fields[i][0]);
if (tag <= map_tag_max) m = atom->map(tag);
else m = -1;
if (m < 0 || m >= nlocal) continue;