Fixed initialization of arrays in computes

This commit is contained in:
Anders Hafreager
2016-08-24 16:38:30 +02:00
committed by Axel Kohlmeyer
parent 1f3ef8e0ee
commit fcd54f02e6
5 changed files with 10 additions and 14 deletions

View File

@ -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;
}
/* ---------------------------------------------------------------------- */