diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index 5410a4c773..f0f7ce8c14 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -43,10 +43,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -// same as fix_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - // same as fix_wall.cpp enum{EDGE,CONSTANT,VARIABLE}; @@ -570,7 +566,7 @@ void PairLubricate::init_style() for (int i = 0; i < modify->nfix; i++){ if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = flagdeform = 1; - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate with inconsistent " "fix deform remap option"); } diff --git a/src/COLLOID/pair_lubricate_poly.cpp b/src/COLLOID/pair_lubricate_poly.cpp index 0ed87c37be..5e52933364 100644 --- a/src/COLLOID/pair_lubricate_poly.cpp +++ b/src/COLLOID/pair_lubricate_poly.cpp @@ -44,11 +44,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -// same as fix_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - - // same as fix_wall.cpp enum{EDGE,CONSTANT,VARIABLE}; @@ -474,7 +469,7 @@ void PairLubricatePoly::init_style() for (int i = 0; i < modify->nfix; i++){ if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = flagdeform = 1; - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate with inconsistent " "fix deform remap option"); } @@ -550,7 +545,7 @@ void PairLubricatePoly::init_style() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = 1; - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate/poly with inconsistent " "fix deform remap option"); } diff --git a/src/KOKKOS/fix_deform_kokkos.cpp b/src/KOKKOS/fix_deform_kokkos.cpp index 0503649795..7b9336ed3b 100644 --- a/src/KOKKOS/fix_deform_kokkos.cpp +++ b/src/KOKKOS/fix_deform_kokkos.cpp @@ -41,10 +41,6 @@ using namespace MathConst; enum{NONE,FINAL,DELTA,SCALE,VEL,ERATE,TRATE,VOLUME,WIGGLE,VARIABLE}; enum{ONE_FROM_ONE,ONE_FROM_TWO,TWO_FROM_ONE}; -// same as domain.cpp, fix_nvt_sllod.cpp, compute_temp_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - /* ---------------------------------------------------------------------- */ FixDeformKokkos::FixDeformKokkos(LAMMPS *lmp, int narg, char **arg) : FixDeform(lmp, narg, arg) @@ -315,7 +311,7 @@ void FixDeformKokkos::end_of_step() // convert atoms and rigid bodies to lamda coords - if (remapflag == X_REMAP) { + if (remapflag == Domain::X_REMAP) { int nlocal = atom->nlocal; domainKK->x2lamda(nlocal); @@ -355,7 +351,7 @@ void FixDeformKokkos::end_of_step() // convert atoms and rigid bodies back to box coords - if (remapflag == X_REMAP) { + if (remapflag == Domain::X_REMAP) { int nlocal = atom->nlocal; domainKK->lamda2x(nlocal); diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index 6bc72dca4b..564c1e98d7 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -52,8 +52,6 @@ enum{BIG_MOVE,SRD_MOVE,SRD_ROTATE}; enum{CUBIC_ERROR,CUBIC_WARN}; enum{SHIFT_NO,SHIFT_YES,SHIFT_POSSIBLE}; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - #define EINERTIA 0.2 // moment of inertia prefactor for ellipsoid #define ATOMPERBIN 30 @@ -384,7 +382,7 @@ void FixSRD::init() if (strcmp(modify->fix[i]->style,"deform") == 0) { deformflag = 1; FixDeform *deform = (FixDeform *) modify->fix[i]; - if (deform->box_change_shape && deform->remapflag != V_REMAP) + if (deform->box_change_shape && deform->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix srd with inconsistent " "fix deform remap option"); } diff --git a/src/USER-EFF/compute_temp_deform_eff.cpp b/src/USER-EFF/compute_temp_deform_eff.cpp index 53fb7683a7..d3856e431d 100644 --- a/src/USER-EFF/compute_temp_deform_eff.cpp +++ b/src/USER-EFF/compute_temp_deform_eff.cpp @@ -35,8 +35,6 @@ using namespace LAMMPS_NS; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ ComputeTempDeformEff::ComputeTempDeformEff(LAMMPS *lmp, int narg, char **arg) : @@ -76,7 +74,7 @@ void ComputeTempDeformEff::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag == X_REMAP && + if (((FixDeform *) modify->fix[i])->remapflag == Domain::X_REMAP && comm->me == 0) error->warning(FLERR,"Using compute temp/deform/eff with inconsistent " "fix deform remap option"); diff --git a/src/USER-EFF/fix_nvt_sllod_eff.cpp b/src/USER-EFF/fix_nvt_sllod_eff.cpp index f7b1a4ab2b..13cb34048c 100644 --- a/src/USER-EFF/fix_nvt_sllod_eff.cpp +++ b/src/USER-EFF/fix_nvt_sllod_eff.cpp @@ -27,8 +27,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ FixNVTSllodEff::FixNVTSllodEff(LAMMPS *lmp, int narg, char **arg) : @@ -78,7 +76,7 @@ void FixNVTSllodEff::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod/eff with inconsistent fix deform " "remap option"); break; diff --git a/src/USER-INTEL/fix_nvt_sllod_intel.cpp b/src/USER-INTEL/fix_nvt_sllod_intel.cpp index 5684f46903..ad7e1384f0 100644 --- a/src/USER-INTEL/fix_nvt_sllod_intel.cpp +++ b/src/USER-INTEL/fix_nvt_sllod_intel.cpp @@ -27,8 +27,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ FixNVTSllodIntel::FixNVTSllodIntel(LAMMPS *lmp, int narg, char **arg) : @@ -79,7 +77,7 @@ void FixNVTSllodIntel::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform " "remap option"); break; diff --git a/src/USER-OMP/fix_nvt_sllod_omp.cpp b/src/USER-OMP/fix_nvt_sllod_omp.cpp index 33445c68af..6ef1188d53 100644 --- a/src/USER-OMP/fix_nvt_sllod_omp.cpp +++ b/src/USER-OMP/fix_nvt_sllod_omp.cpp @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - typedef struct { double x,y,z; } dbl3_t; /* ---------------------------------------------------------------------- */ @@ -85,7 +83,7 @@ void FixNVTSllodOMP::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod/omp with inconsistent fix " "deform remap option"); break; diff --git a/src/USER-OMP/pair_lubricate_omp.cpp b/src/USER-OMP/pair_lubricate_omp.cpp index fbfc24769b..a7f9fc65b5 100644 --- a/src/USER-OMP/pair_lubricate_omp.cpp +++ b/src/USER-OMP/pair_lubricate_omp.cpp @@ -32,10 +32,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -// same as fix_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - // same as fix_wall.cpp enum{EDGE,CONSTANT,VARIABLE}; diff --git a/src/USER-OMP/pair_lubricate_poly_omp.cpp b/src/USER-OMP/pair_lubricate_poly_omp.cpp index 825b3e8d70..3f0ef1dba6 100644 --- a/src/USER-OMP/pair_lubricate_poly_omp.cpp +++ b/src/USER-OMP/pair_lubricate_poly_omp.cpp @@ -32,11 +32,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -// same as fix_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - - // same as fix_wall.cpp enum{EDGE,CONSTANT,VARIABLE}; diff --git a/src/compute_temp_deform.cpp b/src/compute_temp_deform.cpp index 907f709098..8729204e70 100644 --- a/src/compute_temp_deform.cpp +++ b/src/compute_temp_deform.cpp @@ -32,8 +32,6 @@ using namespace LAMMPS_NS; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ ComputeTempDeform::ComputeTempDeform(LAMMPS *lmp, int narg, char **arg) : @@ -71,7 +69,7 @@ void ComputeTempDeform::init() for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag == X_REMAP && + if (((FixDeform *) modify->fix[i])->remapflag == Domain::X_REMAP && comm->me == 0) error->warning(FLERR,"Using compute temp/deform with inconsistent " "fix deform remap option"); diff --git a/src/domain.cpp b/src/domain.cpp index df6f0369c3..e9f7fe79ba 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -44,7 +44,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files #define BIG 1.0e20 @@ -154,7 +153,7 @@ void Domain::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { deform_flag = 1; - if (((FixDeform *) modify->fix[i])->remapflag == V_REMAP) { + if (((FixDeform *) modify->fix[i])->remapflag == Domain::V_REMAP) { deform_vremap = 1; deform_groupbit = modify->fix[i]->groupbit; } diff --git a/src/domain.h b/src/domain.h index fe2502c691..5581f9a45f 100644 --- a/src/domain.h +++ b/src/domain.h @@ -93,6 +93,7 @@ class Domain : protected Pointers { class Region **regions; // list of defined Regions int copymode; + enum{NO_REMAP,X_REMAP,V_REMAP}; typedef Region *(*RegionCreator)(LAMMPS *,int,char**); typedef std::map RegionCreatorMap; diff --git a/src/fix_deform.cpp b/src/fix_deform.cpp index 65e1bee63b..c960c310f6 100644 --- a/src/fix_deform.cpp +++ b/src/fix_deform.cpp @@ -40,10 +40,6 @@ using namespace MathConst; enum{NONE=0,FINAL,DELTA,SCALE,VEL,ERATE,TRATE,VOLUME,WIGGLE,VARIABLE}; enum{ONE_FROM_ONE,ONE_FROM_TWO,TWO_FROM_ONE}; -// same as domain.cpp, fix_nvt_sllod.cpp, compute_temp_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - /* ---------------------------------------------------------------------- */ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), @@ -208,7 +204,7 @@ rfix(NULL), irregular(NULL), set(NULL) // no x remap effectively moves atoms within box, so set restart_pbc options(narg-iarg,&arg[iarg]); - if (remapflag != X_REMAP) restart_pbc = 1; + if (remapflag != Domain::X_REMAP) restart_pbc = 1; // setup dimflags used by other classes to check for volume-change conflicts @@ -890,7 +886,7 @@ void FixDeform::end_of_step() // convert atoms and rigid bodies to lamda coords - if (remapflag == X_REMAP) { + if (remapflag == Domain::X_REMAP) { double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -930,7 +926,7 @@ void FixDeform::end_of_step() // convert atoms and rigid bodies back to box coords - if (remapflag == X_REMAP) { + if (remapflag == Domain::X_REMAP) { double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -992,7 +988,7 @@ void FixDeform::options(int narg, char **arg) { if (narg < 0) error->all(FLERR,"Illegal fix deform command"); - remapflag = X_REMAP; + remapflag = Domain::X_REMAP; scaleflag = 1; flipflag = 1; @@ -1000,9 +996,9 @@ void FixDeform::options(int narg, char **arg) while (iarg < narg) { if (strcmp(arg[iarg],"remap") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix deform command"); - if (strcmp(arg[iarg+1],"x") == 0) remapflag = X_REMAP; - else if (strcmp(arg[iarg+1],"v") == 0) remapflag = V_REMAP; - else if (strcmp(arg[iarg+1],"none") == 0) remapflag = NO_REMAP; + if (strcmp(arg[iarg+1],"x") == 0) remapflag = Domain::X_REMAP; + else if (strcmp(arg[iarg+1],"v") == 0) remapflag = Domain::V_REMAP; + else if (strcmp(arg[iarg+1],"none") == 0) remapflag = Domain::NO_REMAP; else error->all(FLERR,"Illegal fix deform command"); iarg += 2; } else if (strcmp(arg[iarg],"units") == 0) { diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index 270d721a00..012d67c318 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ FixNVTSllod::FixNVTSllod(LAMMPS *lmp, int narg, char **arg) : @@ -83,7 +81,7 @@ void FixNVTSllod::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform " "remap option"); break;