Skip to content
Snippets Groups Projects
Commit 95dde5c0 authored by Anders Hafreager's avatar Anders Hafreager Committed by Axel Kohlmeyer
Browse files

Fixed initialization of arrays in computes

parent d09a8573
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,8 @@ enum{NCOMMON,NBOND,MAXBOND,MINBOND};
/* ---------------------------------------------------------------------- */
ComputeCNAAtom::ComputeCNAAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
nearest(NULL), nnearest(NULL), pattern(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal compute cna/atom command");
......@@ -54,9 +55,6 @@ ComputeCNAAtom::ComputeCNAAtom(LAMMPS *lmp, int narg, char **arg) :
cutsq = cutoff*cutoff;
nmax = 0;
nearest = NULL;
nnearest = NULL;
pattern = NULL;
}
/* ---------------------------------------------------------------------- */
......
......@@ -28,7 +28,8 @@ enum{ONCE,NFREQ,EVERY};
/* ---------------------------------------------------------------------- */
ComputeCOMChunk::ComputeCOMChunk(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
idchunk(NULL), masstotal(NULL), massproc(NULL), com(NULL), comall(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal compute com/chunk command");
......@@ -50,8 +51,6 @@ ComputeCOMChunk::ComputeCOMChunk(LAMMPS *lmp, int narg, char **arg) :
nchunk = 1;
maxchunk = 0;
massproc = masstotal = NULL;
com = comall = NULL;
allocate();
firstflag = massneed = 1;
......
......@@ -32,7 +32,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeContactAtom::ComputeContactAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
contact(NULL)
{
if (narg != 3) error->all(FLERR,"Illegal compute contact/atom command");
......@@ -41,7 +42,6 @@ ComputeContactAtom::ComputeContactAtom(LAMMPS *lmp, int narg, char **arg) :
comm_reverse = 1;
nmax = 0;
contact = NULL;
// error checks
......
......@@ -32,7 +32,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
typelo(NULL), typehi(NULL), cvec(NULL), carray(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal compute coord/atom command");
......@@ -65,8 +66,6 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
else size_peratom_cols = ncol;
nmax = 0;
cvec = NULL;
carray = NULL;
}
/* ---------------------------------------------------------------------- */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment