initialize all pointers to null, reorder to match definition

This commit is contained in:
Axel Kohlmeyer
2024-06-23 03:55:10 -04:00
parent 3c81badc5c
commit 79cc64766b
5 changed files with 22 additions and 21 deletions

View File

@ -31,12 +31,12 @@
using namespace LAMMPS_NS;
enum{SCALAR,VECTOR,ARRAY};
enum { SCALAR, VECTOR, ARRAY };
ComputePODAtom::ComputePODAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg), list(nullptr), map(nullptr), pod(nullptr), elements(nullptr)
Compute(lmp, narg, arg), list(nullptr), podptr(nullptr), pod(nullptr), tmpmem(nullptr),
rij(nullptr), elements(nullptr), map(nullptr)
{
int nargmin = 6;
if (narg < nargmin) error->all(FLERR, "Illegal compute {} command", style);

View File

@ -31,10 +31,12 @@
using namespace LAMMPS_NS;
enum{SCALAR,VECTOR,ARRAY};
enum { SCALAR, VECTOR, ARRAY };
ComputePODGlobal::ComputePODGlobal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg), list(nullptr), map(nullptr), pod(nullptr), elements(nullptr)
Compute(lmp, narg, arg), list(nullptr), podptr(nullptr), pod(nullptr), tmpmem(nullptr),
rij(nullptr), elements(nullptr), map(nullptr), ai(nullptr), aj(nullptr), ti(nullptr),
tj(nullptr)
{
array_flag = 1;
extarray = 0;

View File

@ -31,10 +31,12 @@
using namespace LAMMPS_NS;
enum{SCALAR,VECTOR,ARRAY};
enum { SCALAR, VECTOR, ARRAY };
ComputePODLocal::ComputePODLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg), list(nullptr), map(nullptr), pod(nullptr), elements(nullptr)
Compute(lmp, narg, arg), list(nullptr), podptr(nullptr), pod(nullptr), tmpmem(nullptr),
rij(nullptr), elements(nullptr), map(nullptr), ai(nullptr), aj(nullptr), ti(nullptr),
tj(nullptr)
{
array_flag = 1;
extarray = 0;

View File

@ -31,12 +31,13 @@
using namespace LAMMPS_NS;
enum{SCALAR,VECTOR,ARRAY};
enum { SCALAR, VECTOR, ARRAY };
ComputePODDAtom::ComputePODDAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg), list(nullptr), map(nullptr), pod(nullptr), elements(nullptr)
Compute(lmp, narg, arg), list(nullptr), podptr(nullptr), pod(nullptr), tmpmem(nullptr),
rij(nullptr), elements(nullptr), map(nullptr), ai(nullptr), aj(nullptr), ti(nullptr),
tj(nullptr)
{
int nargmin = 6;
if (narg < nargmin) error->all(FLERR, "Illegal compute {} command", style);

View File

@ -1,3 +1,4 @@
// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/ Sandia National Laboratories
@ -38,18 +39,13 @@ using MathSpecial::powint;
// constructor
EAPOD::EAPOD(LAMMPS *_lmp, const std::string &pod_file, const std::string &coeff_file) :
Pointers(_lmp), elemindex(nullptr), Phi(nullptr), Lambda(nullptr), Proj(nullptr),
Centroids(nullptr), bd(nullptr), bdd(nullptr), pd(nullptr), pdd(nullptr), coeff(nullptr), tmpmem(nullptr), tmpint(nullptr),
pn3(nullptr), pq3(nullptr), pc3(nullptr), pq4(nullptr), pa4(nullptr), pb4(nullptr), pc4(nullptr),
ind23(nullptr), ind32(nullptr), ind33(nullptr), ind34(nullptr), ind43(nullptr), ind44(nullptr)
Pointers(_lmp), elemindex(nullptr), Phi(nullptr), Lambda(nullptr), coeff(nullptr),
tmpmem(nullptr), Proj(nullptr), Centroids(nullptr), bd(nullptr), bdd(nullptr), pd(nullptr),
pdd(nullptr), pn3(nullptr), pq3(nullptr), pc3(nullptr), pq4(nullptr), pa4(nullptr),
pb4(nullptr), pc4(nullptr), tmpint(nullptr), ind23(nullptr), ind32(nullptr), ind33(nullptr),
ind34(nullptr), ind43(nullptr), ind44(nullptr), ind33l(nullptr), ind33r(nullptr),
ind34l(nullptr), ind34r(nullptr), ind44l(nullptr), ind44r(nullptr)
{
ind33l = nullptr;
ind33r = nullptr;
ind34l = nullptr;
ind34r = nullptr;
ind44l = nullptr;
ind44r = nullptr;
rin = 0.5;
rcut = 5.0;
nClusters = 1;