diff --git a/src/KOKKOS/atom_vec_kokkos.cpp b/src/KOKKOS/atom_vec_kokkos.cpp index 2cb70a8c87..779e977b09 100644 --- a/src/KOKKOS/atom_vec_kokkos.cpp +++ b/src/KOKKOS/atom_vec_kokkos.cpp @@ -19,8 +19,6 @@ #include "error.h" #include "domain.h" -#define DELTA 10 // much smaller than atom_vec.cpp - using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -35,10 +33,13 @@ AtomVecKokkos::AtomVecKokkos(LAMMPS *lmp) : AtomVec(lmp) no_border_vel_flag = 1; } +static constexpr bigint DELTA=10; // much smaller than DELTA in atom_vec.cpp + /* ---------------------------------------------------------------------- roundup N so it is a multiple of DELTA error if N exceeds 32-bit int, since will be used as arg to grow() overload needed because Kokkos uses a smaller DELTA than in atom_vec.cpp + and an exponential instead of a linear growth ------------------------------------------------------------------------- */ bigint AtomVecKokkos::roundup(bigint n) diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index e464d31b77..4406ac5f23 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -29,9 +29,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -#define DELTA 16384 -#define DELTA_BONUS 8192 - /* ---------------------------------------------------------------------- */ AtomVec::AtomVec(LAMMPS *lmp) : Pointers(lmp) @@ -188,6 +185,8 @@ void AtomVec::init() error->all(FLERR,"KOKKOS package requires a kokkos enabled atom_style"); } +static constexpr bigint DELTA=16384; + /* ---------------------------------------------------------------------- roundup N so it is a multiple of DELTA error if N exceeds 32-bit int, since will be used as arg to grow() @@ -211,6 +210,8 @@ void AtomVec::grow_nmax() nmax += DELTA; } +static constexpr bigint DELTA_BONUS=8192; + /* ---------------------------------------------------------------------- grow nmax_bonus so it is a multiple of DELTA_BONUS ------------------------------------------------------------------------- */