forked from lijiext/lammps
Fixed initialization of arrays in computes/fixes in MC package
This commit is contained in:
parent
f9a21ae654
commit
48ba812f0a
|
@ -56,7 +56,8 @@ using namespace MathConst;
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixAtomSwap::FixAtomSwap(LAMMPS *lmp, int narg, char **arg) :
|
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");
|
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;
|
extvector = 0;
|
||||||
restart_global = 1;
|
restart_global = 1;
|
||||||
time_depend = 1;
|
time_depend = 1;
|
||||||
type_list = NULL;
|
|
||||||
qtype = NULL;
|
|
||||||
|
|
||||||
// required args
|
// required args
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@ using namespace FixConst;
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixBondBreak::FixBondBreak(LAMMPS *lmp, int narg, char **arg) :
|
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");
|
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
|
// allocate arrays local to this fix
|
||||||
|
|
||||||
nmax = 0;
|
nmax = 0;
|
||||||
partner = finalpartner = NULL;
|
|
||||||
distsq = NULL;
|
|
||||||
|
|
||||||
maxbreak = 0;
|
maxbreak = 0;
|
||||||
broken = NULL;
|
|
||||||
|
|
||||||
// copy = special list for one atom
|
// copy = special list for one atom
|
||||||
// size = ms^2 + ms is sufficient
|
// size = ms^2 + ms is sufficient
|
||||||
|
|
|
@ -39,7 +39,8 @@ using namespace FixConst;
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixBondCreate::FixBondCreate(LAMMPS *lmp, int narg, char **arg) :
|
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");
|
if (narg < 8) error->all(FLERR,"Illegal fix bond/create command");
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,8 @@ static const char cite_fix_bond_swap[] =
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixBondSwap::FixBondSwap(LAMMPS *lmp, int narg, char **arg) :
|
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);
|
if (lmp->citeme) lmp->citeme->add(cite_fix_bond_swap);
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,10 @@ enum{ATOM,MOLECULE};
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
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");
|
if (narg < 11) error->all(FLERR,"Illegal fix gcmc command");
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,8 @@ using namespace FixConst;
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixTFMC::FixTFMC(LAMMPS *lmp, int narg, char **arg) :
|
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");
|
if (narg < 6) error->all(FLERR,"Illegal fix tfmc command");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue