diff --git a/src/AMOEBA/amoeba_convolution.cpp b/src/AMOEBA/amoeba_convolution.cpp index 262ce3a9c3..3bdfdc9b74 100644 --- a/src/AMOEBA/amoeba_convolution.cpp +++ b/src/AMOEBA/amoeba_convolution.cpp @@ -48,7 +48,6 @@ enum{MPOLE_GRID,POLAR_GRID,POLAR_GRIDC,DISP_GRID,INDUCE_GRID,INDUCE_GRIDC}; #define SCALE 0 static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; /* ---------------------------------------------------------------------- partition an FFT grid across processors diff --git a/src/AMOEBA/amoeba_multipole.cpp b/src/AMOEBA/amoeba_multipole.cpp index 81e7763fe7..68235dfe26 100644 --- a/src/AMOEBA/amoeba_multipole.cpp +++ b/src/AMOEBA/amoeba_multipole.cpp @@ -31,16 +31,8 @@ using namespace MathConst; using MathSpecial::square; -enum{FIELD,ZRSD,TORQUE,UFLD}; // reverse comm -enum{VDWL,REPULSE,QFER,DISP,MPOLE,POLAR,USOLV,DISP_LONG,MPOLE_LONG,POLAR_LONG}; - -#ifdef FFT_SINGLE -static constexpr FFT_SCALAR ZEROF = 0.0f; -static constexpr FFT_SCALAR ONEF = 1.0f; -#else -static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; -#endif +enum { FIELD, ZRSD, TORQUE, UFLD }; // reverse comm +enum { VDWL, REPULSE, QFER, DISP, MPOLE, POLAR, USOLV, DISP_LONG, MPOLE_LONG, POLAR_LONG }; /* ---------------------------------------------------------------------- multipole = multipole interactions diff --git a/src/AMOEBA/improper_amoeba.cpp b/src/AMOEBA/improper_amoeba.cpp index 46c2585d1f..cbc7fbd8d2 100644 --- a/src/AMOEBA/improper_amoeba.cpp +++ b/src/AMOEBA/improper_amoeba.cpp @@ -28,9 +28,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperAmoeba::ImproperAmoeba(LAMMPS *lmp) : Improper(lmp) diff --git a/src/BPM/fix_update_special_bonds.cpp b/src/BPM/fix_update_special_bonds.cpp index 5452366090..04f5d94e7e 100644 --- a/src/BPM/fix_update_special_bonds.cpp +++ b/src/BPM/fix_update_special_bonds.cpp @@ -28,8 +28,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -static constexpr int DELTA = 10000; - /* ---------------------------------------------------------------------- */ FixUpdateSpecialBonds::FixUpdateSpecialBonds(LAMMPS *lmp, int narg, char **arg) : diff --git a/src/CLASS2/improper_class2.cpp b/src/CLASS2/improper_class2.cpp index e2f5ffe01b..73f21600bb 100644 --- a/src/CLASS2/improper_class2.cpp +++ b/src/CLASS2/improper_class2.cpp @@ -32,8 +32,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperClass2::ImproperClass2(LAMMPS *lmp) : Improper(lmp) diff --git a/src/COLVARS/ndx_group.cpp b/src/COLVARS/ndx_group.cpp index 062f17619a..4170a9ea70 100644 --- a/src/COLVARS/ndx_group.cpp +++ b/src/COLVARS/ndx_group.cpp @@ -27,7 +27,6 @@ using namespace LAMMPS_NS; static constexpr int BUFLEN = 4096; -static constexpr int DELTA = 16384; // read file until next section "name" or any next section if name == "" diff --git a/src/DIELECTRIC/pppm_dielectric.cpp b/src/DIELECTRIC/pppm_dielectric.cpp index dac24a9838..49fa8ed128 100644 --- a/src/DIELECTRIC/pppm_dielectric.cpp +++ b/src/DIELECTRIC/pppm_dielectric.cpp @@ -38,11 +38,10 @@ using namespace MathSpecial; static constexpr double SMALL = 0.00001; -enum {REVERSE_RHO}; -enum {FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; +enum { REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; /* ---------------------------------------------------------------------- */ diff --git a/src/DIELECTRIC/pppm_disp_dielectric.cpp b/src/DIELECTRIC/pppm_disp_dielectric.cpp index baa9478a45..c6108646be 100644 --- a/src/DIELECTRIC/pppm_disp_dielectric.cpp +++ b/src/DIELECTRIC/pppm_disp_dielectric.cpp @@ -33,11 +33,8 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXORDER = 7; -static constexpr int OFFSET = 16384; static constexpr double SMALL = 0.00001; -static constexpr double LARGE = 10000.0; -static constexpr double EPS_HOC = 1.0e-7; +static constexpr FFT_SCALAR ZEROF = 0.0; enum{REVERSE_RHO,REVERSE_RHO_GEOM,REVERSE_RHO_ARITH,REVERSE_RHO_NONE}; enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM, @@ -48,9 +45,6 @@ enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM, FORWARD_IK_NONE,FORWARD_AD_NONE,FORWARD_IK_PERATOM_NONE, FORWARD_AD_PERATOM_NONE}; -static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; - /* ---------------------------------------------------------------------- */ PPPMDispDielectric::PPPMDispDielectric(LAMMPS *_lmp) : PPPMDisp(_lmp) diff --git a/src/DPD-REACT/fix_rx.cpp b/src/DPD-REACT/fix_rx.cpp index 69eab4dbee..a7e9e4ea77 100644 --- a/src/DPD-REACT/fix_rx.cpp +++ b/src/DPD-REACT/fix_rx.cpp @@ -42,7 +42,6 @@ enum { NONE, HARMONIC }; enum { LUCY }; static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; #ifdef DBL_EPSILON static constexpr double MY_EPSILON = 10.0*DBL_EPSILON; diff --git a/src/EFF/fix_langevin_eff.cpp b/src/EFF/fix_langevin_eff.cpp index 72c368b612..65a3f5b115 100644 --- a/src/EFF/fix_langevin_eff.cpp +++ b/src/EFF/fix_langevin_eff.cpp @@ -34,11 +34,8 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NOBIAS,BIAS}; -enum{CONSTANT,EQUAL,ATOM}; - -static constexpr double SINERTIA = 0.4; // moment of inertia prefactor for sphere -static constexpr double EINERTIA = 0.2; // moment of inertia prefactor for ellipsoid +enum { NOBIAS, BIAS }; +enum { CONSTANT, EQUAL, ATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/ELECTRODE/ewald_electrode.cpp b/src/ELECTRODE/ewald_electrode.cpp index 122708b97d..80c9c94a06 100644 --- a/src/ELECTRODE/ewald_electrode.cpp +++ b/src/ELECTRODE/ewald_electrode.cpp @@ -37,8 +37,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.00001; - /* ---------------------------------------------------------------------- */ EwaldElectrode::EwaldElectrode(LAMMPS *lmp) : Ewald(lmp), boundcorr(nullptr) diff --git a/src/ELECTRODE/pppm_electrode.cpp b/src/ELECTRODE/pppm_electrode.cpp index b9024cd69a..39e7c66ce5 100644 --- a/src/ELECTRODE/pppm_electrode.cpp +++ b/src/ELECTRODE/pppm_electrode.cpp @@ -47,15 +47,12 @@ using namespace MathSpecial; static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; -static constexpr double SMALL = 0.00001; static constexpr double EPS_HOC = 1.0e-7; enum { REVERSE_RHO }; enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; static const char cite_pppm_electrode[] = "kspace_style pppm/electrode command:\n\n" diff --git a/src/EXTRA-FIX/fix_ffl.cpp b/src/EXTRA-FIX/fix_ffl.cpp index 3039d338fc..e113a5fd37 100644 --- a/src/EXTRA-FIX/fix_ffl.cpp +++ b/src/EXTRA-FIX/fix_ffl.cpp @@ -43,8 +43,6 @@ enum {CONSTANT,EQUAL,ATOM}; enum {NO_FLIP, FLIP_RESCALE, FLIP_HARD, FLIP_SOFT}; //#define FFL_DEBUG 1 -static constexpr int MAXLINE = 1024; - /* syntax for fix_ffl: * fix nfix id-group ffl tau Tstart Tstop seed [flip_type] * */ diff --git a/src/EXTRA-FIX/fix_filter_corotate.cpp b/src/EXTRA-FIX/fix_filter_corotate.cpp index 74d1d18486..872ebd1772 100644 --- a/src/EXTRA-FIX/fix_filter_corotate.cpp +++ b/src/EXTRA-FIX/fix_filter_corotate.cpp @@ -42,7 +42,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace FixConst; -static constexpr double BIG = 1.0e20; static constexpr double MASSDELTA = 0.1; static const char cite_filter_corotate[] = diff --git a/src/EXTRA-FIX/fix_gle.cpp b/src/EXTRA-FIX/fix_gle.cpp index a65b60377e..1ecc06ddf4 100644 --- a/src/EXTRA-FIX/fix_gle.cpp +++ b/src/EXTRA-FIX/fix_gle.cpp @@ -41,8 +41,6 @@ enum{CONSTANT,EQUAL,ATOM}; //#define GLE_DEBUG 1 -static constexpr int MAXLINE = 1024; - /* syntax for fix_gle: * fix nfix id-group gle ns Tstart Tstop seed amatrix [noneq cmatrix] [every nmts] * diff --git a/src/EXTRA-MOLECULE/angle_fourier.cpp b/src/EXTRA-MOLECULE/angle_fourier.cpp index 2c458c07cc..da1667c06f 100644 --- a/src/EXTRA-MOLECULE/angle_fourier.cpp +++ b/src/EXTRA-MOLECULE/angle_fourier.cpp @@ -29,12 +29,9 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleFourier::AngleFourier(LAMMPS *lmp) : Angle(lmp) diff --git a/src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp b/src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp index 36874ee934..28015b0c36 100644 --- a/src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp +++ b/src/EXTRA-MOLECULE/dihedral_cosine_shift_exp.cpp @@ -31,7 +31,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-MOLECULE/improper_distance.cpp b/src/EXTRA-MOLECULE/improper_distance.cpp index acb962c4f0..934eeb285d 100644 --- a/src/EXTRA-MOLECULE/improper_distance.cpp +++ b/src/EXTRA-MOLECULE/improper_distance.cpp @@ -27,12 +27,8 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperDistance::ImproperDistance(LAMMPS *lmp) : Improper(lmp) diff --git a/src/EXTRA-MOLECULE/improper_ring.cpp b/src/EXTRA-MOLECULE/improper_ring.cpp index 8c570550e4..3d8b672e1e 100644 --- a/src/EXTRA-MOLECULE/improper_ring.cpp +++ b/src/EXTRA-MOLECULE/improper_ring.cpp @@ -54,7 +54,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr double TOLERANCE = 0.05; static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/GPU/pppm_gpu.cpp b/src/GPU/pppm_gpu.cpp index 2c092f6a8e..517d843c93 100644 --- a/src/GPU/pppm_gpu.cpp +++ b/src/GPU/pppm_gpu.cpp @@ -1,4 +1,3 @@ - // clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator @@ -40,17 +39,10 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXORDER = 7; -static constexpr int OFFSET = 16384; -static constexpr double SMALL = 0.00001; -static constexpr double LARGE = 10000.0; -static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO_GPU,REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; +enum { REVERSE_RHO_GPU, REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; // external functions from cuda library for atom decomposition diff --git a/src/INTEL/npair_skip_intel.cpp b/src/INTEL/npair_skip_intel.cpp index 8840f7ee43..3596237746 100644 --- a/src/INTEL/npair_skip_intel.cpp +++ b/src/INTEL/npair_skip_intel.cpp @@ -164,8 +164,6 @@ void NPairSkipIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh, if (ipage.status()) error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); } - - int last_inum = 0, loop_end; _inum_counts[tid] = my_inum; } int inum = _inum_counts[0]; @@ -406,7 +404,6 @@ void NPairSkipTrimIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh, error->one(FLERR,"Neighbor list overflow, boost neigh_modify one"); } - int last_inum = 0, loop_end; _inum_counts[tid] = my_inum; } int inum = _inum_counts[0]; diff --git a/src/INTEL/pair_eam_intel.cpp b/src/INTEL/pair_eam_intel.cpp index 03e268bb68..bd78c3239d 100644 --- a/src/INTEL/pair_eam_intel.cpp +++ b/src/INTEL/pair_eam_intel.cpp @@ -34,8 +34,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; - #define FC_PACKED1_T typename ForceConst::fc_packed1 #define FC_PACKED2_T typename ForceConst::fc_packed2 diff --git a/src/INTEL/pair_sw_intel.cpp b/src/INTEL/pair_sw_intel.cpp index 61c25692e9..dc73c26f4f 100644 --- a/src/INTEL/pair_sw_intel.cpp +++ b/src/INTEL/pair_sw_intel.cpp @@ -52,9 +52,6 @@ using namespace LAMMPS_NS; #define FC_PACKED2_T typename ForceConst::fc_packed2 #define FC_PACKED3_T typename ForceConst::fc_packed3 -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - /* ---------------------------------------------------------------------- */ PairSWIntel::PairSWIntel(LAMMPS *lmp) : PairSW(lmp) diff --git a/src/INTEL/pppm_disp_intel.cpp b/src/INTEL/pppm_disp_intel.cpp index 01981f3152..50e9c6e469 100644 --- a/src/INTEL/pppm_disp_intel.cpp +++ b/src/INTEL/pppm_disp_intel.cpp @@ -39,11 +39,8 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double SMALL = 0.00001; -static constexpr double LARGE = 10000.0; -static constexpr double EPS_HOC = 1.0e-7; +static constexpr FFT_SCALAR ZEROF = 0.0; enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; enum{REVERSE_RHO, REVERSE_RHO_G, REVERSE_RHO_A, REVERSE_RHO_NONE}; @@ -53,9 +50,6 @@ enum{FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM, FORWARD_IK_NONE, FORWARD_AD_NONE, FORWARD_IK_PERATOM_NONE, FORWARD_AD_PERATOM_NONE}; -static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; - /* ---------------------------------------------------------------------- */ PPPMDispIntel::PPPMDispIntel(LAMMPS *lmp) : PPPMDisp(lmp) diff --git a/src/INTEL/pppm_electrode_intel.cpp b/src/INTEL/pppm_electrode_intel.cpp index 9f3c57b50e..fd2b21b627 100644 --- a/src/INTEL/pppm_electrode_intel.cpp +++ b/src/INTEL/pppm_electrode_intel.cpp @@ -48,18 +48,13 @@ using namespace LAMMPS_NS; using namespace std; -static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; -static constexpr double SMALL = 0.00001; -static constexpr double EPS_HOC = 1.0e-7; enum { REVERSE_RHO }; enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; enum : bool { ELECTRODE = true, ELECTROLYTE = false }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; static const char cite_pppm_electrode[] = "kspace_style pppm/electrode command:\n\n" diff --git a/src/INTEL/pppm_intel.cpp b/src/INTEL/pppm_intel.cpp index b72a7efd11..369c824142 100644 --- a/src/INTEL/pppm_intel.cpp +++ b/src/INTEL/pppm_intel.cpp @@ -41,17 +41,11 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; -static constexpr double SMALL = 0.00001; -static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum { REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; /* ---------------------------------------------------------------------- */ @@ -690,8 +684,6 @@ void PPPMIntel::fieldforce_ik(IntelBuffers *buffers) _alignvar(FFT_SCALAR ekx_arr[INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; _alignvar(FFT_SCALAR eky_arr[INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; _alignvar(FFT_SCALAR ekz_arr[INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; - _alignvar(FFT_SCALAR ekxy_arr[2 * INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; - _alignvar(FFT_SCALAR ekz0_arr[2 * INTEL_P3M_ALIGNED_MAXORDER], 64) = {0}; #if defined(LMP_SIMD_COMPILER) #pragma loop_count min(2), max(INTEL_P3M_ALIGNED_MAXORDER), avg(7) diff --git a/src/INTERLAYER/pair_aip_water_2dm.cpp b/src/INTERLAYER/pair_aip_water_2dm.cpp index 655fc9f695..ea3812504d 100644 --- a/src/INTERLAYER/pair_aip_water_2dm.cpp +++ b/src/INTERLAYER/pair_aip_water_2dm.cpp @@ -29,10 +29,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; - static const char cite_aip_water[] = "aip/water/2dm potential doi/10.1021/acs.jpcc.2c08464\n" "@Article{Feng2023\n" diff --git a/src/INTERLAYER/pair_drip.cpp b/src/INTERLAYER/pair_drip.cpp index e9a820d5db..2800bd604d 100644 --- a/src/INTERLAYER/pair_drip.cpp +++ b/src/INTERLAYER/pair_drip.cpp @@ -36,7 +36,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; static constexpr double HALF = 0.5; diff --git a/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp b/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp index 64e71f22fc..6bc3a6dde7 100644 --- a/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp +++ b/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp @@ -40,7 +40,6 @@ using namespace LAMMPS_NS; using namespace InterLayer; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; static constexpr int PGDELTA = 1; diff --git a/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp b/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp index 4ccbd28c02..dc1b82647a 100644 --- a/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp +++ b/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp @@ -37,7 +37,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; /* ---------------------------------------------------------------------- */ diff --git a/src/INTERLAYER/pair_lebedeva_z.cpp b/src/INTERLAYER/pair_lebedeva_z.cpp index d7b13ef821..b68db0184f 100644 --- a/src/INTERLAYER/pair_lebedeva_z.cpp +++ b/src/INTERLAYER/pair_lebedeva_z.cpp @@ -39,7 +39,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; /* ---------------------------------------------------------------------- */ diff --git a/src/INTERLAYER/pair_saip_metal.cpp b/src/INTERLAYER/pair_saip_metal.cpp index c6c107c980..3053113894 100644 --- a/src/INTERLAYER/pair_saip_metal.cpp +++ b/src/INTERLAYER/pair_saip_metal.cpp @@ -33,10 +33,6 @@ using namespace LAMMPS_NS; using namespace InterLayer; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; - static const char cite_saip[] = "saip/metal potential: doi:10.1021/acs.jctc.1c00622\n\n" "@Article{Ouyang2021\n" diff --git a/src/KOKKOS/angle_cosine_kokkos.cpp b/src/KOKKOS/angle_cosine_kokkos.cpp index ec20c8fbda..768dfd43ca 100644 --- a/src/KOKKOS/angle_cosine_kokkos.cpp +++ b/src/KOKKOS/angle_cosine_kokkos.cpp @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/comm_tiled_kokkos.cpp b/src/KOKKOS/comm_tiled_kokkos.cpp index 4549f53f70..5b35527b7e 100644 --- a/src/KOKKOS/comm_tiled_kokkos.cpp +++ b/src/KOKKOS/comm_tiled_kokkos.cpp @@ -20,13 +20,6 @@ using namespace LAMMPS_NS; -static constexpr double BUFFACTOR = 1.5; -static constexpr int BUFMIN = 1000; -static constexpr int BUFEXTRA = 1000; -static constexpr double EPSILON = 1.0e-6; - -#define DELTA_PROCS 16 - /* ---------------------------------------------------------------------- */ CommTiledKokkos::CommTiledKokkos(LAMMPS *_lmp) : CommTiled(_lmp) {} diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index 59f5c18ee7..204a6d0d1a 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -32,7 +32,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; static constexpr double SMALL = 0.001; -static constexpr double SMALLER = 0.00001; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/dihedral_harmonic_kokkos.cpp b/src/KOKKOS/dihedral_harmonic_kokkos.cpp index 87e83a17fc..78860800be 100644 --- a/src/KOKKOS/dihedral_harmonic_kokkos.cpp +++ b/src/KOKKOS/dihedral_harmonic_kokkos.cpp @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; -static constexpr double SMALLER = 0.00001; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/domain_kokkos.cpp b/src/KOKKOS/domain_kokkos.cpp index d0af281a14..aecc12cd12 100644 --- a/src/KOKKOS/domain_kokkos.cpp +++ b/src/KOKKOS/domain_kokkos.cpp @@ -23,7 +23,6 @@ using namespace LAMMPS_NS; static constexpr double BIG = 1.0e20; -static constexpr double SMALL = 1.0e-4; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp index 5256b7f4a4..5187031d26 100644 --- a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp @@ -38,8 +38,7 @@ using namespace LAMMPS_NS; using namespace FixConst; -static constexpr double SMALL = 0.0001; -#define EV_TO_KCAL_PER_MOL 14.4 +static constexpr double EV_TO_KCAL_PER_MOL = 14.4; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp index 9b8ac91569..8bf87ca6d3 100644 --- a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp +++ b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp @@ -25,8 +25,6 @@ #include #include "atom_masks.h" -static constexpr int MAXLINE = 1024; - #ifdef DBL_EPSILON #define MY_EPSILON (10.0*DBL_EPSILON) #else diff --git a/src/KOKKOS/fix_langevin_kokkos.cpp b/src/KOKKOS/fix_langevin_kokkos.cpp index 89cf91130f..e60b1f0ec6 100644 --- a/src/KOKKOS/fix_langevin_kokkos.cpp +++ b/src/KOKKOS/fix_langevin_kokkos.cpp @@ -32,10 +32,8 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NOBIAS,BIAS}; -enum{CONSTANT,EQUAL,ATOM}; -static constexpr double SINERTIA = 0.4; // moment of inertia prefactor for sphere -static constexpr double EINERTIA = 0.2; // moment of inertia prefactor for ellipsoid +enum { NOBIAS, BIAS }; +enum { CONSTANT, EQUAL, ATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp index 06485eb1cc..b3d6b0c567 100644 --- a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp @@ -46,8 +46,7 @@ using namespace LAMMPS_NS; using namespace FixConst; -static constexpr double SMALL = 0.0001; -#define EV_TO_KCAL_PER_MOL 14.4 +static constexpr double EV_TO_KCAL_PER_MOL = 14.4; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 81489142db..45e767f415 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -41,11 +41,6 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -static constexpr int RVOUS = 1; // 0 for irregular, 1 for all2all - -static constexpr double BIG = 1.0e20; -static constexpr double MASSDELTA = 0.1; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 4b9a009df2..862ba2a52f 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -27,7 +27,6 @@ using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp b/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp index b079b734e0..7e30ab8cc7 100644 --- a/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp +++ b/src/KOKKOS/mliap_descriptor_so3_kokkos.cpp @@ -31,9 +31,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; - /* ---------------------------------------------------------------------- */ template MLIAPDescriptorSO3Kokkos::MLIAPDescriptorSO3Kokkos(LAMMPS *lmp, char *paramfilename) diff --git a/src/KOKKOS/nbin_kokkos.cpp b/src/KOKKOS/nbin_kokkos.cpp index fd8cf5771b..79ae9c6632 100644 --- a/src/KOKKOS/nbin_kokkos.cpp +++ b/src/KOKKOS/nbin_kokkos.cpp @@ -22,9 +22,6 @@ using namespace LAMMPS_NS; -static constexpr double SMALL = 1.0e-6; -#define CUT2BIN_RATIO 100 - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 9f0b1dd747..41fcac126d 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -43,8 +43,6 @@ using MathConst::MY_PI; enum{NONE,RLINEAR,RSQ}; -static constexpr int MAXLINE = 1024; - #ifdef DBL_EPSILON #define MY_EPSILON (10.0*DBL_EPSILON) #else diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index 294b451e7e..a25e1e6fde 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -37,9 +37,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index d2eb3036d6..0beb7902eb 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -36,9 +36,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 4a253c5779..b0d3ac55f6 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -41,15 +41,12 @@ using namespace MathSpecialKokkos; static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; static constexpr double SMALL = 0.00001; static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_IK_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum { REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_IK_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/region_block_kokkos.cpp b/src/KOKKOS/region_block_kokkos.cpp index 6d53514d19..8df33c32db 100644 --- a/src/KOKKOS/region_block_kokkos.cpp +++ b/src/KOKKOS/region_block_kokkos.cpp @@ -18,12 +18,11 @@ using namespace LAMMPS_NS; -static constexpr double BIG = 1.0e20; - /* ---------------------------------------------------------------------- */ template -RegBlockKokkos::RegBlockKokkos(LAMMPS *lmp, int narg, char **arg) : RegBlock(lmp, narg, arg) +RegBlockKokkos::RegBlockKokkos(LAMMPS *lmp, int narg, char **arg) + : RegBlock(lmp, narg, arg) { atomKK = (AtomKokkos*) atom; } diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index 8f79ab408c..ece8068382 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -30,18 +30,17 @@ #include "neighbor.h" #include "pair.h" -#include #include +#include using namespace LAMMPS_NS; using namespace MathConst; -#define MAX_LEVELS 10 +static constexpr int MAX_LEVELS = 10; static constexpr int OFFSET = 16384; -static constexpr double SMALL = 0.00001; -enum{REVERSE_RHO,REVERSE_AD,REVERSE_AD_PERATOM}; -enum{FORWARD_RHO,FORWARD_AD,FORWARD_AD_PERATOM}; +enum { REVERSE_RHO, REVERSE_AD, REVERSE_AD_PERATOM }; +enum { FORWARD_RHO, FORWARD_AD, FORWARD_AD_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_coul_streitz.cpp b/src/KSPACE/pair_coul_streitz.cpp index 9e3811c027..b499df3946 100644 --- a/src/KSPACE/pair_coul_streitz.cpp +++ b/src/KSPACE/pair_coul_streitz.cpp @@ -36,7 +36,6 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; static constexpr int MAXNEIGH = 24; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 0ac83c01fb..2616282973 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -50,12 +50,10 @@ static constexpr int OFFSET = 16384; static constexpr double LARGE = 10000.0; static constexpr double SMALL = 0.00001; static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum { REVERSE_RHO }; +enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_dipole.cpp b/src/KSPACE/pppm_dipole.cpp index da64f85f9e..99a0efd75e 100644 --- a/src/KSPACE/pppm_dipole.cpp +++ b/src/KSPACE/pppm_dipole.cpp @@ -42,15 +42,12 @@ using namespace MathSpecial; static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; static constexpr double SMALL = 0.00001; static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_MU}; -enum{FORWARD_MU,FORWARD_MU_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum { REVERSE_MU }; +enum { FORWARD_MU, FORWARD_MU_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_dipole_spin.cpp b/src/KSPACE/pppm_dipole_spin.cpp index 16b9e459e6..8f195a8a41 100644 --- a/src/KSPACE/pppm_dipole_spin.cpp +++ b/src/KSPACE/pppm_dipole_spin.cpp @@ -36,16 +36,11 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int MAXORDER = 7; -static constexpr int OFFSET = 16384; -static constexpr double LARGE = 10000.0; -static constexpr double SMALL = 0.00001; -static constexpr double EPS_HOC = 1.0e-7; -enum{REVERSE_MU}; -enum{FORWARD_MU,FORWARD_MU_PERATOM}; +enum { REVERSE_MU }; +enum { FORWARD_MU, FORWARD_MU_PERATOM }; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 58c91ce3be..b70dae45f9 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -44,7 +44,7 @@ static constexpr int MAXORDER = 7; static constexpr int OFFSET = 16384; static constexpr double SMALL = 0.00001; static constexpr double LARGE = 10000.0; -static constexpr double EPS_HOC = 1.0e-7; +static constexpr FFT_SCALAR ZEROF = 0.0; enum{REVERSE_RHO,REVERSE_RHO_GEOM,REVERSE_RHO_ARITH,REVERSE_RHO_NONE}; enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM, @@ -55,9 +55,6 @@ enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM, FORWARD_IK_NONE,FORWARD_AD_NONE,FORWARD_IK_PERATOM_NONE, FORWARD_AD_PERATOM_NONE}; -static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; - /* ---------------------------------------------------------------------- */ PPPMDisp::PPPMDisp(LAMMPS *lmp) : KSpace(lmp), diff --git a/src/KSPACE/pppm_disp_tip4p.cpp b/src/KSPACE/pppm_disp_tip4p.cpp index 6161ebbe09..9e2184f2a9 100644 --- a/src/KSPACE/pppm_disp_tip4p.cpp +++ b/src/KSPACE/pppm_disp_tip4p.cpp @@ -30,9 +30,7 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int OFFSET = 16384; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_stagger.cpp b/src/KSPACE/pppm_stagger.cpp index a14d7a68d6..b740d21daa 100644 --- a/src/KSPACE/pppm_stagger.cpp +++ b/src/KSPACE/pppm_stagger.cpp @@ -35,12 +35,10 @@ using namespace MathSpecial; static constexpr int OFFSET = 16384; static constexpr double EPS_HOC = 1.0e-7; - -enum{REVERSE_RHO}; -enum{FORWARD_IK,FORWARD_AD,FORWARD_IK_PERATOM,FORWARD_AD_PERATOM}; - static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; + +enum{ REVERSE_RHO }; +enum{ FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM }; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index 7237bc24f2..2a34db2b77 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -30,7 +30,6 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; static constexpr int OFFSET = 16384; /* ---------------------------------------------------------------------- */ diff --git a/src/MACHDYN/fix_smd_wall_surface.cpp b/src/MACHDYN/fix_smd_wall_surface.cpp index 3753b64f52..f8a8ef970c 100644 --- a/src/MACHDYN/fix_smd_wall_surface.cpp +++ b/src/MACHDYN/fix_smd_wall_surface.cpp @@ -32,7 +32,7 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace Eigen; using namespace std; -static constexpr int DELTA = 16384; + static constexpr double EPSILON = 1.0e-6; /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index 37e3bb404f..609e4efcf8 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -44,7 +44,6 @@ using namespace MathExtra; using namespace MathSpecial; static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; static constexpr int MAXNEIGH = 24; /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index 5ae599ea31..b4228dbb4f 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -44,7 +44,6 @@ using namespace MathExtra; using namespace MathSpecial; static constexpr int DELTA = 4; -static constexpr int PGDELTA = 1; static constexpr int MAXNEIGH = 24; /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index a2fff8fb55..669a5cadbb 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -33,8 +33,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; - /* ---------------------------------------------------------------------- */ PairEAM::PairEAM(LAMMPS *lmp) : Pair(lmp) diff --git a/src/MANYBODY/pair_edip.cpp b/src/MANYBODY/pair_edip.cpp index 0098bb32e5..1eac053ebd 100644 --- a/src/MANYBODY/pair_edip.cpp +++ b/src/MANYBODY/pair_edip.cpp @@ -39,9 +39,7 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; - static constexpr int GRIDDENSITY = 8000; static constexpr double GRIDSTART = 0.1; diff --git a/src/MANYBODY/pair_edip_multi.cpp b/src/MANYBODY/pair_edip_multi.cpp index 2f8e9ca9c8..32e21861f3 100644 --- a/src/MANYBODY/pair_edip_multi.cpp +++ b/src/MANYBODY/pair_edip_multi.cpp @@ -38,7 +38,6 @@ using namespace LAMMPS_NS; using namespace MathExtra; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; static const char cite_pair_edip[] = diff --git a/src/MANYBODY/pair_extep.cpp b/src/MANYBODY/pair_extep.cpp index bcebbd3e72..7ed65f0f71 100644 --- a/src/MANYBODY/pair_extep.cpp +++ b/src/MANYBODY/pair_extep.cpp @@ -37,7 +37,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathExtra; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; static constexpr int PGDELTA = 1; diff --git a/src/MANYBODY/pair_gw_zbl.cpp b/src/MANYBODY/pair_gw_zbl.cpp index da1ff557ad..a08cf0907f 100644 --- a/src/MANYBODY/pair_gw_zbl.cpp +++ b/src/MANYBODY/pair_gw_zbl.cpp @@ -32,7 +32,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_local_density.cpp b/src/MANYBODY/pair_local_density.cpp index 444f56f291..da405e9118 100644 --- a/src/MANYBODY/pair_local_density.cpp +++ b/src/MANYBODY/pair_local_density.cpp @@ -34,8 +34,6 @@ using namespace LAMMPS_NS; -static constexpr int MAXLINE = 1024; - static const char cite_pair_local_density[] = "pair_style local/density command: doi:10.1063/1.4958629, doi:10.1021/acs.jpcb.7b12446\n\n" "@Article{Sanyal16,\n" diff --git a/src/MANYBODY/pair_meam_spline.cpp b/src/MANYBODY/pair_meam_spline.cpp index b952330c04..e888e2274c 100644 --- a/src/MANYBODY/pair_meam_spline.cpp +++ b/src/MANYBODY/pair_meam_spline.cpp @@ -440,8 +440,6 @@ void PairMEAMSpline::coeff(int narg, char **arg) } } -static constexpr int MAXLINE = 1024; - void PairMEAMSpline::read_file(const char* filename) { int nmultichoose2; // = (n+1)*n/2; diff --git a/src/MANYBODY/pair_meam_sw_spline.cpp b/src/MANYBODY/pair_meam_sw_spline.cpp index e02625c598..5b5713dc4c 100644 --- a/src/MANYBODY/pair_meam_sw_spline.cpp +++ b/src/MANYBODY/pair_meam_sw_spline.cpp @@ -384,8 +384,6 @@ void PairMEAMSWSpline::coeff(int narg, char **arg) set coeffs for one or more type pairs ------------------------------------------------------------------------- */ -static constexpr int MAXLINE = 1024; - void PairMEAMSWSpline::read_file(const char* filename) { if (comm->me == 0) { diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index cc0b225a78..535fb766bc 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -38,10 +38,6 @@ using namespace LAMMPS_NS; using namespace MathExtra; -static constexpr int MAXLINE = 1024; -static constexpr int DELTA = 4; - - /* ---------------------------------------------------------------------- */ PairPolymorphic::PairParameters::PairParameters() diff --git a/src/MANYBODY/pair_tersoff_table.cpp b/src/MANYBODY/pair_tersoff_table.cpp index 34c3573d0c..90f29bb201 100644 --- a/src/MANYBODY/pair_tersoff_table.cpp +++ b/src/MANYBODY/pair_tersoff_table.cpp @@ -39,9 +39,7 @@ using namespace LAMMPS_NS; using MathConst::MY_PI; -static constexpr int MAXLINE = 1024; static constexpr int DELTA = 4; - static constexpr double GRIDSTART = 0.1; #define GRIDDENSITY_FCUTOFF 5000 #define GRIDDENSITY_EXP 12000 diff --git a/src/MC/fix_widom.cpp b/src/MC/fix_widom.cpp index c0a5501a22..2e48630f59 100644 --- a/src/MC/fix_widom.cpp +++ b/src/MC/fix_widom.cpp @@ -50,7 +50,6 @@ using namespace LAMMPS_NS; using namespace FixConst; using MathConst::MY_2PI; -static constexpr double MAXENERGYTEST = 1.0e50; enum { EXCHATOM, EXCHMOL }; // exchmode /* ---------------------------------------------------------------------- */ diff --git a/src/MESONT/pair_mesocnt.cpp b/src/MESONT/pair_mesocnt.cpp index eae638bde8..c8e160ab4b 100644 --- a/src/MESONT/pair_mesocnt.cpp +++ b/src/MESONT/pair_mesocnt.cpp @@ -43,7 +43,6 @@ using namespace MathExtra; using MathConst::MY_2PI; using MathConst::MY_PI; -static constexpr int MAXLINE = 1024; #define SELF_CUTOFF 3 static constexpr double SMALL = 1.0e-6; static constexpr double SWITCH = 1.0e-4; diff --git a/src/MISC/pair_agni.cpp b/src/MISC/pair_agni.cpp index 92b358316f..cbc6cf6c92 100644 --- a/src/MISC/pair_agni.cpp +++ b/src/MISC/pair_agni.cpp @@ -47,9 +47,6 @@ static const char cite_pair_agni[] = " year = {2019},\n" "}\n\n"; -static constexpr int MAXLINE = 10240; -static constexpr int MAXWORD = 40; - /* ---------------------------------------------------------------------- */ PairAGNI::PairAGNI(LAMMPS *lmp) : Pair(lmp) diff --git a/src/ML-IAP/mliap_descriptor_snap.cpp b/src/ML-IAP/mliap_descriptor_snap.cpp index 892dc8a004..e8f6eec977 100644 --- a/src/ML-IAP/mliap_descriptor_snap.cpp +++ b/src/ML-IAP/mliap_descriptor_snap.cpp @@ -32,7 +32,6 @@ using namespace LAMMPS_NS; static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; /* ---------------------------------------------------------------------- */ diff --git a/src/ML-IAP/mliap_descriptor_so3.cpp b/src/ML-IAP/mliap_descriptor_so3.cpp index 2308961913..676c53a4a8 100644 --- a/src/ML-IAP/mliap_descriptor_so3.cpp +++ b/src/ML-IAP/mliap_descriptor_so3.cpp @@ -31,7 +31,6 @@ using namespace LAMMPS_NS; static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; /* ---------------------------------------------------------------------- */ diff --git a/src/ML-IAP/mliap_model.cpp b/src/ML-IAP/mliap_model.cpp index c6df037c04..232bf18bbd 100644 --- a/src/ML-IAP/mliap_model.cpp +++ b/src/ML-IAP/mliap_model.cpp @@ -27,7 +27,6 @@ using namespace LAMMPS_NS; static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; /* ---------------------------------------------------------------------- */ diff --git a/src/ML-SNAP/pair_snap.cpp b/src/ML-SNAP/pair_snap.cpp index f0fcd5c4e7..ff6409095d 100644 --- a/src/ML-SNAP/pair_snap.cpp +++ b/src/ML-SNAP/pair_snap.cpp @@ -30,7 +30,6 @@ using namespace LAMMPS_NS; static constexpr int MAXLINE = 1024; -static constexpr int MAXWORD = 3; /* ---------------------------------------------------------------------- */ diff --git a/src/MOFFF/improper_inversion_harmonic.cpp b/src/MOFFF/improper_inversion_harmonic.cpp index cc9bd8ad94..c0de968626 100644 --- a/src/MOFFF/improper_inversion_harmonic.cpp +++ b/src/MOFFF/improper_inversion_harmonic.cpp @@ -31,13 +31,9 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperInversionHarmonic::ImproperInversionHarmonic(LAMMPS *lmp) : Improper(lmp) diff --git a/src/OPENMP/angle_cosine_omp.cpp b/src/OPENMP/angle_cosine_omp.cpp index e4e32bd769..62320b7c6c 100644 --- a/src/OPENMP/angle_cosine_omp.cpp +++ b/src/OPENMP/angle_cosine_omp.cpp @@ -24,12 +24,9 @@ #include "force.h" #include "neighbor.h" - #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleCosineOMP::AngleCosineOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/angle_cosine_periodic_omp.cpp b/src/OPENMP/angle_cosine_periodic_omp.cpp index 4abe7bd692..3d546af278 100644 --- a/src/OPENMP/angle_cosine_periodic_omp.cpp +++ b/src/OPENMP/angle_cosine_periodic_omp.cpp @@ -30,8 +30,6 @@ using namespace LAMMPS_NS; using namespace MathSpecial; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleCosinePeriodicOMP::AngleCosinePeriodicOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/angle_cosine_squared_omp.cpp b/src/OPENMP/angle_cosine_squared_omp.cpp index f14af0b3e4..9b849c62a3 100644 --- a/src/OPENMP/angle_cosine_squared_omp.cpp +++ b/src/OPENMP/angle_cosine_squared_omp.cpp @@ -24,12 +24,9 @@ #include "force.h" #include "neighbor.h" - #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleCosineSquaredOMP::AngleCosineSquaredOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/angle_dipole_omp.cpp b/src/OPENMP/angle_dipole_omp.cpp index 338c63e42e..3c771df69f 100644 --- a/src/OPENMP/angle_dipole_omp.cpp +++ b/src/OPENMP/angle_dipole_omp.cpp @@ -25,12 +25,9 @@ #include "force.h" #include "neighbor.h" - #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleDipoleOMP::AngleDipoleOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/angle_fourier_omp.cpp b/src/OPENMP/angle_fourier_omp.cpp index 27d5f62595..a11d3b6327 100644 --- a/src/OPENMP/angle_fourier_omp.cpp +++ b/src/OPENMP/angle_fourier_omp.cpp @@ -24,12 +24,9 @@ #include "force.h" #include "neighbor.h" - #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ AngleFourierOMP::AngleFourierOMP(class LAMMPS *lmp) diff --git a/src/OPENMP/dihedral_charmm_omp.cpp b/src/OPENMP/dihedral_charmm_omp.cpp index 42fbea419f..d0c38c8774 100644 --- a/src/OPENMP/dihedral_charmm_omp.cpp +++ b/src/OPENMP/dihedral_charmm_omp.cpp @@ -31,7 +31,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp b/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp index 4032f9a13d..0cffc3e245 100644 --- a/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp @@ -30,7 +30,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/dihedral_harmonic_omp.cpp b/src/OPENMP/dihedral_harmonic_omp.cpp index f8df7dd41e..fe3fb988ce 100644 --- a/src/OPENMP/dihedral_harmonic_omp.cpp +++ b/src/OPENMP/dihedral_harmonic_omp.cpp @@ -30,7 +30,6 @@ using namespace LAMMPS_NS; static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/dihedral_table_omp.cpp b/src/OPENMP/dihedral_table_omp.cpp index db90e32e6b..df1ca292c9 100644 --- a/src/OPENMP/dihedral_table_omp.cpp +++ b/src/OPENMP/dihedral_table_omp.cpp @@ -34,9 +34,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathExtra; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - // -------------------------------------------- // ------- Calculate the dihedral angle ------- // -------------------------------------------- diff --git a/src/OPENMP/ewald_omp.cpp b/src/OPENMP/ewald_omp.cpp index fc32efd3c0..8674017592 100644 --- a/src/OPENMP/ewald_omp.cpp +++ b/src/OPENMP/ewald_omp.cpp @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -static constexpr double SMALL = 0.00001; - /* ---------------------------------------------------------------------- */ EwaldOMP::EwaldOMP(LAMMPS *lmp) : Ewald(lmp), ThrOMP(lmp, THR_KSPACE) diff --git a/src/OPENMP/improper_class2_omp.cpp b/src/OPENMP/improper_class2_omp.cpp index 38a2f12f5e..8233f0bee6 100644 --- a/src/OPENMP/improper_class2_omp.cpp +++ b/src/OPENMP/improper_class2_omp.cpp @@ -29,9 +29,6 @@ #include "suffix.h" using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperClass2OMP::ImproperClass2OMP(class LAMMPS *lmp) diff --git a/src/OPENMP/improper_ring_omp.cpp b/src/OPENMP/improper_ring_omp.cpp index 366d03e02d..a1b4e31cee 100644 --- a/src/OPENMP/improper_ring_omp.cpp +++ b/src/OPENMP/improper_ring_omp.cpp @@ -31,7 +31,6 @@ using namespace LAMMPS_NS; using namespace MathSpecial; -static constexpr double TOLERANCE = 0.05; static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_brownian_omp.cpp b/src/OPENMP/pair_brownian_omp.cpp index 1506f1f35a..ecb80456d1 100644 --- a/src/OPENMP/pair_brownian_omp.cpp +++ b/src/OPENMP/pair_brownian_omp.cpp @@ -36,8 +36,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr double EPSILON = 1.0e-10; - /* ---------------------------------------------------------------------- */ PairBrownianOMP::PairBrownianOMP(LAMMPS *lmp) : diff --git a/src/OPENMP/pair_brownian_poly_omp.cpp b/src/OPENMP/pair_brownian_poly_omp.cpp index ddd1af2c01..f9db86043a 100644 --- a/src/OPENMP/pair_brownian_poly_omp.cpp +++ b/src/OPENMP/pair_brownian_poly_omp.cpp @@ -36,8 +36,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; -static constexpr double EPSILON = 1.0e-10; - /* ---------------------------------------------------------------------- */ PairBrownianPolyOMP::PairBrownianPolyOMP(LAMMPS *lmp) : diff --git a/src/OPENMP/pppm_cg_omp.cpp b/src/OPENMP/pppm_cg_omp.cpp index 0eff5c9363..6630510003 100644 --- a/src/OPENMP/pppm_cg_omp.cpp +++ b/src/OPENMP/pppm_cg_omp.cpp @@ -39,8 +39,6 @@ using namespace MathConst; using namespace MathSpecial; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; - static constexpr double EPS_HOC = 1.0e-7; /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pppm_disp_omp.cpp b/src/OPENMP/pppm_disp_omp.cpp index b610b1711e..45959dadba 100644 --- a/src/OPENMP/pppm_disp_omp.cpp +++ b/src/OPENMP/pppm_disp_omp.cpp @@ -39,7 +39,6 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr FFT_SCALAR ZEROF = 0.0; -static constexpr FFT_SCALAR ONEF = 1.0; static constexpr int OFFSET = 16384; diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 6ae21f652c..a2720a3f64 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -42,7 +42,7 @@ using namespace LAMMPS_NS; using namespace FixConst; #define MAXBODY 2 // currently 2 since only linear chains allowed -static constexpr int DELTA = 128; + static constexpr double TOLERANCE = 1.0e-6; static constexpr double EPSILON = 1.0e-7; diff --git a/src/SMTBQ/pair_smtbq.cpp b/src/SMTBQ/pair_smtbq.cpp index d262491912..4e4a6109fa 100644 --- a/src/SMTBQ/pair_smtbq.cpp +++ b/src/SMTBQ/pair_smtbq.cpp @@ -70,9 +70,6 @@ using namespace MathConst; using namespace MathExtra; using namespace MathSpecial; -static constexpr int MAXLINE = 2048; -static constexpr int MAXTOKENS = 2048; -static constexpr int DELTA = 4; static constexpr int PGDELTA = 1; static constexpr int MAXNEIGH = 24; diff --git a/src/UEF/dump_cfg_uef.cpp b/src/UEF/dump_cfg_uef.cpp index 34ef655af9..776c4675f3 100644 --- a/src/UEF/dump_cfg_uef.cpp +++ b/src/UEF/dump_cfg_uef.cpp @@ -27,8 +27,6 @@ using namespace LAMMPS_NS; static constexpr double UNWRAPEXPAND = 10.0; -static constexpr int ONEFIELD = 32; -static constexpr int DELTA = 1048576; /* ---------------------------------------------------------------------- * base method is mostly fine, just need to find the FixNHUef diff --git a/src/YAFF/improper_distharm.cpp b/src/YAFF/improper_distharm.cpp index 53658a1377..257cbce1b3 100644 --- a/src/YAFF/improper_distharm.cpp +++ b/src/YAFF/improper_distharm.cpp @@ -28,12 +28,8 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperDistHarm::ImproperDistHarm(LAMMPS *lmp) : Improper(lmp) diff --git a/src/YAFF/improper_sqdistharm.cpp b/src/YAFF/improper_sqdistharm.cpp index e85f8e4c25..f4beab3587 100644 --- a/src/YAFF/improper_sqdistharm.cpp +++ b/src/YAFF/improper_sqdistharm.cpp @@ -28,12 +28,8 @@ #include "memory.h" #include "error.h" - using namespace LAMMPS_NS; -static constexpr double TOLERANCE = 0.05; -static constexpr double SMALL = 0.001; - /* ---------------------------------------------------------------------- */ ImproperSQDistHarm::ImproperSQDistHarm(LAMMPS *lmp) : Improper(lmp) diff --git a/src/atom.cpp b/src/atom.cpp index f7f61d6ced..085ca88b4e 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -50,7 +50,6 @@ using namespace MathConst; static constexpr int DELTA = 1; static constexpr double EPSILON = 1.0e-6; -static constexpr int MAXLINE = 256; /* ---------------------------------------------------------------------- one instance per AtomVec style in style_atom.h diff --git a/src/compute_bond_local.cpp b/src/compute_bond_local.cpp index 143539d435..9ed591f73f 100644 --- a/src/compute_bond_local.cpp +++ b/src/compute_bond_local.cpp @@ -32,7 +32,6 @@ using namespace LAMMPS_NS; static constexpr int DELTA = 10000; -static constexpr double EPSILON = 1.0e-12; enum{DIST,DX,DY,DZ,VELVIB,OMEGA,ENGTRANS,ENGVIB,ENGROT,ENGPOT,FORCE,FX,FY,FZ,VARIABLE,BN}; @@ -375,13 +374,6 @@ int ComputeBondLocal::compute_bonds(int flag) engrot = 0.5 * inertia * omegasq; - // sanity check: engtotal = engtrans + engvib + engrot - - //engtot = 0.5 * (mass1*MathExtra::lensq3(v[atom1]) + - // mass2*MathExtra::lensq3(v[atom2])); - //if (fabs(engtot-engtrans-engvib-engrot) > EPSILON) - // error->one(FLERR,"Sanity check on 3 energy components failed"); - // scale energies by units mvv2e = force->mvv2e; diff --git a/src/compute_dihedral_local.cpp b/src/compute_dihedral_local.cpp index 6543c06d20..894d0e33e4 100644 --- a/src/compute_dihedral_local.cpp +++ b/src/compute_dihedral_local.cpp @@ -31,9 +31,8 @@ using namespace LAMMPS_NS; using namespace MathConst; static constexpr int DELTA = 10000; -static constexpr double SMALL = 0.001; -enum{PHI,VARIABLE}; +enum { PHI, VARIABLE }; /* ---------------------------------------------------------------------- */ diff --git a/src/compute_property_grid.cpp b/src/compute_property_grid.cpp index 6e316de3f8..7624a3b4a9 100644 --- a/src/compute_property_grid.cpp +++ b/src/compute_property_grid.cpp @@ -28,8 +28,6 @@ using namespace LAMMPS_NS; enum { LOW, CTR }; enum { UNSCALED, SCALED }; -static constexpr int DELTA = 10000; - /* ---------------------------------------------------------------------- */ ComputePropertyGrid::ComputePropertyGrid(LAMMPS *lmp, int narg, char **arg) : diff --git a/src/thermo.cpp b/src/thermo.cpp index 3d8b419991..efc5f984fc 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -93,7 +93,6 @@ static constexpr char id_press[] = "thermo_press"; static constexpr char id_pe[] = "thermo_pe"; static char fmtbuf[512]; -static constexpr int DELTA = 8; /* ---------------------------------------------------------------------- */ diff --git a/src/velocity.cpp b/src/velocity.cpp index fd4fd71f68..1f0a757d7c 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -33,13 +33,12 @@ using namespace LAMMPS_NS; -enum{CREATE,SET,SCALE,RAMP,ZERO}; -enum{ALL,LOCAL,GEOM}; -enum{UNIFORM,GAUSSIAN}; -enum{NONE,CONSTANT,EQUAL,ATOM}; +enum { CREATE, SET, SCALE, RAMP, ZERO }; +enum { ALL, LOCAL, GEOM }; +enum { UNIFORM, GAUSSIAN }; +enum { NONE, CONSTANT, EQUAL, ATOM }; static constexpr int WARMUP = 100; -static constexpr double SMALL = 0.001; /* ---------------------------------------------------------------------- */