convert defines into static constexpr
This commit is contained in:
@ -34,14 +34,14 @@ enum{MUTUAL,OPT,TCG,DIRECT};
|
||||
enum{NOFRAME,ZONLY,ZTHENX,BISECTOR,ZBISECT,THREEFOLD};
|
||||
enum{GEAR,ASPC,LSQR};
|
||||
|
||||
#define MAXLINE 65536 // crazy big for TORSION-TORSION section
|
||||
#define MAX_TYPE_PER_GROUP 6 // max types per AMOEBA group
|
||||
#define MAX_FRAME_PER_TYPE 32 // max multipole frames for any AMOEBA type
|
||||
static constexpr int MAXLINE = 65536; // crazy big for TORSION-TORSION section
|
||||
static constexpr int MAX_TYPE_PER_GROUP = 6; // max types per AMOEBA group
|
||||
static constexpr int MAX_FRAME_PER_TYPE = 32; // max multipole frames for any AMOEBA type
|
||||
|
||||
#define DELTA_TYPE_CLASS 32
|
||||
#define DELTA_VDWL_PAIR 16
|
||||
static constexpr int DELTA_TYPE_CLASS = 32;
|
||||
static constexpr int DELTA_VDWL_PAIR = 16;
|
||||
|
||||
#define BOHR 0.52917721067 // Bohr in Angstroms
|
||||
static constexpr double BOHR = 0.52917721067; // Bohr in Angstroms
|
||||
|
||||
// methods to read, parse, and store info from force field file
|
||||
|
||||
|
||||
@ -32,10 +32,10 @@ using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
using namespace MathConst;
|
||||
|
||||
#define BITORSIONMAX 6 // max # of BiTorsion terms stored by one atom
|
||||
#define LISTDELTA 10000
|
||||
#define LB_FACTOR 1.5
|
||||
#define MAXLINE 1024
|
||||
static constexpr int BITORSIONMAX = 6; // max # of BiTorsion terms stored by one atom
|
||||
static constexpr int LISTDELTA = 10000;
|
||||
static constexpr double LB_FACTOR = 1.5;
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
// spline weighting factors
|
||||
|
||||
|
||||
@ -55,14 +55,14 @@ static const char cite_user_bocs_package[] =
|
||||
"}\n\n";
|
||||
|
||||
|
||||
#define DELTAFLIP 0.1
|
||||
#define TILTMAX 1.5
|
||||
|
||||
enum{NOBIAS,BIAS};
|
||||
enum{NONE,XYZ,XY,YZ,XZ};
|
||||
enum{ISO,ANISO,TRICLINIC};
|
||||
|
||||
const int NUM_INPUT_DATA_COLUMNS = 2; // columns in the pressure correction file
|
||||
static constexpr double DELTAFLIP = 0.1;
|
||||
static constexpr double TILTMAX = 1.5;
|
||||
static constexpr int NUM_INPUT_DATA_COLUMNS = 2; // columns in the pressure correction file
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
NVT,NPH,NPT integrators for improved Nose-Hoover equations of motion
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
@ -28,12 +28,12 @@
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
#ifdef DBL_EPSILON
|
||||
#define MY_EPSILON (10.0*DBL_EPSILON)
|
||||
static constexpr double MY_EPSILON = 10.0*DBL_EPSILON;
|
||||
#else
|
||||
#define MY_EPSILON (10.0*2.220446049250313e-16)
|
||||
static constexpr double MY_EPSILON = 10.0*2.220446049250313e-16;
|
||||
#endif
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -41,13 +41,13 @@ using namespace MathSpecial;
|
||||
enum{NONE,HARMONIC};
|
||||
enum{LUCY};
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define DELTA 4
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr int DELTA = 4;
|
||||
|
||||
#ifdef DBL_EPSILON
|
||||
#define MY_EPSILON (10.0*DBL_EPSILON)
|
||||
static constexpr double MY_EPSILON = 10.0*DBL_EPSILON;
|
||||
#else
|
||||
#define MY_EPSILON (10.0*2.220446049250313e-16)
|
||||
static constexpr double MY_EPSILON = 10.0*2.220446049250313e-16;
|
||||
#endif
|
||||
|
||||
#define SparseKinetics_enableIntegralReactions (true)
|
||||
|
||||
@ -31,13 +31,13 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathSpecial;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define DELTA 4
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr int DELTA = 4;
|
||||
|
||||
#ifdef DBL_EPSILON
|
||||
#define MY_EPSILON (10.0*DBL_EPSILON)
|
||||
static constexpr double MY_EPSILON = 10.0*DBL_EPSILON;
|
||||
#else
|
||||
#define MY_EPSILON (10.0*2.220446049250313e-16)
|
||||
static constexpr double MY_EPSILON = 10.0*2.220446049250313e-16;
|
||||
#endif
|
||||
|
||||
#define oneFluidApproxParameter (-1)
|
||||
|
||||
@ -41,7 +41,7 @@ using MathConst::MY_PI;
|
||||
|
||||
enum{NONE,RLINEAR,RSQ};
|
||||
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
static const char cite_pair_multi_lucy[] =
|
||||
"pair_style multi/lucy command: doi:10.1063/1.4942520\n\n"
|
||||
|
||||
@ -43,12 +43,12 @@ using MathConst::MY_PI;
|
||||
|
||||
enum{NONE,RLINEAR,RSQ};
|
||||
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
#ifdef DBL_EPSILON
|
||||
#define MY_EPSILON (10.0*DBL_EPSILON)
|
||||
static constexpr double MY_EPSILON = 10.0*DBL_EPSILON;
|
||||
#else
|
||||
#define MY_EPSILON (10.0*2.220446049250313e-16)
|
||||
static constexpr double MY_EPSILON = 10.0*2.220446049250313e-16;
|
||||
#endif
|
||||
|
||||
#define oneFluidParameter (-1)
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace ip_simd;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define MAXWORD 3
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr int MAXWORD = 3;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ extern "C" {
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -42,8 +42,8 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathSpecialKokkos;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define DELTA 4
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr int DELTA = 4;
|
||||
|
||||
#ifdef DBL_EPSILON
|
||||
#define MY_EPSILON (10.0*DBL_EPSILON)
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define MAXWORD 3
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr int MAXWORD = 3;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -30,8 +30,8 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define MAXWORD 3
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr int MAXWORD = 3;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -26,8 +26,8 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define MAXWORD 3
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr int MAXWORD = 3;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -33,8 +33,7 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using MathSpecial::powint;
|
||||
|
||||
#define MAXLINE 1024
|
||||
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr double SMALL = 1.0e-10;
|
||||
|
||||
FitPOD::FitPOD(LAMMPS *_lmp) : Command(_lmp), podptr(nullptr)
|
||||
|
||||
@ -35,7 +35,7 @@ using MathConst::MY_PI;
|
||||
using MathSpecial::cube;
|
||||
using MathSpecial::powint;
|
||||
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
MLPOD::podstruct::podstruct() :
|
||||
twobody{4, 8, 6}, threebody{4, 8, 5, 4}, fourbody{0, 0, 0, 0}, pbc(nullptr),
|
||||
|
||||
@ -55,7 +55,7 @@ DISTRIBUTION A. Approved for public release; distribution unlimited. OPSEC#4918
|
||||
#include "rann_fingerprint_radialscreenedspin.h"
|
||||
#include "rann_fingerprint_radialspin.h"
|
||||
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
||||
@ -29,8 +29,8 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define MAXWORD 3
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr int MAXWORD = 3;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
#define MAXLINE 512
|
||||
static constexpr int MAXLINE = 512;
|
||||
|
||||
enum{FORWARD=-1,BACKWARD=1};
|
||||
|
||||
|
||||
@ -77,11 +77,12 @@ static const char cite_fix_bond_react[] =
|
||||
" pages = {9953--9961}\n"
|
||||
"}\n\n";
|
||||
|
||||
#define BIG 1.0e20
|
||||
#define DELTA 16
|
||||
#define MAXGUESS 20 // max # of guesses allowed by superimpose algorithm
|
||||
#define MAXCONARGS 14 // max # of arguments for any type of constraint + rxnID
|
||||
#define NUMVARVALS 5 // max # of keyword values that have variables as input
|
||||
"fix bond/react: reacter.org doi:10.1016/j.polymer.2017.09.038, "
|
||||
static constexpr double BIG = 1.0e20;
|
||||
static constexpr int DELTA = 16;
|
||||
static constexpr int MAXGUESS = 20; // max # of guesses allowed by superimpose algorithm
|
||||
static constexpr int MAXCONARGS = 14; // max # of arguments for any type of constraint + rxnID
|
||||
static constexpr int NUMVARVALS = 5; // max # of keyword values that have variables as input
|
||||
|
||||
// various statuses of superimpose algorithm:
|
||||
// ACCEPT: site successfully matched to pre-reacted template
|
||||
|
||||
@ -36,9 +36,9 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
#define MAXLINE 256
|
||||
#define CHUNK 1024
|
||||
#define ATTRIBUTE_PERLINE 4
|
||||
static constexpr int MAXLINE = 256;
|
||||
static constexpr int CHUNK = 1024;
|
||||
static constexpr int ATTRIBUTE_PERLINE = 4;
|
||||
|
||||
enum { DEFAULT, TERSE, VERBOSE };
|
||||
|
||||
|
||||
@ -62,10 +62,11 @@ static const char cite_neb_spin[] =
|
||||
"doi={10.1016/j.cpc.2015.07.001}\n"
|
||||
"}\n\n";
|
||||
|
||||
#define MAXLINE 256
|
||||
#define CHUNK 1024
|
||||
static constexpr int MAXLINE = 256;
|
||||
static constexpr int CHUNK = 1024;
|
||||
|
||||
// 8 attributes: tag, spin norm, position (3), spin direction (3)
|
||||
#define ATTRIBUTE_PERLINE 8
|
||||
static constexpr int ATTRIBUTE_PERLINE = 8;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ using MathConst::DEG2RAD;
|
||||
using MathConst::RAD2DEG;
|
||||
|
||||
static constexpr double epsilon = 6.5e-6;
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AngleWrite::command(int narg, char **arg)
|
||||
|
||||
@ -35,7 +35,7 @@ using MathConst::DEG2RAD;
|
||||
using MathConst::RAD2DEG;
|
||||
|
||||
static constexpr double epsilon = 6.5e-6;
|
||||
#define MAXLINE 1024
|
||||
static constexpr int MAXLINE = 1024;
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void DihedralWrite::command(int narg, char **arg)
|
||||
|
||||
@ -31,11 +31,11 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 256
|
||||
#define EPSILON 1.0e-7
|
||||
#define BIG 1.0e20
|
||||
static constexpr int MAXLINE = 1024;
|
||||
static constexpr double EPSILON = 1.0e-7;
|
||||
static constexpr double BIG = 1.0e20;
|
||||
|
||||
#define SINERTIA 0.4 // moment of inertia prefactor for sphere
|
||||
static constexpr double SINERTIA = 0.4; // moment of inertia prefactor for sphere
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 128
|
||||
static constexpr int MAXLINE = 128;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define MAXLINE 256
|
||||
static constexpr int MAXLINE = 256;
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
create & initialize the universe of processors in communicator
|
||||
|
||||
Reference in New Issue
Block a user