Fixed initialization of arrays in computes/fixes in MC package

This commit is contained in:
Anders Hafreager 2016-08-25 16:15:13 +02:00 committed by Axel Kohlmeyer
parent f9a21ae654
commit 48ba812f0a
6 changed files with 15 additions and 12 deletions

View File

@ -56,7 +56,8 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */
FixAtomSwap::FixAtomSwap(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
idregion(NULL), type_list(NULL), mu(NULL), qtype(NULL), sqrt_mass_ratio(NULL), random_equal(NULL), random_unequal(NULL)
{
if (narg < 10) error->all(FLERR,"Illegal fix atom/swap command");
@ -68,8 +69,6 @@ FixAtomSwap::FixAtomSwap(LAMMPS *lmp, int narg, char **arg) :
extvector = 0;
restart_global = 1;
time_depend = 1;
type_list = NULL;
qtype = NULL;
// required args

View File

@ -36,7 +36,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
partner(NULL), finalpartner(NULL), distsq(NULL), broken(NULL), copy(NULL), random(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix bond/break command");
@ -98,11 +99,8 @@ FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) :
// allocate arrays local to this fix
nmax = 0;
partner = finalpartner = NULL;
distsq = NULL;
maxbreak = 0;
broken = NULL;
// copy = special list for one atom
// size = ms^2 + ms is sufficient

View File

@ -39,7 +39,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixBondCreate::FixBondCreate(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
bondcount(NULL), partner(NULL), finalpartner(NULL), distsq(NULL), created(NULL), copy(NULL), random(NULL)
{
if (narg < 8) error->all(FLERR,"Illegal fix bond/create command");

View File

@ -52,7 +52,8 @@ static const char cite_fix_bond_swap[] =
/* ---------------------------------------------------------------------- */
FixBondSwap::FixBondSwap(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
tflag(0), alist(NULL), id_temp(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_bond_swap);

View File

@ -58,7 +58,10 @@ enum{ATOM,MOLECULE};
/* ---------------------------------------------------------------------- */
FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
idregion(NULL), full_flag(0), ngroups(0), groupstrings(NULL), ngrouptypes(0), grouptypestrings(NULL),
grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL),
coords(NULL), imageflags(NULL), idshake(NULL)
{
if (narg < 11) error->all(FLERR,"Illegal fix gcmc command");

View File

@ -37,7 +37,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixTFMC::FixTFMC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
xd(NULL), rotflag(0)
{
if (narg < 6) error->all(FLERR,"Illegal fix tfmc command");