Fixed initialization of arrays in fixes

This commit is contained in:
Anders Hafreager 2016-08-25 15:37:04 +02:00 committed by Axel Kohlmeyer
parent 36e085e393
commit d6b9d0b9b6
3 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,8 @@ enum{NONE=0,EDGE,CONSTANT,VARIABLE};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) : FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg) Fix(lmp, narg, arg),
nwall(0)
{ {
scalar_flag = 1; scalar_flag = 1;
vector_flag = 1; vector_flag = 1;
@ -47,7 +48,6 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
// parse args // parse args
nwall = 0;
int scaleflag = 1; int scaleflag = 1;
fldflag = 0; fldflag = 0;
int pbcflag = 0; int pbcflag = 0;

View File

@ -34,7 +34,8 @@ enum{NONE=0,EDGE,CONSTANT,VARIABLE};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
FixWallReflect::FixWallReflect(LAMMPS *lmp, int narg, char **arg) : FixWallReflect::FixWallReflect(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg) Fix(lmp, narg, arg),
nwall(0)
{ {
if (narg < 4) error->all(FLERR,"Illegal fix wall/reflect command"); if (narg < 4) error->all(FLERR,"Illegal fix wall/reflect command");

View File

@ -34,7 +34,8 @@ enum{LJ93,LJ126,COLLOID,HARMONIC};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
FixWallRegion::FixWallRegion(LAMMPS *lmp, int narg, char **arg) : FixWallRegion::FixWallRegion(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg) Fix(lmp, narg, arg),
idregion(NULL)
{ {
if (narg != 8) error->all(FLERR,"Illegal fix wall/region command"); if (narg != 8) error->all(FLERR,"Illegal fix wall/region command");