diff --git a/src/compute_hexorder_atom.cpp b/src/compute_hexorder_atom.cpp index cf9bd6d09f..93b84080bc 100644 --- a/src/compute_hexorder_atom.cpp +++ b/src/compute_hexorder_atom.cpp @@ -44,7 +44,8 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ ComputeHexOrderAtom::ComputeHexOrderAtom(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), + distsq(NULL), nearest(NULL), qnarray(NULL) { if (narg < 3 ) error->all(FLERR,"Illegal compute hexorder/atom command"); @@ -87,10 +88,7 @@ ComputeHexOrderAtom::ComputeHexOrderAtom(LAMMPS *lmp, int narg, char **arg) : size_peratom_cols = ncol; nmax = 0; - qnarray = NULL; maxneigh = 0; - distsq = NULL; - nearest = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/compute_improper.cpp b/src/compute_improper.cpp index 961ddb2c1e..32c5811af1 100644 --- a/src/compute_improper.cpp +++ b/src/compute_improper.cpp @@ -24,7 +24,8 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ComputeImproper::ComputeImproper(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), + emine(NULL) { if (narg != 3) error->all(FLERR,"Illegal compute improper command"); diff --git a/src/compute_improper_local.cpp b/src/compute_improper_local.cpp index 3c0af24a10..b9d69dc5b8 100644 --- a/src/compute_improper_local.cpp +++ b/src/compute_improper_local.cpp @@ -35,7 +35,8 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), + vector(NULL), array(NULL) { if (narg < 4) error->all(FLERR,"Illegal compute improper/local command"); @@ -57,8 +58,6 @@ ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) : } nmax = 0; - vector = NULL; - array = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/compute_inertia_chunk.cpp b/src/compute_inertia_chunk.cpp index c4e83fa4a1..1e3c595ed1 100644 --- a/src/compute_inertia_chunk.cpp +++ b/src/compute_inertia_chunk.cpp @@ -26,7 +26,9 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), + idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), + inertia(NULL), inertiaall(NULL) { if (narg != 4) error->all(FLERR,"Illegal compute inertia/chunk command"); @@ -48,9 +50,6 @@ ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) : nchunk = 1; maxchunk = 0; - massproc = masstotal = NULL; - com = comall = NULL; - inertia = inertiaall = NULL; allocate(); } diff --git a/src/compute_ke_atom.cpp b/src/compute_ke_atom.cpp index aa893981a4..da159669de 100644 --- a/src/compute_ke_atom.cpp +++ b/src/compute_ke_atom.cpp @@ -26,7 +26,8 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ComputeKEAtom::ComputeKEAtom(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), + ke(NULL) { if (narg != 3) error->all(FLERR,"Illegal compute ke/atom command"); @@ -34,7 +35,6 @@ ComputeKEAtom::ComputeKEAtom(LAMMPS *lmp, int narg, char **arg) : size_peratom_cols = 0; nmax = 0; - ke = NULL; } /* ---------------------------------------------------------------------- */ diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index 7f005d2759..f2e82fe239 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -26,7 +26,8 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), + id_fix(NULL) { if (narg < 3) error->all(FLERR,"Illegal compute msd command"); diff --git a/src/compute_msd_chunk.cpp b/src/compute_msd_chunk.cpp index 30eee1d64a..bc5a374fad 100644 --- a/src/compute_msd_chunk.cpp +++ b/src/compute_msd_chunk.cpp @@ -28,7 +28,8 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), + idchunk(NULL), id_fix(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), msd(NULL) { if (narg != 4) error->all(FLERR,"Illegal compute msd/chunk command"); @@ -47,10 +48,6 @@ ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) : firstflag = 1; init(); - massproc = masstotal = NULL; - com = comall = NULL; - msd = NULL; - // create a new fix STORE style for reference positions // id = compute-ID + COMPUTE_STORE, fix group = compute group // do not know size of array at this point, just allocate 1x3 array diff --git a/src/compute_omega_chunk.cpp b/src/compute_omega_chunk.cpp index 54e0b8f906..58acc19c37 100644 --- a/src/compute_omega_chunk.cpp +++ b/src/compute_omega_chunk.cpp @@ -26,7 +26,8 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ComputeOmegaChunk::ComputeOmegaChunk(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) + Compute(lmp, narg, arg), + idchunk(NULL), massproc(NULL), masstotal(NULL), com(NULL), comall(NULL), angmom(NULL), angmomall(NULL) { if (narg != 4) error->all(FLERR,"Illegal compute omega/chunk command"); @@ -48,9 +49,6 @@ ComputeOmegaChunk::ComputeOmegaChunk(LAMMPS *lmp, int narg, char **arg) : nchunk = 1; maxchunk = 0; - massproc = masstotal = NULL; - com = comall = NULL; - angmom = angmomall = NULL; allocate(); }