Initialized pointers in MISC and MOLECULE

This commit is contained in:
Anders Hafreager 2016-11-07 17:15:48 +01:00
parent 77bbf03f0f
commit 1ff75eaba2
12 changed files with 30 additions and 12 deletions

View File

@ -36,7 +36,8 @@ enum{PAIR,TAIL,KSPACE};
/* ---------------------------------------------------------------------- */
ComputeTI::ComputeTI(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), nterms(0), which(NULL), ivar1(NULL), ivar2(NULL),
ilo(NULL), ihi(NULL), var1(NULL), var2(NULL), pptr(NULL), pstyle(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal compute ti command");

View File

@ -53,7 +53,8 @@ int xdr3dfcoord(XDR *, float *, int *, float *);
/* ---------------------------------------------------------------------- */
DumpXTC::DumpXTC(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg)
DumpXTC::DumpXTC(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg),
coords(NULL)
{
if (narg != 5) error->all(FLERR,"Illegal dump xtc command");
if (binary || compressed || multifile || multiproc)

View File

@ -45,7 +45,9 @@ enum{DIST_UNIFORM,DIST_GAUSSIAN};
/* ---------------------------------------------------------------------- */
FixDeposit::FixDeposit(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), idregion(NULL), idrigid(NULL),
idshake(NULL), onemols(NULL), molfrac(NULL), coords(NULL), imageflags(NULL),
fixrigid(NULL), fixshake(NULL), random(NULL)
{
if (narg < 7) error->all(FLERR,"Illegal fix deposit command");

View File

@ -41,7 +41,8 @@ enum{NONE,CONSTANT,EQUAL,ATOM};
/* ---------------------------------------------------------------------- */
FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), xstr(NULL), ystr(NULL), zstr(NULL),
estr(NULL), idregion(NULL), efield(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix efield command");

View File

@ -35,7 +35,7 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixEvaporate::FixEvaporate(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), idregion(NULL), list(NULL), mark(NULL), random(NULL)
{
if (narg < 7) error->all(FLERR,"Illegal fix evaporate command");

View File

@ -43,7 +43,8 @@ using namespace FixConst;
------------------------------------------------------------------------- */
FixGLD::FixGLD(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
step_respa(NULL), prony_c(NULL), prony_tau(NULL), s_gld(NULL), random(NULL)
{
int narg_min = 8;
// Check to make sure we have the minimal number of inputs

View File

@ -57,7 +57,8 @@ static const char cite_fix_orient_bcc[] =
/* ---------------------------------------------------------------------- */
FixOrientBCC::FixOrientBCC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
xifilename(NULL), chifilename(NULL), order(NULL), nbr(NULL), sort(NULL), list(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_orient_bcc);

View File

@ -54,7 +54,8 @@ static const char cite_fix_orient_fcc[] =
/* ---------------------------------------------------------------------- */
FixOrientFCC::FixOrientFCC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
xifilename(NULL), chifilename(NULL), order(NULL), nbr(NULL), sort(NULL), list(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_orient_fcc);

View File

@ -36,7 +36,8 @@ using namespace FixConst;
FixThermalConductivity::FixThermalConductivity(LAMMPS *lmp,
int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
index_lo(NULL), index_hi(NULL), ke_lo(NULL), ke_hi(NULL)
{
if (narg < 6) error->all(FLERR,"Illegal fix thermal/conductivity command");

View File

@ -40,7 +40,12 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixTTM::FixTTM(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
random(NULL), fp(NULL), fpr(NULL), nsum(NULL), nsum_all(NULL),
T_initial_set(NULL), gfactor1(NULL), gfactor2(NULL), ratio(NULL),
flangevin(NULL), T_electron(NULL), T_electron_old(NULL), sum_vsq(NULL),
sum_mass_vsq(NULL), sum_vsq_all(NULL), sum_mass_vsq_all(NULL),
net_energy_transfer(NULL), net_energy_transfer_all(NULL)
{
if (narg < 15) error->all(FLERR,"Illegal fix ttm command");

View File

@ -37,7 +37,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixViscosity::FixViscosity(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg),
pos_index(NULL), neg_index(NULL), pos_delta(NULL), neg_delta(NULL)
{
if (narg < 7) error->all(FLERR,"Illegal fix viscosity command");

View File

@ -62,7 +62,10 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */
FixCMAP::FixCMAP(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
FixCMAP::FixCMAP(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg),
crosstermlist(NULL), num_crossterm(NULL), crossterm_type(NULL), crossterm_atom1(NULL),
crossterm_atom2(NULL), crossterm_atom3(NULL), crossterm_atom4(NULL), crossterm_atom5(NULL),
g_axis(NULL), cmapgrid(NULL), d1cmapgrid(NULL), d2cmapgrid(NULL), d12cmapgrid(NULL)
{
if (narg != 4) error->all(FLERR,"Illegal fix cmap command");