Commit 265cc141 authored by Anders Hafreager's avatar Anders Hafreager Committed by Axel Kohlmeyer
Browse files

Fixed initialization of arrays in fixes

parent fd05a132
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -37,7 +37,8 @@ enum{ISO,ANISO};
/* ---------------------------------------------------------------------- */

FixPressBerendsen::FixPressBerendsen(LAMMPS *lmp, int narg, char **arg) :
  Fix(lmp, narg, arg)
  Fix(lmp, narg, arg),
  id_temp(NULL), id_press(NULL), tflag(0), pflag(0)
{
  if (narg < 5) error->all(FLERR,"Illegal fix press/berendsen command");

+2 −1
Original line number Diff line number Diff line
@@ -28,7 +28,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */

FixPrint::FixPrint(LAMMPS *lmp, int narg, char **arg) :
  Fix(lmp, narg, arg)
  Fix(lmp, narg, arg),
  fp(NULL), string(NULL), copy(NULL), work(NULL)
{
  if (narg < 5) error->all(FLERR,"Illegal fix print command");
  nevery = force->inumeric(FLERR,arg[3]);
+2 −1
Original line number Diff line number Diff line
@@ -29,7 +29,8 @@ enum{MOLECULE,CHARGE,RMASS,INTEGER,DOUBLE};
/* ---------------------------------------------------------------------- */

FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) :
  Fix(lmp, narg, arg)
  Fix(lmp, narg, arg),
  nvalue(0), style(NULL), index(NULL), astyle(NULL)
{
  if (narg < 4) error->all(FLERR,"Illegal fix property/atom command");

+2 −3
Original line number Diff line number Diff line
@@ -23,7 +23,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */

FixReadRestart::FixReadRestart(LAMMPS *lmp, int narg, char **arg) :
  Fix(lmp, narg, arg)
  Fix(lmp, narg, arg),
  count(NULL), extra(NULL)
{
  nextra = force->inumeric(FLERR,arg[3]);
  int nfix = force->inumeric(FLERR,arg[4]);
@@ -31,8 +32,6 @@ FixReadRestart::FixReadRestart(LAMMPS *lmp, int narg, char **arg) :
  // perform initial allocation of atom-based array
  // register with Atom class

  count = NULL;
  extra = NULL;
  grow_arrays(atom->nmax);
  atom->add_callback(0);

+2 −1
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */

FixRespa::FixRespa(LAMMPS *lmp, int narg, char **arg) :
  Fix(lmp, narg, arg)
  Fix(lmp, narg, arg),
  store_torque(0), f_level(NULL), t_level(NULL)
{
  // nlevels = # of rRESPA levels

Loading