Initializing pointers in USER-DIFFRACTION and USER-DPD

This commit is contained in:
Anders Hafreager
2016-11-07 20:51:36 +01:00
parent 77bbf03f0f
commit 616420cda8
10 changed files with 21 additions and 12 deletions

View File

@ -49,7 +49,7 @@ static const char cite_compute_saed_c[] =
/* ---------------------------------------------------------------------- */
ComputeSAED::ComputeSAED(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), ztype(NULL), store_tmp(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_compute_saed_c);

View File

@ -50,7 +50,7 @@ static const char cite_compute_xrd_c[] =
/* ---------------------------------------------------------------------- */
ComputeXRD::ComputeXRD(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), ztype(NULL), store_tmp(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_compute_xrd_c);

View File

@ -44,7 +44,8 @@ enum{FIRST,MULTI};
/* ---------------------------------------------------------------------- */
FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), ids(NULL), fp(NULL), vector(NULL),
vector_total(NULL), vector_list(NULL), compute_saed(NULL), filename(NULL)
{
if (narg < 7) error->all(FLERR,"Illegal fix saed/vtk command");

View File

@ -35,7 +35,7 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
ComputeDpdAtom::ComputeDpdAtom(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
Compute(lmp, narg, arg), dpdAtom(NULL)
{
if (narg != 3) error->all(FLERR,"Illegal compute dpd/atom command");
@ -43,8 +43,7 @@ ComputeDpdAtom::ComputeDpdAtom(LAMMPS *lmp, int narg, char **arg) :
size_peratom_cols = 4;
nmax = 0;
dpdAtom = NULL;
if (atom->dpd_flag != 1) error->all(FLERR,"compute dpd requires atom_style with internal temperature and energies (e.g. dpd)");
}

View File

@ -31,7 +31,7 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixEOStable::FixEOStable(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), ntables(0), tables(NULL)
{
if (narg != 7) error->all(FLERR,"Illegal fix eos/table command");
restart_peratom = 1;

View File

@ -34,7 +34,8 @@ using namespace FixConst;
/* ---------------------------------------------------------------------- */
FixEOStableRX::FixEOStableRX(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), ntables(0), tables(NULL),
tables2(NULL), dHf(NULL), eosSpecies(NULL)
{
if (narg != 8) error->all(FLERR,"Illegal fix eos/table/rx command");
restart_peratom = 1;

View File

@ -60,7 +60,13 @@ double getElapsedTime( const TimerType &t0, const TimerType &t1) { return t1-t0;
/* ---------------------------------------------------------------------- */
FixRX::FixRX(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), mol2param(NULL), nreactions(0),
params(NULL), Arr(NULL), nArr(NULL), Ea(NULL), tempExp(NULL),
stoich(NULL), stoichReactants(NULL), stoichProducts(NULL), kR(NULL),
pairDPDE(NULL), dpdThetaLocal(NULL), sumWeights(NULL), sparseKinetics_nu(NULL),
sparseKinetics_nuk(NULL), sparseKinetics_inu(NULL), sparseKinetics_isIntegralReaction(NULL),
kineticsFile(NULL), id_fix_species(NULL),
id_fix_species_old(NULL), fix_species(NULL), fix_species_old(NULL)
{
if (narg < 7 || narg > 12) error->all(FLERR,"Illegal fix rx command");
restart_peratom = 1;

View File

@ -83,7 +83,7 @@ static const char cite_fix_shardlow[] =
/* ---------------------------------------------------------------------- */
FixShardlow::FixShardlow(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
Fix(lmp, narg, arg), pairDPD(NULL), pairDPDE(NULL), v_t0(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_fix_shardlow);

View File

@ -54,7 +54,8 @@ static const char cite_pair_multi_lucy[] =
/* ---------------------------------------------------------------------- */
PairMultiLucy::PairMultiLucy(LAMMPS *lmp) : Pair(lmp)
PairMultiLucy::PairMultiLucy(LAMMPS *lmp) : Pair(lmp),
ntables(0), tables(NULL), tabindex(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_pair_multi_lucy);

View File

@ -59,7 +59,8 @@ static const char cite_pair_multi_lucy_rx[] =
/* ---------------------------------------------------------------------- */
PairMultiLucyRX::PairMultiLucyRX(LAMMPS *lmp) : Pair(lmp)
PairMultiLucyRX::PairMultiLucyRX(LAMMPS *lmp) : Pair(lmp),
ntables(0), tables(NULL), tabindex(NULL), site1(NULL), site2(NULL)
{
if (lmp->citeme) lmp->citeme->add(cite_pair_multi_lucy_rx);