diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index ed08a88c15..59d8b5e8eb 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -628,7 +628,7 @@ int AtomVecDipole::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; q[nlocal] = buf[m++]; mu[nlocal][0] = buf[m++]; @@ -719,7 +719,7 @@ int AtomVecDipole::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -756,8 +756,8 @@ void AtomVecDipole::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -776,7 +776,7 @@ void AtomVecDipole::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecDipole::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecDipole::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/DIPOLE/atom_vec_dipole.h b/src/DIPOLE/atom_vec_dipole.h index 2ec8e754f6..aaa8801aca 100644 --- a/src/DIPOLE/atom_vec_dipole.h +++ b/src/DIPOLE/atom_vec_dipole.h @@ -50,7 +50,7 @@ class AtomVecDipole : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void pack_data(double **); int pack_data_hybrid(int, double *); @@ -60,7 +60,7 @@ class AtomVecDipole : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double *q,**mu,**omega,**torque; }; diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 1ee6b04cb5..562edd42c2 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -468,8 +468,8 @@ void FixPour::pre_exchange() coords[0][1] = coord[1]; coords[0][2] = coord[2]; coords[0][3] = radtmp; - imageflags[0] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + imageflags[0] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; } else { if (dimension == 3) { r[0] = random->uniform() - 0.5; @@ -496,8 +496,8 @@ void FixPour::pre_exchange() if (onemol->radiusflag) coords[i][3] = onemol->radius[i]; else coords[i][3] = 0.5; - imageflags[i] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + imageflags[i] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; domain->remap(coords[i],imageflags[i]); } } diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index c6cfff6d2f..eb8fba2daf 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -350,8 +350,8 @@ void FixGCMC::init() zz = exp(beta*chemical_potential)/(pow(lambda,3.0)); if (pressure_flag) zz = pressure*fugacity_coeff*beta/force->nktv2p; - imagetmp = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + imagetmp = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; } /* ---------------------------------------------------------------------- @@ -659,7 +659,7 @@ void FixGCMC::attempt_molecule_rotation() get_rotation_matrix(max_rotation_angle,&rot[0]); double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double energy_after = 0.0; int n = 0; for (int i = 0; i < nlocal; i++) { @@ -814,7 +814,7 @@ void FixGCMC::attempt_molecule_insertion() int k = 0; double **x = atom->x; double **v = atom->v; - tagint *image = atom->image; + imageint *image = atom->image; int *molecule = atom->molecule; int *tag = atom->tag; for (int i = 0; i < natoms_per_molecule; i++) { diff --git a/src/MC/fix_gcmc.h b/src/MC/fix_gcmc.h index 551e36e8d2..7fdd1f70c6 100644 --- a/src/MC/fix_gcmc.h +++ b/src/MC/fix_gcmc.h @@ -94,7 +94,7 @@ class FixGCMC : public Fix { double **cutsq; double **atom_coord; double *model_atom_buf; - tagint imagetmp; + imageint imagetmp; class Pair *pair; diff --git a/src/MISC/compute_msd_nongauss.cpp b/src/MISC/compute_msd_nongauss.cpp index eb038cc356..c5b22a4595 100644 --- a/src/MISC/compute_msd_nongauss.cpp +++ b/src/MISC/compute_msd_nongauss.cpp @@ -55,7 +55,7 @@ void ComputeMSDNonGauss::compute_vector() double **x = atom->x; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double *h = domain->h; diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index 9a8f35a503..fa8dbf6c69 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -361,8 +361,8 @@ void FixDeposit::pre_exchange() coords[i][1] += coord[1]; coords[i][2] += coord[2]; - imageflags[i] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + imageflags[i] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; domain->remap(coords[i],imageflags[i]); } } diff --git a/src/MISC/fix_efield.cpp b/src/MISC/fix_efield.cpp index 916a0d5916..cf7a9ecb9d 100644 --- a/src/MISC/fix_efield.cpp +++ b/src/MISC/fix_efield.cpp @@ -248,7 +248,7 @@ void FixEfield::post_force(int vflag) double **f = atom->f; double *q = atom->q; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; // reallocate efield array if necessary diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index 1ade8a1d54..224c25605a 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -597,7 +597,7 @@ int AtomVecAngle::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; molecule[nlocal] = (int) ubuf(buf[m++]).i; @@ -669,7 +669,7 @@ int AtomVecAngle::pack_restart(int i, double *buf) buf[m++] = tag[i]; buf[m++] = type[i]; buf[m++] = mask[i]; - *((tagint *) &buf[m++]) = image[i]; + *((imageint *) &buf[m++]) = image[i]; buf[m++] = v[i][0]; buf[m++] = v[i][1]; buf[m++] = v[i][2]; @@ -720,7 +720,7 @@ int AtomVecAngle::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -769,8 +769,8 @@ void AtomVecAngle::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -788,7 +788,7 @@ void AtomVecAngle::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecAngle::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecAngle::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/MOLECULE/atom_vec_angle.h b/src/MOLECULE/atom_vec_angle.h index a1d33933f6..b269fda174 100644 --- a/src/MOLECULE/atom_vec_angle.h +++ b/src/MOLECULE/atom_vec_angle.h @@ -49,7 +49,7 @@ class AtomVecAngle : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void pack_data(double **); int pack_data_hybrid(int, double *); @@ -59,7 +59,7 @@ class AtomVecAngle : public AtomVec { protected: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; int *molecule; int **nspecial,**special; diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index 6d9f916d71..c06d3eed29 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -568,7 +568,7 @@ int AtomVecBond::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; molecule[nlocal] = (int) ubuf(buf[m++]).i; @@ -675,7 +675,7 @@ int AtomVecBond::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -716,8 +716,8 @@ void AtomVecBond::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -734,7 +734,7 @@ void AtomVecBond::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecBond::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecBond::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/MOLECULE/atom_vec_bond.h b/src/MOLECULE/atom_vec_bond.h index f6d7c0c67a..4e98d21e81 100644 --- a/src/MOLECULE/atom_vec_bond.h +++ b/src/MOLECULE/atom_vec_bond.h @@ -48,7 +48,7 @@ class AtomVecBond : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void pack_data(double **); int pack_data_hybrid(int, double *); @@ -58,7 +58,7 @@ class AtomVecBond : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; int *molecule; int **nspecial,**special; diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index 7045b9d5c4..6d44289d4e 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -685,7 +685,7 @@ int AtomVecFull::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; q[nlocal] = buf[m++]; molecule[nlocal] = (int) ubuf(buf[m++]).i; @@ -847,7 +847,7 @@ int AtomVecFull::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -915,8 +915,8 @@ void AtomVecFull::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -937,7 +937,7 @@ void AtomVecFull::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecFull::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecFull::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/MOLECULE/atom_vec_full.h b/src/MOLECULE/atom_vec_full.h index 89af4f4527..c8987e2894 100644 --- a/src/MOLECULE/atom_vec_full.h +++ b/src/MOLECULE/atom_vec_full.h @@ -49,7 +49,7 @@ class AtomVecFull : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void pack_data(double **); int pack_data_hybrid(int, double *); @@ -59,7 +59,7 @@ class AtomVecFull : public AtomVec { protected: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double *q; int *molecule; diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index b72553baf2..9feb31e1c2 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -672,7 +672,7 @@ int AtomVecMolecular::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; molecule[nlocal] = (int) ubuf(buf[m++]).i; @@ -832,7 +832,7 @@ int AtomVecMolecular::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -899,8 +899,8 @@ void AtomVecMolecular::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -920,7 +920,7 @@ void AtomVecMolecular::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecMolecular::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecMolecular::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/MOLECULE/atom_vec_molecular.h b/src/MOLECULE/atom_vec_molecular.h index 751f70d66f..dcd87721d5 100644 --- a/src/MOLECULE/atom_vec_molecular.h +++ b/src/MOLECULE/atom_vec_molecular.h @@ -48,7 +48,7 @@ class AtomVecMolecular : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void pack_data(double **); int pack_data_hybrid(int, double *); @@ -58,7 +58,7 @@ class AtomVecMolecular : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; int *molecule; int **nspecial,**special; diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index cbe14d3624..28e7ff1db9 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -634,7 +634,7 @@ int AtomVecPeri::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; vfrac[nlocal] = buf[m++]; rmass[nlocal] = buf[m++]; @@ -728,7 +728,7 @@ int AtomVecPeri::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -766,8 +766,8 @@ void AtomVecPeri::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -787,7 +787,7 @@ void AtomVecPeri::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecPeri::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecPeri::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/PERI/atom_vec_peri.h b/src/PERI/atom_vec_peri.h index 172595f884..253c054e73 100755 --- a/src/PERI/atom_vec_peri.h +++ b/src/PERI/atom_vec_peri.h @@ -50,7 +50,7 @@ class AtomVecPeri : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void pack_data(double **); int pack_data_hybrid(int, double *); @@ -60,7 +60,7 @@ class AtomVecPeri : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double *vfrac,*density,*rmass,*s0,**x0; }; diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 599680f3d7..95639f1a98 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -374,7 +374,7 @@ void FixPOEMS::init() // only count joint atoms in 1st body int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double **x = atom->x; double **v = atom->v; @@ -610,7 +610,7 @@ void FixPOEMS::setup(int vflag) // only count joint atoms in 1st body int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double **x = atom->x; double **v = atom->v; @@ -724,7 +724,7 @@ void FixPOEMS::post_force(int vflag) int xbox,ybox,zbox; double dx,dy,dz; - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double **f = atom->f; int nlocal = atom->nlocal; @@ -1355,7 +1355,7 @@ void FixPOEMS::set_xv() double x0,x1,x2,v0,v1,v2,fc0,fc1,fc2,massone; double vr[6]; - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double **v = atom->v; double **f = atom->f; @@ -1459,7 +1459,7 @@ void FixPOEMS::set_v() double **x = atom->x; double **v = atom->v; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double xprd = domain->xprd; diff --git a/src/REPLICA/compute_event_displace.cpp b/src/REPLICA/compute_event_displace.cpp index 7c74a45a51..7f1db90481 100644 --- a/src/REPLICA/compute_event_displace.cpp +++ b/src/REPLICA/compute_event_displace.cpp @@ -97,7 +97,7 @@ double ComputeEventDisplace::compute_scalar() double **x = atom->x; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double *h = domain->h; diff --git a/src/REPLICA/fix_event.cpp b/src/REPLICA/fix_event.cpp index 4f80066885..458d5c5818 100644 --- a/src/REPLICA/fix_event.cpp +++ b/src/REPLICA/fix_event.cpp @@ -81,7 +81,7 @@ int FixEvent::setmask() void FixEvent::store_event() { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) @@ -97,7 +97,7 @@ void FixEvent::store_event() void FixEvent::restore_event() { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { @@ -108,8 +108,8 @@ void FixEvent::restore_event() // since xevent is unwrapped coordinate, need to // adjust image flags when remapping - image[i] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMASK; + image[i] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMASK; domain->remap(x[i],image[i]); } @@ -125,7 +125,7 @@ void FixEvent::store_state() { double **x = atom->x; double **v = atom->v; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { @@ -148,7 +148,7 @@ void FixEvent::restore_state() { double **x = atom->x; double **v = atom->v; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index 5d93e2f3aa..3e3171f741 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -814,7 +814,7 @@ void TAD::store_state() { double **x = atom->x; double **v = atom->v; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double **astore = fix_revert->astore; @@ -826,7 +826,7 @@ void TAD::store_state() astore[i][3] = v[i][0]; astore[i][4] = v[i][1]; astore[i][5] = v[i][2]; - *((tagint *) &astore[i][6]) = image[i]; + *((imageint *) &astore[i][6]) = image[i]; } } @@ -839,7 +839,7 @@ void TAD::revert_state() { double **x = atom->x; double **v = atom->v; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double **astore = fix_revert->astore; @@ -851,7 +851,7 @@ void TAD::revert_state() v[i][0] = -astore[i][3]; v[i][1] = -astore[i][4]; v[i][2] = -astore[i][5]; - image[i] = *((tagint *) &astore[i][6]); + image[i] = *((imageint *) &astore[i][6]); } } diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index f4c89ea721..eee93e95c6 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -696,7 +696,7 @@ void FixRigid::setup(int vflag) // torque = torque on each rigid body - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double dx,dy,dz; @@ -877,7 +877,7 @@ void FixRigid::final_integrate() // sum over atoms to get force and torque on rigid body - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double **f = atom->f; int nlocal = atom->nlocal; @@ -1044,7 +1044,7 @@ void FixRigid::final_integrate_respa(int ilevel, int iloop) void FixRigid::pre_neighbor() { - tagint original,oldimage,newimage; + imageint original,oldimage,newimage; for (int ibody = 0; ibody < nbody; ibody++) { original = imagebody[ibody]; @@ -1069,11 +1069,11 @@ void FixRigid::pre_neighbor() // subtracting remapflag = new-old keeps ix,iy,iz near 0 // so body is always in central simulation box - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; int ibody; - tagint idim,otherdims; + imageint idim,otherdims; for (int i = 0; i < nlocal; i++) { if (body[i] == -1) continue; @@ -1219,7 +1219,7 @@ void FixRigid::set_xv() double xy,xz,yz; double ione[3],exone[3],eyone[3],ezone[3],vr[6],p[3][3]; - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double **v = atom->v; double **f = atom->f; @@ -1401,7 +1401,7 @@ void FixRigid::set_v() double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double xprd = domain->xprd; @@ -1615,7 +1615,7 @@ void FixRigid::setup_bodies_static() // error if image flag is not 0 in a non-periodic dim double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *periodicity = domain->periodicity; double xprd = domain->xprd; @@ -1684,8 +1684,8 @@ void FixRigid::setup_bodies_static() // then remap the xcm of each body back into simulation box if needed for (ibody = 0; ibody < nbody; ibody++) - imagebody[ibody] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + imagebody[ibody] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; pre_neighbor(); @@ -2040,7 +2040,7 @@ void FixRigid::setup_bodies_dynamic() double **v = atom->v; double *rmass = atom->rmass; double *mass = atom->mass; - tagint *image = atom->image; + imageint *image = atom->image; int *type = atom->type; int nlocal = atom->nlocal; diff --git a/src/RIGID/fix_rigid.h b/src/RIGID/fix_rigid.h index 913faf5434..7d64b1556c 100644 --- a/src/RIGID/fix_rigid.h +++ b/src/RIGID/fix_rigid.h @@ -90,7 +90,7 @@ class FixRigid : public Fix { double **omega; // angular velocity of each in space coords double **torque; // torque on each rigid body in space coords double **quat; // quaternion of each rigid body - tagint *imagebody; // image flags of xcm of each rigid body + imageint *imagebody; // image flags of xcm of each rigid body double **fflag; // flag for on/off of center-of-mass force double **tflag; // flag for on/off of center-of-mass torque double **langextra; // Langevin thermostat forces and torques diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 5bf931db62..3c5170709e 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -612,7 +612,7 @@ void FixRigidNH::final_integrate() // sum over atoms to get force and torque on rigid body - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double **f = atom->f; int nlocal = atom->nlocal; diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 0fe1b607a8..33fff6a7be 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -391,7 +391,7 @@ void FixRigidSmall::setup(int vflag) double **x = atom->x; double **f = atom->f; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double *xcm,*fcm,*tcm; @@ -599,7 +599,7 @@ void FixRigidSmall::final_integrate() // sum over atoms to get force and torque on rigid body - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double **f = atom->f; int nlocal = atom->nlocal; @@ -744,7 +744,7 @@ void FixRigidSmall::pre_neighbor() { // remap xcm and image flags of each body as needed - tagint original,oldimage,newimage; + imageint original,oldimage,newimage; for (int ibody = 0; ibody < nlocal_body; ibody++) { Body *b = &body[ibody]; @@ -780,11 +780,11 @@ void FixRigidSmall::pre_neighbor() // adjust image flags of any atom in a rigid body whose xcm was remapped - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; int ibody; - tagint idim,otherdims; + imageint idim,otherdims; for (int i = 0; i < nlocal; i++) { if (atom2body[i] < 0) continue; @@ -952,7 +952,7 @@ void FixRigidSmall::set_xv() double xz = domain->xz; double yz = domain->yz; - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double **v = atom->v; double **f = atom->f; @@ -1127,7 +1127,7 @@ void FixRigidSmall::set_v() double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; // set v of each atom @@ -1246,7 +1246,7 @@ void FixRigidSmall::create_bodies() // error check on image flags of atoms in rigid bodies - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -1498,7 +1498,7 @@ void FixRigidSmall::ring_nearest(int n, char *cbuf) void FixRigidSmall::ring_farthest(int n, char *cbuf) { double **x = frsptr->atom->x; - tagint *image = frsptr->atom->image; + imageint *image = frsptr->atom->image; int nlocal = frsptr->atom->nlocal; double *buf = (double *) cbuf; @@ -1630,7 +1630,7 @@ void FixRigidSmall::setup_bodies_static() // compute mass & center-of-mass of each rigid body double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *xcm; @@ -1684,8 +1684,8 @@ void FixRigidSmall::setup_bodies_static() // then remap the xcm of each body back into simulation box if needed for (ibody = 0; ibody < nlocal_body; ibody++) - body[ibody].image = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + body[ibody].image = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; pre_neighbor(); @@ -2045,7 +2045,7 @@ void FixRigidSmall::setup_bodies_dynamic() double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double *xcm,*vcm,*acm; @@ -2496,8 +2496,8 @@ void FixRigidSmall::set_molecule(int nlocalprev, int tagprev, b->angmom[0] = b->angmom[1] = b->angmom[2] = 0.0; b->omega[0] = b->omega[1] = b->omega[2] = 0.0; - b->image = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + b->image = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; b->ilocal = i; nlocal_body++; } diff --git a/src/RIGID/fix_rigid_small.h b/src/RIGID/fix_rigid_small.h index dcf3ff6af7..5cc63c3dd6 100644 --- a/src/RIGID/fix_rigid_small.h +++ b/src/RIGID/fix_rigid_small.h @@ -97,7 +97,7 @@ class FixRigidSmall : public Fix { double ez_space[3]; double angmom[3]; // space-frame angular momentum of body double omega[3]; // space-frame omega of body - tagint image; // image flags of xcm + imageint image; // image flags of xcm int remapflag[4]; // PBC remap flags int ilocal; // index of owning atom }; diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index f5bfb44c9d..35c6e582d9 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -740,7 +740,7 @@ int AtomVecWavepacket::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; q[nlocal] = buf[m++]; spin[nlocal] = (int) ubuf(buf[m++]).i; @@ -837,7 +837,7 @@ int AtomVecWavepacket::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -878,8 +878,8 @@ void AtomVecWavepacket::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -902,7 +902,7 @@ void AtomVecWavepacket::create_atom(int itype, double *coord) AWPMD: 0-tag 1-type 2-q 3-spin 4-eradius 5-etag 6-cs_re 7-cs_im ------------------------------------------------------------------------- */ -void AtomVecWavepacket::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecWavepacket::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; diff --git a/src/USER-AWPMD/atom_vec_wavepacket.h b/src/USER-AWPMD/atom_vec_wavepacket.h index db60784804..c4fe70f133 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.h +++ b/src/USER-AWPMD/atom_vec_wavepacket.h @@ -58,7 +58,7 @@ public: int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); @@ -74,7 +74,7 @@ public: private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; ///\en spin: -1 or 1 for electron, 0 for ion (compatible with eff) diff --git a/src/USER-COLVARS/fix_colvars.cpp b/src/USER-COLVARS/fix_colvars.cpp index 049d3ad333..9f7304f447 100644 --- a/src/USER-COLVARS/fix_colvars.cpp +++ b/src/USER-COLVARS/fix_colvars.cpp @@ -519,7 +519,7 @@ void FixColvars::setup(int vflag) memory->create(comm_buf,nmax,"colvars:comm_buf"); const double * const * const x = atom->x; - const tagint * const image = atom->image; + const imageint * const image = atom->image; const double xprd = domain->xprd; const double yprd = domain->yprd; @@ -668,7 +668,7 @@ void FixColvars::post_force(int vflag) const int * const tag = atom->tag; const double * const * const x = atom->x; double * const * const f = atom->f; - const tagint * const image = atom->image; + const imageint * const image = atom->image; const double xprd = domain->xprd; const double yprd = domain->yprd; diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index bf3d79bee9..1658d48921 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -642,7 +642,7 @@ int AtomVecElectron::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; q[nlocal] = buf[m++]; spin[nlocal] = (int) ubuf(buf[m++]).i; eradius[nlocal] = buf[m++]; @@ -730,7 +730,7 @@ int AtomVecElectron::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -766,8 +766,8 @@ void AtomVecElectron::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -785,7 +785,7 @@ void AtomVecElectron::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecElectron::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecElectron::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; diff --git a/src/USER-EFF/atom_vec_electron.h b/src/USER-EFF/atom_vec_electron.h index 0dd7973414..64ba79865e 100644 --- a/src/USER-EFF/atom_vec_electron.h +++ b/src/USER-EFF/atom_vec_electron.h @@ -53,7 +53,7 @@ class AtomVecElectron : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); @@ -69,7 +69,7 @@ class AtomVecElectron : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; int *spin; double *q,*eradius,*ervel,*erforce; diff --git a/src/USER-LB/fix_lb_fluid.cpp b/src/USER-LB/fix_lb_fluid.cpp index 604f9480c6..e587c502e4 100755 --- a/src/USER-LB/fix_lb_fluid.cpp +++ b/src/USER-LB/fix_lb_fluid.cpp @@ -800,7 +800,7 @@ void FixLbFluid::calc_fluidforce(void) double unwrap[3]; double dx,dy,dz; double massone; - tagint *image = atom->image; + imageint *image = atom->image; double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; diff --git a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp index 019e31dde4..a0e3016698 100755 --- a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp +++ b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp @@ -345,8 +345,8 @@ FixLbRigidPCSphere::FixLbRigidPCSphere(LAMMPS *lmp, int narg, char **arg) : // set here, so image value will persist from run to run for (ibody = 0; ibody < nbody; ibody++) - imagebody[ibody] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + imagebody[ibody] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; // print statistics @@ -466,7 +466,7 @@ void FixLbRigidPCSphere::init() int *type = atom->type; int nlocal = atom->nlocal; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *rmass = atom->rmass; double *mass = atom->mass; int *periodicity = domain->periodicity; @@ -656,7 +656,7 @@ void FixLbRigidPCSphere::setup(int vflag) int *type = atom->type; int nlocal = atom->nlocal; - tagint *image = atom->image; + imageint *image = atom->image; int *periodicity = domain->periodicity; double unwrap[3]; @@ -766,7 +766,7 @@ void FixLbRigidPCSphere::initial_integrate(int vflag) int *type = atom->type; int nlocal = atom->nlocal; - tagint *image = atom->image; + imageint *image = atom->image; double unwrap[3]; double dx,dy,dz; @@ -951,7 +951,7 @@ void FixLbRigidPCSphere::final_integrate() // sum over atoms to get force and torque on rigid body double massone; - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double **f = atom->f; double **v = atom->v; @@ -1119,7 +1119,7 @@ void FixLbRigidPCSphere::set_v() double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double xprd = domain->xprd; @@ -1211,7 +1211,7 @@ void FixLbRigidPCSphere::set_xv() double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double xprd = domain->xprd; diff --git a/src/USER-MISC/compute_temp_rotate.cpp b/src/USER-MISC/compute_temp_rotate.cpp index 4c0d56d11f..fa0567ac84 100644 --- a/src/USER-MISC/compute_temp_rotate.cpp +++ b/src/USER-MISC/compute_temp_rotate.cpp @@ -111,7 +111,7 @@ double ComputeTempRotate::compute_scalar() double *mass = atom->mass; double *rmass = atom->rmass; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -172,7 +172,7 @@ void ComputeTempRotate::compute_vector() double *mass = atom->mass; double *rmass = atom->rmass; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/USER-MISC/fix_addtorque.cpp b/src/USER-MISC/fix_addtorque.cpp index 8283870c1c..db90b7b21c 100644 --- a/src/USER-MISC/fix_addtorque.cpp +++ b/src/USER-MISC/fix_addtorque.cpp @@ -165,7 +165,7 @@ void FixAddTorque::post_force(int vflag) double **f = atom->f; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; diff --git a/src/USER-MISC/fix_imd.cpp b/src/USER-MISC/fix_imd.cpp index 677ea09321..0fcacc6ab5 100644 --- a/src/USER-MISC/fix_imd.cpp +++ b/src/USER-MISC/fix_imd.cpp @@ -825,7 +825,7 @@ void FixIMD::post_force(int vflag) int *tag = atom->tag; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; int *mask = atom->mask; struct commdata *buf; diff --git a/src/USER-MISC/fix_ti_spring.cpp b/src/USER-MISC/fix_ti_spring.cpp index a2ddb9a0f0..139795557c 100755 --- a/src/USER-MISC/fix_ti_spring.cpp +++ b/src/USER-MISC/fix_ti_spring.cpp @@ -64,7 +64,7 @@ FixTISpring::FixTISpring(LAMMPS *lmp, int narg, char **arg) : double **x = atom->x; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { @@ -157,7 +157,7 @@ void FixTISpring::post_force(int vflag) double **x = atom->x; double **f = atom->f; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double dx, dy, dz; diff --git a/src/USER-MOLFILE/dump_molfile.cpp b/src/USER-MOLFILE/dump_molfile.cpp index 90d15f6779..2756abef56 100644 --- a/src/USER-MOLFILE/dump_molfile.cpp +++ b/src/USER-MOLFILE/dump_molfile.cpp @@ -308,7 +308,7 @@ void DumpMolfile::pack(int *ids) int *tag = atom->tag; int *type = atom->type; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/USER-OMP/domain_omp.cpp b/src/USER-OMP/domain_omp.cpp index f51ee4fe94..d5468863cc 100644 --- a/src/USER-OMP/domain_omp.cpp +++ b/src/USER-OMP/domain_omp.cpp @@ -47,7 +47,7 @@ void DomainOMP::pbc() const double * _noalias const hi = (triclinic == 0) ? boxhi : boxhi_lamda; const double * _noalias const period = (triclinic == 0) ? prd : prd_lamda; const int * _noalias const mask = atom->mask; - tagint * _noalias const image = atom->image; + imageint * _noalias const image = atom->image; const int nlocal = atom->nlocal; int i; @@ -55,7 +55,7 @@ void DomainOMP::pbc() #pragma omp parallel for private(i) default(none) schedule(static) #endif for (i = 0; i < nlocal; i++) { - tagint idim,otherdims; + imageint idim,otherdims; if (xperiodic) { if (x[i].x < lo[0]) { diff --git a/src/USER-OMP/fix_rigid_nh_omp.cpp b/src/USER-OMP/fix_rigid_nh_omp.cpp index ba41947c09..022a09d6a1 100644 --- a/src/USER-OMP/fix_rigid_nh_omp.cpp +++ b/src/USER-OMP/fix_rigid_nh_omp.cpp @@ -280,7 +280,7 @@ void FixRigidNHOMP::final_integrate() double * const * _noalias const x = atom->x; const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; const double * const * const torque_one = atom->torque; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; const int nlocal = atom->nlocal; // sum over atoms to get force and torque on rigid body @@ -611,7 +611,7 @@ void FixRigidNHOMP::set_xv_thr() const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; double v0=0.0,v1=0.0,v2=0.0,v3=0.0,v4=0.0,v5=0.0; @@ -813,7 +813,7 @@ void FixRigidNHOMP::set_v_thr() const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; const double xprd = domain->xprd; const double yprd = domain->yprd; diff --git a/src/USER-OMP/fix_rigid_omp.cpp b/src/USER-OMP/fix_rigid_omp.cpp index e34f2c83b9..7ffa741185 100644 --- a/src/USER-OMP/fix_rigid_omp.cpp +++ b/src/USER-OMP/fix_rigid_omp.cpp @@ -118,7 +118,7 @@ void FixRigidOMP::final_integrate() double * const * _noalias const x = atom->x; const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; const double * const * const torque_one = atom->torque; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; const int nlocal = atom->nlocal; // sum over atoms to get force and torque on rigid body @@ -315,7 +315,7 @@ void FixRigidOMP::set_xv_thr() const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; double v0=0.0,v1=0.0,v2=0.0,v3=0.0,v4=0.0,v5=0.0; @@ -517,7 +517,7 @@ void FixRigidOMP::set_v_thr() const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; const double xprd = domain->xprd; const double yprd = domain->yprd; diff --git a/src/USER-OMP/fix_rigid_small_omp.cpp b/src/USER-OMP/fix_rigid_small_omp.cpp index b5d20655e8..257588d351 100644 --- a/src/USER-OMP/fix_rigid_small_omp.cpp +++ b/src/USER-OMP/fix_rigid_small_omp.cpp @@ -122,7 +122,7 @@ void FixRigidSmallOMP::final_integrate() double * const * _noalias const x = atom->x; const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; const double * const * const torque_one = atom->torque; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; const int nlocal = atom->nlocal; const int nthreads=comm->nthreads; int i, ibody; @@ -268,7 +268,7 @@ void FixRigidSmallOMP::set_xv_thr() const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; double v0=0.0,v1=0.0,v2=0.0,v3=0.0,v4=0.0,v5=0.0; @@ -465,7 +465,7 @@ void FixRigidSmallOMP::set_v_thr() const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; - const tagint * _noalias const image = atom->image; + const imageint * _noalias const image = atom->image; const double xprd = domain->xprd; const double yprd = domain->yprd; diff --git a/src/USER-SPH/atom_vec_meso.cpp b/src/USER-SPH/atom_vec_meso.cpp index f20b031604..4df4b1503c 100644 --- a/src/USER-SPH/atom_vec_meso.cpp +++ b/src/USER-SPH/atom_vec_meso.cpp @@ -680,7 +680,7 @@ int AtomVecMeso::unpack_exchange(double *buf) { tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; rho[nlocal] = buf[m++]; e[nlocal] = buf[m++]; cv[nlocal] = buf[m++]; @@ -768,7 +768,7 @@ int AtomVecMeso::unpack_restart(double *buf) { tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -806,8 +806,8 @@ void AtomVecMeso::create_atom(int itype, double *coord) { x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -828,7 +828,7 @@ void AtomVecMeso::create_atom(int itype, double *coord) { initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecMeso::data_atom(double *coord, tagint imagetmp, char **values) { +void AtomVecMeso::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/USER-SPH/atom_vec_meso.h b/src/USER-SPH/atom_vec_meso.h index a51a0240a3..945e4a42cc 100644 --- a/src/USER-SPH/atom_vec_meso.h +++ b/src/USER-SPH/atom_vec_meso.h @@ -53,7 +53,7 @@ class AtomVecMeso : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void pack_data(double **); int pack_data_hybrid(int, double *); @@ -63,7 +63,7 @@ class AtomVecMeso : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double *rho, *drho, *e, *de, *cv; double **vest; // estimated velocity during force computation diff --git a/src/XTC/dump_xtc.cpp b/src/XTC/dump_xtc.cpp index 25d0feebf9..80f1013afe 100644 --- a/src/XTC/dump_xtc.cpp +++ b/src/XTC/dump_xtc.cpp @@ -196,7 +196,7 @@ void DumpXTC::pack(int *ids) int *tag = atom->tag; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/atom.cpp b/src/atom.cpp index d4127963ac..75c2bf4a83 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -569,7 +569,7 @@ int Atom::count_words(const char *line) void Atom::data_atoms(int n, char *buf) { int m,xptr,iptr; - tagint imagedata; + imageint imagedata; double xdata[3],lamda[3]; double *coord; char *next; @@ -649,11 +649,11 @@ void Atom::data_atoms(int n, char *buf) } if (imageflag) - imagedata = ((tagint) (atoi(values[iptr]) + IMGMAX) & IMGMASK) | - (((tagint) (atoi(values[iptr+1]) + IMGMAX) & IMGMASK) << IMGBITS) | - (((tagint) (atoi(values[iptr+2]) + IMGMAX) & IMGMASK) << IMG2BITS); - else imagedata = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + imagedata = ((imageint) (atoi(values[iptr]) + IMGMAX) & IMGMASK) | + (((imageint) (atoi(values[iptr+1]) + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (atoi(values[iptr+2]) + IMGMAX) & IMGMASK) << IMG2BITS); + else imagedata = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; xdata[0] = atof(values[xptr]); xdata[1] = atof(values[xptr+1]); diff --git a/src/atom.h b/src/atom.h index 642cd53155..3dfc010d5b 100644 --- a/src/atom.h +++ b/src/atom.h @@ -46,7 +46,7 @@ class Atom : protected Pointers { // customize by adding new array int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; int *molecule,*molindex,*molatom; diff --git a/src/atom_vec.h b/src/atom_vec.h index 2731538a00..0d0ba775f5 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -83,7 +83,7 @@ class AtomVec : protected Pointers { virtual void create_atom(int, double *) = 0; - virtual void data_atom(double *, tagint, char **) = 0; + virtual void data_atom(double *, imageint, char **) = 0; virtual void data_atom_bonus(int, char **) {} virtual int data_atom_hybrid(int, char **) {return 0;} virtual void data_vel(int, char **); diff --git a/src/atom_vec_atomic.cpp b/src/atom_vec_atomic.cpp index 33f39ab8c9..f27178b8fd 100644 --- a/src/atom_vec_atomic.cpp +++ b/src/atom_vec_atomic.cpp @@ -484,7 +484,7 @@ int AtomVecAtomic::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) @@ -563,7 +563,7 @@ int AtomVecAtomic::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -594,8 +594,8 @@ void AtomVecAtomic::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -608,7 +608,7 @@ void AtomVecAtomic::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecAtomic::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecAtomic::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/atom_vec_atomic.h b/src/atom_vec_atomic.h index b29710b73f..b19ecdd85c 100644 --- a/src/atom_vec_atomic.h +++ b/src/atom_vec_atomic.h @@ -47,14 +47,14 @@ class AtomVecAtomic : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); void pack_data(double **); void write_data(FILE *, int, double **); bigint memory_usage(); protected: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; }; diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index bf83dadc94..b91ecdde9c 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -1030,7 +1030,7 @@ int AtomVecBody::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; rmass[nlocal] = buf[m++]; angmom[nlocal][0] = buf[m++]; @@ -1179,7 +1179,7 @@ int AtomVecBody::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -1280,8 +1280,8 @@ void AtomVecBody::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -1300,7 +1300,7 @@ void AtomVecBody::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecBody::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecBody::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/atom_vec_body.h b/src/atom_vec_body.h index 7323ca423f..aad592fe4d 100644 --- a/src/atom_vec_body.h +++ b/src/atom_vec_body.h @@ -70,7 +70,7 @@ class AtomVecBody : public AtomVec { void write_restart_settings(FILE *); void read_restart_settings(FILE *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); @@ -91,7 +91,7 @@ class AtomVecBody : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double *rmass; double **angmom,**torque; diff --git a/src/atom_vec_charge.cpp b/src/atom_vec_charge.cpp index 92dc8d276c..38b4385c9b 100644 --- a/src/atom_vec_charge.cpp +++ b/src/atom_vec_charge.cpp @@ -527,7 +527,7 @@ int AtomVecCharge::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; q[nlocal] = buf[m++]; @@ -610,7 +610,7 @@ int AtomVecCharge::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -643,8 +643,8 @@ void AtomVecCharge::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -659,7 +659,7 @@ void AtomVecCharge::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecCharge::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecCharge::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/atom_vec_charge.h b/src/atom_vec_charge.h index de746f7aea..ac36ab9439 100644 --- a/src/atom_vec_charge.h +++ b/src/atom_vec_charge.h @@ -49,7 +49,7 @@ class AtomVecCharge : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void pack_data(double **); int pack_data_hybrid(int, double *); @@ -59,7 +59,7 @@ class AtomVecCharge : public AtomVec { protected: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double *q; }; diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index dae8f392fc..2eda8b0e6a 100755 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -942,7 +942,7 @@ int AtomVecEllipsoid::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; rmass[nlocal] = buf[m++]; angmom[nlocal][0] = buf[m++]; @@ -1064,7 +1064,7 @@ int AtomVecEllipsoid::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -1117,8 +1117,8 @@ void AtomVecEllipsoid::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -1137,7 +1137,8 @@ void AtomVecEllipsoid::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecEllipsoid::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecEllipsoid::data_atom(double *coord, imageint imagetmp, + char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/atom_vec_ellipsoid.h b/src/atom_vec_ellipsoid.h index 03758d22a3..b23597e35a 100755 --- a/src/atom_vec_ellipsoid.h +++ b/src/atom_vec_ellipsoid.h @@ -60,7 +60,7 @@ class AtomVecEllipsoid : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); @@ -85,7 +85,7 @@ class AtomVecEllipsoid : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double *rmass; double **angmom,**torque; diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index 0ced6310cd..710d15e2bd 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -859,7 +859,7 @@ void AtomVecHybrid::create_atom(int itype, double *coord) grow() occurs here so arrays for all sub-styles are grown ------------------------------------------------------------------------- */ -void AtomVecHybrid::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecHybrid::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/atom_vec_hybrid.h b/src/atom_vec_hybrid.h index ac494915a0..016a131680 100644 --- a/src/atom_vec_hybrid.h +++ b/src/atom_vec_hybrid.h @@ -57,7 +57,7 @@ class AtomVecHybrid : public AtomVec { void write_restart_settings(FILE *); void read_restart_settings(FILE *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **) {return 0;} void data_vel(int, char **); void pack_data(double **); @@ -68,7 +68,7 @@ class AtomVecHybrid : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double **omega,**angmom; diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index 68a5c2c076..f8785eed9f 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -814,7 +814,7 @@ int AtomVecLine::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; molecule[nlocal] = (int) ubuf(buf[m++]).i; rmass[nlocal] = buf[m++]; @@ -926,7 +926,7 @@ int AtomVecLine::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -973,8 +973,8 @@ void AtomVecLine::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -994,7 +994,7 @@ void AtomVecLine::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecLine::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecLine::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/atom_vec_line.h b/src/atom_vec_line.h index f8a81cb50b..b266c91f36 100644 --- a/src/atom_vec_line.h +++ b/src/atom_vec_line.h @@ -60,7 +60,7 @@ class AtomVecLine : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); @@ -85,7 +85,7 @@ class AtomVecLine : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; int *molecule; double *rmass; diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index ea09b8e4b2..c1d7e3a1d8 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -813,7 +813,7 @@ int AtomVecSphere::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; radius[nlocal] = buf[m++]; rmass[nlocal] = buf[m++]; @@ -904,7 +904,7 @@ int AtomVecSphere::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -941,8 +941,8 @@ void AtomVecSphere::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -961,7 +961,7 @@ void AtomVecSphere::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecSphere::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecSphere::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/atom_vec_sphere.h b/src/atom_vec_sphere.h index 45f4f1e2e9..b1600625fa 100644 --- a/src/atom_vec_sphere.h +++ b/src/atom_vec_sphere.h @@ -54,7 +54,7 @@ class AtomVecSphere : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); @@ -70,7 +70,7 @@ class AtomVecSphere : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; double *radius,*density,*rmass; double **omega,**torque; diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index 999df0e69d..591ad31976 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -1108,7 +1108,7 @@ int AtomVecTri::unpack_exchange(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; molecule[nlocal] = (int) ubuf(buf[m++]).i; rmass[nlocal] = buf[m++]; @@ -1258,7 +1258,7 @@ int AtomVecTri::unpack_restart(double *buf) tag[nlocal] = (int) ubuf(buf[m++]).i; type[nlocal] = (int) ubuf(buf[m++]).i; mask[nlocal] = (int) ubuf(buf[m++]).i; - image[nlocal] = (tagint) ubuf(buf[m++]).i; + image[nlocal] = (imageint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -1324,8 +1324,8 @@ void AtomVecTri::create_atom(int itype, double *coord) x[nlocal][1] = coord[1]; x[nlocal][2] = coord[2]; mask[nlocal] = 1; - image[nlocal] = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image[nlocal] = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -1345,7 +1345,7 @@ void AtomVecTri::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecTri::data_atom(double *coord, tagint imagetmp, char **values) +void AtomVecTri::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); diff --git a/src/atom_vec_tri.h b/src/atom_vec_tri.h index 60ca041dc8..c0c5b35ae0 100644 --- a/src/atom_vec_tri.h +++ b/src/atom_vec_tri.h @@ -62,7 +62,7 @@ class AtomVecTri : public AtomVec { int pack_restart(int, double *); int unpack_restart(double *); void create_atom(int, double *); - void data_atom(double *, tagint, char **); + void data_atom(double *, imageint, char **); int data_atom_hybrid(int, char **); void data_vel(int, char **); int data_vel_hybrid(int, char **); @@ -87,7 +87,7 @@ class AtomVecTri : public AtomVec { private: int *tag,*type,*mask; - tagint *image; + imageint *image; double **x,**v,**f; int *molecule; double *rmass; diff --git a/src/change_box.cpp b/src/change_box.cpp index 261a153bed..e0fb7d20ab 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -356,7 +356,7 @@ void ChangeBox::command(int narg, char **arg) // use irregular() in case box moved a long distance relative to atoms double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); diff --git a/src/compute_com_molecule.cpp b/src/compute_com_molecule.cpp index 82a212ca3a..130072cc63 100644 --- a/src/compute_com_molecule.cpp +++ b/src/compute_com_molecule.cpp @@ -108,7 +108,7 @@ void ComputeCOMMolecule::compute_array() int *mask = atom->mask; int *molecule = atom->molecule; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index 998c3e82b3..cb1e1070ef 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -63,7 +63,7 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) : double **x = atom->x; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) @@ -123,7 +123,7 @@ void ComputeDisplaceAtom::compute_peratom() double **x = atom->x; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double *h = domain->h; diff --git a/src/compute_gyration.cpp b/src/compute_gyration.cpp index 007d56f0c3..15927f51c6 100644 --- a/src/compute_gyration.cpp +++ b/src/compute_gyration.cpp @@ -78,7 +78,7 @@ void ComputeGyration::compute_vector() double **x = atom->x; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; diff --git a/src/compute_gyration_molecule.cpp b/src/compute_gyration_molecule.cpp index ea0f382315..bf4a70a296 100644 --- a/src/compute_gyration_molecule.cpp +++ b/src/compute_gyration_molecule.cpp @@ -136,7 +136,7 @@ void ComputeGyrationMolecule::compute_vector() int *mask = atom->mask; int *molecule = atom->molecule; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -180,7 +180,7 @@ void ComputeGyrationMolecule::compute_array() int *mask = atom->mask; int *molecule = atom->molecule; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -231,7 +231,7 @@ void ComputeGyrationMolecule::molcom() int *mask = atom->mask; int *molecule = atom->molecule; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; diff --git a/src/compute_inertia_molecule.cpp b/src/compute_inertia_molecule.cpp index f336534d17..8cdb3cb64c 100644 --- a/src/compute_inertia_molecule.cpp +++ b/src/compute_inertia_molecule.cpp @@ -110,7 +110,7 @@ void ComputeInertiaMolecule::compute_array() int *mask = atom->mask; int *molecule = atom->molecule; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index 5da652d521..1a5ff334ad 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -76,7 +76,7 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : double **x = atom->x; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) @@ -152,7 +152,7 @@ void ComputeMSD::compute_vector() double **x = atom->x; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double *h = domain->h; diff --git a/src/compute_msd_molecule.cpp b/src/compute_msd_molecule.cpp index 270cfad6f8..736ac9cfc6 100644 --- a/src/compute_msd_molecule.cpp +++ b/src/compute_msd_molecule.cpp @@ -125,7 +125,7 @@ void ComputeMSDMolecule::compute_array() int *mask = atom->mask; int *molecule = atom->molecule; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index 6ffa1a0794..9b3dc754bc 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -662,7 +662,7 @@ void ComputePropertyAtom::pack_zs_triclinic(int n) void ComputePropertyAtom::pack_xu(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -681,7 +681,7 @@ void ComputePropertyAtom::pack_xu(int n) void ComputePropertyAtom::pack_yu(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -700,7 +700,7 @@ void ComputePropertyAtom::pack_yu(int n) void ComputePropertyAtom::pack_zu(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -719,7 +719,7 @@ void ComputePropertyAtom::pack_zu(int n) void ComputePropertyAtom::pack_xu_triclinic(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -742,7 +742,7 @@ void ComputePropertyAtom::pack_xu_triclinic(int n) void ComputePropertyAtom::pack_yu_triclinic(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -764,7 +764,7 @@ void ComputePropertyAtom::pack_yu_triclinic(int n) void ComputePropertyAtom::pack_zu_triclinic(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -784,7 +784,7 @@ void ComputePropertyAtom::pack_zu_triclinic(int n) void ComputePropertyAtom::pack_ix(int n) { - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -799,7 +799,7 @@ void ComputePropertyAtom::pack_ix(int n) void ComputePropertyAtom::pack_iy(int n) { - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -814,7 +814,7 @@ void ComputePropertyAtom::pack_iy(int n) void ComputePropertyAtom::pack_iz(int n) { - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index f4858614ea..f83edfa638 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -377,7 +377,7 @@ void CreateAtoms::command(int narg, char **arg) // perform irregular comm to migrate atoms to new owning procs double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); @@ -416,8 +416,8 @@ void CreateAtoms::add_single() // remap atom if requested if (remapflag) { - tagint imagetmp = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + imageint imagetmp = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; domain->remap(xone,imagetmp); } diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 3549c1676f..5701a04393 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -263,7 +263,7 @@ void DisplaceAtoms::command(int narg, char **arg) // use irregular() in case atoms moved a long distance double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); diff --git a/src/domain.cpp b/src/domain.cpp index 47e5248dcb..a2d88c94cf 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -443,13 +443,13 @@ void Domain::reset_box() void Domain::pbc() { int i; - tagint idim,otherdims; + imageint idim,otherdims; double *lo,*hi,*period; int nlocal = atom->nlocal; double **x = atom->x; double **v = atom->v; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; if (triclinic == 0) { lo = boxlo; @@ -568,7 +568,7 @@ void Domain::image_check() memory->create(unwrap,atom->nmax,3,"domain:unwrap"); double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (i = 0; i < nlocal; i++) @@ -988,11 +988,11 @@ void Domain::closest_image(const double * const xi, const double * const xj, increment/decrement in wrap-around fashion ------------------------------------------------------------------------- */ -void Domain::remap(double *x, tagint &image) +void Domain::remap(double *x, imageint &image) { double *lo,*hi,*period,*coord; double lamda[3]; - tagint idim,otherdims; + imageint idim,otherdims; if (triclinic == 0) { lo = boxlo; @@ -1197,7 +1197,7 @@ void Domain::remap_near(double *xnew, double *xold) for triclinic, use h[] to add in tilt factors in other dims as needed ------------------------------------------------------------------------- */ -void Domain::unmap(double *x, tagint image) +void Domain::unmap(double *x, imageint image) { int xbox = (image & IMGMASK) - IMGMAX; int ybox = (image >> IMGBITS & IMGMASK) - IMGMAX; @@ -1220,7 +1220,7 @@ void Domain::unmap(double *x, tagint image) for triclinic, use h[] to add in tilt factors in other dims as needed ------------------------------------------------------------------------- */ -void Domain::unmap(double *x, tagint image, double *y) +void Domain::unmap(double *x, imageint image, double *y) { int xbox = (image & IMGMASK) - IMGMAX; int ybox = (image >> IMGBITS & IMGMASK) - IMGMAX; @@ -1258,7 +1258,7 @@ void Domain::unmap(double *x, tagint image, double *y) void Domain::image_flip(int m, int n, int p) { - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { @@ -1269,9 +1269,9 @@ void Domain::image_flip(int m, int n, int p) ybox -= p*zbox; xbox -= m*ybox + n*zbox; - image[i] = ((tagint) (xbox + IMGMAX) & IMGMASK) | - (((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | - (((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); + image[i] = ((imageint) (xbox + IMGMAX) & IMGMASK) | + (((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); } } diff --git a/src/domain.h b/src/domain.h index 1a48e4ee79..2d8ce8704b 100644 --- a/src/domain.h +++ b/src/domain.h @@ -106,11 +106,11 @@ class Domain : protected Pointers { int closest_image(int, int); void closest_image(const double * const, const double * const, double * const); - void remap(double *, tagint &); + void remap(double *, imageint &); void remap(double *); void remap_near(double *, double *); - void unmap(double *, tagint); - void unmap(double *, tagint, double *); + void unmap(double *, imageint); + void unmap(double *, imageint, double *); void image_flip(int, int, int); void set_lattice(int, char **); void add_region(int, char **); diff --git a/src/dump_atom.cpp b/src/dump_atom.cpp index c87729e2cb..1a1313e3a3 100644 --- a/src/dump_atom.cpp +++ b/src/dump_atom.cpp @@ -243,7 +243,7 @@ void DumpAtom::pack_scale_image(int *ids) int *tag = atom->tag; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; double **x = atom->x; int nlocal = atom->nlocal; @@ -303,7 +303,7 @@ void DumpAtom::pack_scale_image_triclinic(int *ids) int *tag = atom->tag; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; double **x = atom->x; int nlocal = atom->nlocal; @@ -361,7 +361,7 @@ void DumpAtom::pack_noscale_image(int *ids) int *tag = atom->tag; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; double **x = atom->x; int nlocal = atom->nlocal; diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 1f0f255e1b..32b3e4eb33 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -535,7 +535,7 @@ int DumpCustom::count() } else if (thresh_array[ithresh] == XU) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double xprd = domain->xprd; for (i = 0; i < nlocal; i++) dchoose[i] = x[i][0] + ((image[i] & IMGMASK) - IMGMAX) * xprd; @@ -543,7 +543,7 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == YU) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double yprd = domain->yprd; for (i = 0; i < nlocal; i++) dchoose[i] = x[i][1] + @@ -552,7 +552,7 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == ZU) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double zprd = domain->zprd; for (i = 0; i < nlocal; i++) dchoose[i] = x[i][2] + ((image[i] >> IMG2BITS) - IMGMAX) * zprd; @@ -561,7 +561,7 @@ int DumpCustom::count() } else if (thresh_array[ithresh] == XUTRI) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *h = domain->h; int xbox,ybox,zbox; for (i = 0; i < nlocal; i++) { @@ -574,7 +574,7 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == YUTRI) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *h = domain->h; int ybox,zbox; for (i = 0; i < nlocal; i++) { @@ -586,7 +586,7 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == ZUTRI) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *h = domain->h; int zbox; for (i = 0; i < nlocal; i++) { @@ -598,7 +598,7 @@ int DumpCustom::count() } else if (thresh_array[ithresh] == XSU) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double boxxlo = domain->boxlo[0]; double invxprd = 1.0/domain->xprd; for (i = 0; i < nlocal; i++) @@ -609,7 +609,7 @@ int DumpCustom::count() } else if (thresh_array[ithresh] == YSU) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double boxylo = domain->boxlo[1]; double invyprd = 1.0/domain->yprd; for (i = 0; i < nlocal; i++) @@ -621,7 +621,7 @@ int DumpCustom::count() } else if (thresh_array[ithresh] == ZSU) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double boxzlo = domain->boxlo[2]; double invzprd = 1.0/domain->zprd; for (i = 0; i < nlocal; i++) @@ -632,7 +632,7 @@ int DumpCustom::count() } else if (thresh_array[ithresh] == XSUTRI) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *boxlo = domain->boxlo; double *h_inv = domain->h_inv; for (i = 0; i < nlocal; i++) @@ -644,7 +644,7 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == YSUTRI) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *boxlo = domain->boxlo; double *h_inv = domain->h_inv; for (i = 0; i < nlocal; i++) @@ -655,7 +655,7 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == ZSUTRI) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *boxlo = domain->boxlo; double *h_inv = domain->h_inv; for (i = 0; i < nlocal; i++) @@ -665,19 +665,19 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == IX) { - tagint *image = atom->image; + imageint *image = atom->image; for (i = 0; i < nlocal; i++) dchoose[i] = (image[i] & IMGMASK) - IMGMAX; ptr = dchoose; nstride = 1; } else if (thresh_array[ithresh] == IY) { - tagint *image = atom->image; + imageint *image = atom->image; for (i = 0; i < nlocal; i++) dchoose[i] = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; ptr = dchoose; nstride = 1; } else if (thresh_array[ithresh] == IZ) { - tagint *image = atom->image; + imageint *image = atom->image; for (i = 0; i < nlocal; i++) dchoose[i] = (image[i] >> IMG2BITS) - IMGMAX; ptr = dchoose; @@ -1896,7 +1896,7 @@ void DumpCustom::pack_xu(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double xprd = domain->xprd; @@ -1913,7 +1913,7 @@ void DumpCustom::pack_yu(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double yprd = domain->yprd; @@ -1930,7 +1930,7 @@ void DumpCustom::pack_zu(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double zprd = domain->zprd; @@ -1947,7 +1947,7 @@ void DumpCustom::pack_xu_triclinic(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *h = domain->h; int xbox,ybox,zbox; @@ -1968,7 +1968,7 @@ void DumpCustom::pack_yu_triclinic(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *h = domain->h; int ybox,zbox; @@ -1988,7 +1988,7 @@ void DumpCustom::pack_zu_triclinic(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *h = domain->h; int zbox; @@ -2007,7 +2007,7 @@ void DumpCustom::pack_xsu(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double boxxlo = domain->boxlo[0]; double invxprd = 1.0/domain->xprd; @@ -2025,7 +2025,7 @@ void DumpCustom::pack_ysu(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double boxylo = domain->boxlo[1]; double invyprd = 1.0/domain->yprd; @@ -2043,7 +2043,7 @@ void DumpCustom::pack_zsu(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double boxzlo = domain->boxlo[2]; double invzprd = 1.0/domain->zprd; @@ -2061,7 +2061,7 @@ void DumpCustom::pack_xsu_triclinic(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *boxlo = domain->boxlo; double *h_inv = domain->h_inv; @@ -2080,7 +2080,7 @@ void DumpCustom::pack_ysu_triclinic(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *boxlo = domain->boxlo; double *h_inv = domain->h_inv; @@ -2099,7 +2099,7 @@ void DumpCustom::pack_zsu_triclinic(int n) { int j; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; double *boxlo = domain->boxlo; double *h_inv = domain->h_inv; @@ -2115,7 +2115,7 @@ void DumpCustom::pack_zsu_triclinic(int n) void DumpCustom::pack_ix(int n) { - tagint *image = atom->image; + imageint *image = atom->image; for (int i = 0; i < nchoose; i++) { buf[n] = (image[clist[i]] & IMGMASK) - IMGMAX; @@ -2127,7 +2127,7 @@ void DumpCustom::pack_ix(int n) void DumpCustom::pack_iy(int n) { - tagint *image = atom->image; + imageint *image = atom->image; for (int i = 0; i < nchoose; i++) { buf[n] = (image[clist[i]] >> IMGBITS & IMGMASK) - IMGMAX; @@ -2139,7 +2139,7 @@ void DumpCustom::pack_iy(int n) void DumpCustom::pack_iz(int n) { - tagint *image = atom->image; + imageint *image = atom->image; for (int i = 0; i < nchoose; i++) { buf[n] = (image[clist[i]] >> IMG2BITS) - IMGMAX; diff --git a/src/dump_dcd.cpp b/src/dump_dcd.cpp index 132389cd1e..877d8a3f10 100644 --- a/src/dump_dcd.cpp +++ b/src/dump_dcd.cpp @@ -181,7 +181,7 @@ void DumpDCD::pack(int *ids) int *tag = atom->tag; double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/fix_addforce.cpp b/src/fix_addforce.cpp index 27dc6c426a..66f68715d6 100644 --- a/src/fix_addforce.cpp +++ b/src/fix_addforce.cpp @@ -221,7 +221,7 @@ void FixAddForce::post_force(int vflag) double **x = atom->x; double **f = atom->f; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; // reallocate sforce array if necessary diff --git a/src/fix_deform.cpp b/src/fix_deform.cpp index e62776c32c..3401c61a67 100644 --- a/src/fix_deform.cpp +++ b/src/fix_deform.cpp @@ -657,7 +657,7 @@ void FixDeform::pre_exchange() domain->image_flip(flipxy,flipxz,flipyz); double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); diff --git a/src/fix_momentum.cpp b/src/fix_momentum.cpp index ff4ea79888..e33346b185 100644 --- a/src/fix_momentum.cpp +++ b/src/fix_momentum.cpp @@ -120,7 +120,7 @@ void FixMomentum::end_of_step() double **x = atom->x; double **v = atom->v; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double dx,dy,dz; diff --git a/src/fix_move.cpp b/src/fix_move.cpp index 08503ccc60..ca0f84cdca 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -248,7 +248,7 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : // xoriginal = initial unwrapped positions of atoms double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -868,7 +868,7 @@ void FixMove::copy_arrays(int i, int j, int delflag) void FixMove::set_arrays(int i) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; // particle not in group diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 5e0eb3aeff..0d456cd04e 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -2250,7 +2250,7 @@ void FixNH::pre_exchange() domain->image_flip(flipxy,flipxz,flipyz); double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); diff --git a/src/fix_spring_rg.cpp b/src/fix_spring_rg.cpp index c3d65829b2..765edac8b9 100644 --- a/src/fix_spring_rg.cpp +++ b/src/fix_spring_rg.cpp @@ -106,7 +106,7 @@ void FixSpringRG::post_force(int vflag) double **x = atom->x; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; int nlocal = atom->nlocal; diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index 3ad5c2c72e..c14a4b5731 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -77,7 +77,7 @@ FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) : double **x = atom->x; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { @@ -149,7 +149,7 @@ void FixSpringSelf::post_force(int vflag) double **x = atom->x; double **f = atom->f; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double dx,dy,dz; diff --git a/src/fix_store_state.cpp b/src/fix_store_state.cpp index 067edd0a3d..bd95daf7a2 100644 --- a/src/fix_store_state.cpp +++ b/src/fix_store_state.cpp @@ -816,7 +816,7 @@ void FixStoreState::pack_zs_triclinic(int n) void FixStoreState::pack_xu(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -836,7 +836,7 @@ void FixStoreState::pack_xu(int n) void FixStoreState::pack_yu(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -856,7 +856,7 @@ void FixStoreState::pack_yu(int n) void FixStoreState::pack_zu(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -876,7 +876,7 @@ void FixStoreState::pack_zu(int n) void FixStoreState::pack_xu_triclinic(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -900,7 +900,7 @@ void FixStoreState::pack_xu_triclinic(int n) void FixStoreState::pack_yu_triclinic(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -923,7 +923,7 @@ void FixStoreState::pack_yu_triclinic(int n) void FixStoreState::pack_zu_triclinic(int n) { double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -944,7 +944,7 @@ void FixStoreState::pack_zu_triclinic(int n) void FixStoreState::pack_ix(int n) { - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -959,7 +959,7 @@ void FixStoreState::pack_ix(int n) void FixStoreState::pack_iy(int n) { - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -974,7 +974,7 @@ void FixStoreState::pack_iy(int n) void FixStoreState::pack_iz(int n) { - tagint *image = atom->image; + imageint *image = atom->image; int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/fix_tmd.cpp b/src/fix_tmd.cpp index 11c8c7920e..1a10594478 100644 --- a/src/fix_tmd.cpp +++ b/src/fix_tmd.cpp @@ -92,7 +92,7 @@ FixTMD::FixTMD(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double **x = atom->x; double *mass = atom->mass; int nlocal = atom->nlocal; @@ -186,7 +186,7 @@ void FixTMD::initial_integrate(int vflag) double **v = atom->v; double **f = atom->f; double *mass = atom->mass; - tagint *image = atom->image; + imageint *image = atom->image; int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/group.cpp b/src/group.cpp index d8f37d5b10..d525c79281 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -762,7 +762,7 @@ void Group::xcm(int igroup, double masstotal, double *cm) double **x = atom->x; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -816,7 +816,7 @@ void Group::xcm(int igroup, double masstotal, double *cm, int iregion) double **x = atom->x; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -1086,7 +1086,7 @@ double Group::gyration(int igroup, double masstotal, double *cm) double **x = atom->x; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -1126,7 +1126,7 @@ double Group::gyration(int igroup, double masstotal, double *cm, int iregion) double **x = atom->x; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -1166,7 +1166,7 @@ void Group::angmom(int igroup, double *cm, double *lmom) double **v = atom->v; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -1208,7 +1208,7 @@ void Group::angmom(int igroup, double *cm, double *lmom, int iregion) double **v = atom->v; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -1248,7 +1248,7 @@ void Group::torque(int igroup, double *cm, double *tq) double **x = atom->x; double **f = atom->f; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double dx,dy,dz; @@ -1285,7 +1285,7 @@ void Group::torque(int igroup, double *cm, double *tq, int iregion) double **x = atom->x; double **f = atom->f; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double dx,dy,dz; @@ -1322,7 +1322,7 @@ void Group::inertia(int igroup, double *cm, double itensor[3][3]) double **x = atom->x; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; @@ -1372,7 +1372,7 @@ void Group::inertia(int igroup, double *cm, double itensor[3][3], int iregion) double **x = atom->x; int *mask = atom->mask; int *type = atom->type; - tagint *image = atom->image; + imageint *image = atom->image; double *mass = atom->mass; double *rmass = atom->rmass; int nlocal = atom->nlocal; diff --git a/src/lammps.cpp b/src/lammps.cpp index 73419d06b6..618ac92c3b 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -370,31 +370,32 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) if (sizeof(smallint) != sizeof(int)) error->all(FLERR,"Smallint setting in lmptype.h is invalid"); + if (sizeof(imageint) < sizeof(smallint)) + error->all(FLERR,"Imageint setting in lmptype.h is invalid"); if (sizeof(tagint) < sizeof(smallint)) error->all(FLERR,"Tagint setting in lmptype.h is invalid"); if (sizeof(bigint) < sizeof(tagint)) error->all(FLERR,"Bigint setting in lmptype.h is invalid"); int mpisize; - MPI_Type_size(MPI_LMP_TAGINT,&mpisize); - if (mpisize != sizeof(tagint)) - error->all(FLERR, - "MPI_LMP_TAGINT and tagint in lmptype.h are not compatible"); MPI_Type_size(MPI_LMP_BIGINT,&mpisize); if (mpisize != sizeof(bigint)) - error->all(FLERR, - "MPI_LMP_BIGINT and bigint in lmptype.h are not compatible"); + error->all(FLERR,"MPI_LMP_BIGINT and bigint in " + "lmptype.h are not compatible"); #ifdef LAMMPS_SMALLBIG - if (sizeof(smallint) != 4 || sizeof(tagint) != 4 || sizeof(bigint) != 8) + if (sizeof(smallint) != 4 || sizeof(imageint) != 4 || + sizeof(tagint) != 4 || sizeof(bigint) != 8) error->all(FLERR,"Small, tag, big integers are not sized correctly"); #endif #ifdef LAMMPS_BIGBIG - if (sizeof(smallint) != 4 || sizeof(tagint) != 8 || sizeof(bigint) != 8) + if (sizeof(smallint) != 4 || sizeof(imageint) != 8 || + sizeof(tagint) != 8 || sizeof(bigint) != 8) error->all(FLERR,"Small, tag, big integers are not sized correctly"); #endif #ifdef LAMMPS_SMALLSMALL - if (sizeof(smallint) != 4 || sizeof(tagint) != 4 || sizeof(bigint) != 4) + if (sizeof(smallint) != 4 || sizeof(imageint) != 4 || + sizeof(tagint) != 4 || sizeof(bigint) != 4) error->all(FLERR,"Small, tag, big integers are not sized correctly"); #endif diff --git a/src/lmptype.h b/src/lmptype.h index 8ad5f9dafa..1c3b783e26 100644 --- a/src/lmptype.h +++ b/src/lmptype.h @@ -14,14 +14,15 @@ // define integer data types used by LAMMPS and associated size limits // smallint = variables for on-procesor system (nlocal, nmax, etc) +// imageint = variables for atom image flags (image) // tagint = variables for atom IDs (tag) // bigint = variables for total system (natoms, ntimestep, etc) // smallint must be an int, as defined by C compiler +// imageint can be 32-bit or 64-bit int, must be >= smallint // tagint can be 32-bit or 64-bit int, must be >= smallint // bigint can be 32-bit or 64-bit int, must be >= tagint -// MPI_LMP_TAGINT = MPI data type corresponding to a tagint // MPI_LMP_BIGINT = MPI data type corresponding to a bigint #ifndef LMP_LMPTYPE_H @@ -70,11 +71,12 @@ namespace LAMMPS_NS { #endif // for atomic problems that exceed 2 billion (2^31) atoms -// 32-bit smallint and tagint, 64-bit bigint +// 32-bit smallint and imageint and tagint, 64-bit bigint #ifdef LAMMPS_SMALLBIG typedef int smallint; +typedef int imageint; typedef int tagint; typedef int64_t bigint; @@ -82,7 +84,6 @@ typedef int64_t bigint; #define MAXTAGINT INT_MAX #define MAXBIGINT INT64_MAX -#define MPI_LMP_TAGINT MPI_INT #define MPI_LMP_BIGINT MPI_LL #define TAGINT_FORMAT "%d" @@ -100,11 +101,12 @@ typedef int64_t bigint; // for molecular problems that exceed 2 billion (2^31) atoms // or problems where atoms wrap around the periodic box more than 512 times -// 32-bit smallint, 64-bit tagint and bigint +// 32-bit smallint, 64-bit imageint and tagint and bigint #ifdef LAMMPS_BIGBIG typedef int smallint; +typedef int64_t imageint; typedef int64_t tagint; typedef int64_t bigint; @@ -112,7 +114,6 @@ typedef int64_t bigint; #define MAXTAGINT INT64_MAX #define MAXBIGINT INT64_MAX -#define MPI_LMP_TAGINT MPI_LL #define MPI_LMP_BIGINT MPI_LL #define TAGINT_FORMAT "%" PRId64 @@ -129,11 +130,12 @@ typedef int64_t bigint; #endif // for machines that do not support 64-bit ints -// 32-bit smallint and tagint and bigint +// 32-bit smallint and imageint and tagint and bigint #ifdef LAMMPS_SMALLSMALL typedef int smallint; +typedef int imageint; typedef int tagint; typedef int bigint; @@ -141,7 +143,6 @@ typedef int bigint; #define MAXTAGINT INT_MAX #define MAXBIGINT INT_MAX -#define MPI_LMP_TAGINT MPI_INT #define MPI_LMP_BIGINT MPI_INT #define TAGINT_FORMAT "%d" diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 9d2e24603e..6196f876c1 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -543,7 +543,7 @@ void ReadDump::atoms() // use irregular() in case atoms moved a long distance double **x = atom->x; - tagint *image = atom->image; + imageint *image = atom->image; nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); @@ -716,7 +716,7 @@ void ReadDump::process_atoms(int n) double **x = atom->x; double **v = atom->v; double *q = atom->q; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; int map_tag_max = atom->map_tag_max; @@ -785,9 +785,9 @@ void ReadDump::process_atoms(int n) if (!wrapped) xbox = ybox = zbox = 0; - image[m] = ((tagint) (xbox + IMGMAX) & IMGMASK) | - (((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | - (((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); + image[m] = ((imageint) (xbox + IMGMAX) & IMGMASK) | + (((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); } } @@ -874,9 +874,9 @@ void ReadDump::process_atoms(int n) // replace image flag in case changed by ix,iy,iz fields - image[m] = ((tagint) (xbox + IMGMAX) & IMGMASK) | - (((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | - (((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); + image[m] = ((imageint) (xbox + IMGMAX) & IMGMASK) | + (((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); } } diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 4f518b0844..937b10548b 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -60,7 +60,8 @@ enum{VERSION,SMALLINT,TAGINT,BIGINT, TRICLINIC,BOXLO,BOXHI,XY,XZ,YZ, SPECIAL_LJ,SPECIAL_COUL, MASS,PAIR,BOND,ANGLE,DIHEDRAL,IMPROPER, - MULTIPROC,MPIIO,PROCSPERFILE,PERPROC}; + MULTIPROC,MPIIO,PROCSPERFILE,PERPROC, + IMAGEINT}; #define LB_FACTOR 1.1 @@ -644,6 +645,10 @@ void ReadRestart::header(int incompatible) int size = read_int(); if (size != sizeof(smallint)) error->all(FLERR,"Smallint setting in lmptype.h is not compatible"); + } else if (flag == IMAGEINT) { + int size = read_int(); + if (size != sizeof(imageint)) + error->all(FLERR,"Imageint setting in lmptype.h is not compatible"); } else if (flag == TAGINT) { int size = read_int(); if (size != sizeof(tagint)) diff --git a/src/replicate.cpp b/src/replicate.cpp index f2503b6444..d0b3b71ab2 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -258,7 +258,7 @@ void Replicate::command(int narg, char **arg) AtomVec *avec = atom->avec; int ix,iy,iz,atom_offset,mol_offset; - tagint image; + imageint image; double x[3],lamda[3]; double *coord; int tag_enable = atom->tag_enable; @@ -279,8 +279,8 @@ void Replicate::command(int narg, char **arg) m = 0; while (m < n) { - image = ((tagint) IMGMAX << IMG2BITS) | - ((tagint) IMGMAX << IMGBITS) | IMGMAX; + image = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; if (triclinic == 0) { x[0] = buf[m+1] + ix*old_xprd; x[1] = buf[m+2] + iy*old_yprd; diff --git a/src/set.cpp b/src/set.cpp index df4d3d18d8..046dc67f48 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -683,9 +683,9 @@ void Set::set(int keyword) if (ximageflag) xbox = ximage; if (yimageflag) ybox = yimage; if (zimageflag) zbox = zimage; - atom->image[i] = ((tagint) (xbox + IMGMAX) & IMGMASK) | - (((tagint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | - (((tagint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); + atom->image[i] = ((imageint) (xbox + IMGMAX) & IMGMASK) | + (((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); } // set value for custom integer or double vector diff --git a/src/velocity.cpp b/src/velocity.cpp index 2502640d95..1d44bcaf58 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -736,7 +736,7 @@ void Velocity::zero_rotation() double **x = atom->x; double **v = atom->v; int *mask = atom->mask; - tagint *image = atom->image; + imageint *image = atom->image; int nlocal = atom->nlocal; double dx,dy,dz; diff --git a/src/write_restart.cpp b/src/write_restart.cpp index 5691ee89cc..1b5a25a888 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -59,7 +59,8 @@ enum{VERSION,SMALLINT,TAGINT,BIGINT, TRICLINIC,BOXLO,BOXHI,XY,XZ,YZ, SPECIAL_LJ,SPECIAL_COUL, MASS,PAIR,BOND,ANGLE,DIHEDRAL,IMPROPER, - MULTIPROC,MPIIO,PROCSPERFILE,PERPROC}; + MULTIPROC,MPIIO,PROCSPERFILE,PERPROC, + IMAGEINT}; enum{IGNORE,WARN,ERROR}; // same as thermo.cpp @@ -435,6 +436,7 @@ void WriteRestart::header() { write_string(VERSION,universe->version); write_int(SMALLINT,sizeof(smallint)); + write_int(IMAGEINT,sizeof(imageint)); write_int(TAGINT,sizeof(tagint)); write_int(BIGINT,sizeof(bigint)); write_string(UNITS,update->unit_style);