initialize cut_respa to NULL in constructor to avoid uninitialized access

This commit is contained in:
Axel Kohlmeyer
2020-02-14 15:51:38 -05:00
parent 9bff431553
commit 381ac888c8
10 changed files with 9 additions and 1 deletions

View File

@ -47,6 +47,7 @@ PairBornCoulLong::PairBornCoulLong(LAMMPS *lmp) : Pair(lmp)
ewaldflag = pppmflag = 1; ewaldflag = pppmflag = 1;
ftable = NULL; ftable = NULL;
writedata = 1; writedata = 1;
cut_respa = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -52,6 +52,7 @@ PairBuckLongCoulLong::PairBuckLongCoulLong(LAMMPS *lmp) : Pair(lmp)
writedata = 1; writedata = 1;
ftable = NULL; ftable = NULL;
fdisptable = NULL; fdisptable = NULL;
cut_respa = NULL;
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------

View File

@ -46,6 +46,7 @@ PairCoulLong::PairCoulLong(LAMMPS *lmp) : Pair(lmp)
ewaldflag = pppmflag = 1; ewaldflag = pppmflag = 1;
ftable = NULL; ftable = NULL;
qdist = 0.0; qdist = 0.0;
cut_respa = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -51,6 +51,7 @@ PairLJCharmmCoulLong::PairLJCharmmCoulLong(LAMMPS *lmp) : Pair(lmp)
implicit = 0; implicit = 0;
mix_flag = ARITHMETIC; mix_flag = ARITHMETIC;
writedata = 1; writedata = 1;
cut_respa = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -55,6 +55,7 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp)
implicit = 0; implicit = 0;
mix_flag = ARITHMETIC; mix_flag = ARITHMETIC;
writedata = 1; writedata = 1;
cut_respa = NULL;
// short-range/long-range flag accessed by DihedralCharmmfsw // short-range/long-range flag accessed by DihedralCharmmfsw

View File

@ -53,6 +53,7 @@ PairLJCutCoulLong::PairLJCutCoulLong(LAMMPS *lmp) : Pair(lmp)
writedata = 1; writedata = 1;
ftable = NULL; ftable = NULL;
qdist = 0.0; qdist = 0.0;
cut_respa = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -55,6 +55,7 @@ PairLJLongCoulLong::PairLJLongCoulLong(LAMMPS *lmp) : Pair(lmp)
ftable = NULL; ftable = NULL;
fdisptable = NULL; fdisptable = NULL;
qdist = 0.0; qdist = 0.0;
cut_respa = NULL;
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------

View File

@ -55,7 +55,6 @@ class PairCoulStreitz : public Pair {
// Kspace parameters // Kspace parameters
int kspacetype; int kspacetype;
double cut_coul, cut_coulsq; double cut_coul, cut_coulsq;
double *cut_respa;
double **scale; double **scale;
// Wolf // Wolf

View File

@ -41,6 +41,7 @@ PairLJ96Cut::PairLJ96Cut(LAMMPS *lmp) : Pair(lmp)
{ {
respa_enable = 1; respa_enable = 1;
writedata = 1; writedata = 1;
cut_respa = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -40,6 +40,7 @@ using namespace MathConst;
PairMIECut::PairMIECut(LAMMPS *lmp) : Pair(lmp) PairMIECut::PairMIECut(LAMMPS *lmp) : Pair(lmp)
{ {
respa_enable = 1; respa_enable = 1;
cut_respa = NULL;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */