diff --git a/src/fix_move.cpp b/src/fix_move.cpp index f5f7b8cadd457eddab99561b7aa72ba5be8a8768..3c079773820c1110cf5412911161b05a9b4cc8fe 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -47,7 +47,9 @@ enum{EQUAL,ATOM}; /* ---------------------------------------------------------------------- */ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) + Fix(lmp, narg, arg), + xvarstr(NULL), yvarstr(NULL), zvarstr(NULL), vxvarstr(NULL), vyvarstr(NULL), vzvarstr(NULL), + xoriginal(NULL), toriginal(NULL), qoriginal(NULL), displace(NULL), velocity(NULL) { if (narg < 4) error->all(FLERR,"Illegal fix move command"); @@ -65,9 +67,7 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : // parse args int iarg; - xvarstr = yvarstr = zvarstr = NULL; - vxvarstr = vyvarstr = vzvarstr = NULL; - + if (strcmp(arg[3],"linear") == 0) { if (narg < 7) error->all(FLERR,"Illegal fix move command"); iarg = 7; @@ -255,9 +255,6 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : // perform initial allocation of atom-based array // register with Atom class - xoriginal = NULL; - toriginal = NULL; - qoriginal = NULL; grow_arrays(atom->nmax); atom->add_callback(0); atom->add_callback(1); diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 3ce7c4e302abaf7bf2b36098a65830991dd791d5..e2ce97db43cfed0df5deb2fde1c66b7b4f581ba8 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -50,7 +50,11 @@ enum{ISO,ANISO,TRICLINIC}; NVT,NPH,NPT integrators for improved Nose-Hoover equations of motion ---------------------------------------------------------------------- */ -FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) +FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), +tstat_flag(0), pstat_flag(0), +rfix(NULL), id_dilate(NULL), irregular(NULL), id_temp(NULL), id_press(NULL), +tcomputeflag(0), pcomputeflag(0), eta(NULL), eta_dot(NULL), eta_dotdot(NULL), +eta_mass(NULL), etap(NULL), etap_dot(NULL), etap_dotdot(NULL), etap_mass(NULL), mpchain(0) { if (narg < 4) error->all(FLERR,"Illegal fix nvt/npt/nph command");