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

Fixed initialization of arrays in computes

parent 1f3ef8e0
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,8 @@ using namespace std;
/* ---------------------------------------------------------------------- */
ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
distsq(NULL), nearest(NULL), rlist(NULL), qlist(NULL), qnarray(NULL), qnm_r(NULL), qnm_i(NULL)
{
if (narg < 3 ) error->all(FLERR,"Illegal compute orientorder/atom command");
......@@ -109,13 +110,7 @@ ComputeOrientOrderAtom::ComputeOrientOrderAtom(LAMMPS *lmp, int narg, char **arg
size_peratom_cols = ncol;
nmax = 0;
qnarray = NULL;
maxneigh = 0;
distsq = NULL;
nearest = NULL;
rlist = NULL;
qnm_r = NULL;
qnm_i = NULL;
}
/* ---------------------------------------------------------------------- */
......
......@@ -26,7 +26,8 @@ enum{EPAIR,EVDWL,ECOUL};
/* ---------------------------------------------------------------------- */
ComputePair::ComputePair(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
pstyle(NULL), pair(NULL), one(NULL)
{
if (narg < 4 || narg > 5) error->all(FLERR,"Illegal compute pair command");
......
......@@ -36,7 +36,8 @@ enum{TYPE,RADIUS};
/* ---------------------------------------------------------------------- */
ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
pstyle(NULL), pindex(NULL), vector(NULL), array(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal compute pair/local command");
......@@ -96,8 +97,6 @@ ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
if (pstyle[i] != DIST) singleflag = 1;
nmax = 0;
vector = NULL;
array = NULL;
}
/* ---------------------------------------------------------------------- */
......
......@@ -33,7 +33,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputePEAtom::ComputePEAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
energy(NULL)
{
if (narg < 3) error->all(FLERR,"Illegal compute pe/atom command");
......@@ -68,7 +69,6 @@ ComputePEAtom::ComputePEAtom(LAMMPS *lmp, int narg, char **arg) :
}
nmax = 0;
energy = NULL;
}
/* ---------------------------------------------------------------------- */
......
......@@ -34,7 +34,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg),
vptr(NULL), id_temp(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal compute pressure command");
if (igroup) error->all(FLERR,"Compute pressure must use group all");
......
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