From 616420cda841bbdd46c140f775a8e9e95c448362 Mon Sep 17 00:00:00 2001 From: Anders Hafreager <andershaf@gmail.com> Date: Mon, 7 Nov 2016 20:51:36 +0100 Subject: [PATCH] Initializing pointers in USER-DIFFRACTION and USER-DPD --- src/USER-DIFFRACTION/compute_saed.cpp | 2 +- src/USER-DIFFRACTION/compute_xrd.cpp | 2 +- src/USER-DIFFRACTION/fix_saed_vtk.cpp | 3 ++- src/USER-DPD/compute_dpd_atom.cpp | 5 ++--- src/USER-DPD/fix_eos_table.cpp | 2 +- src/USER-DPD/fix_eos_table_rx.cpp | 3 ++- src/USER-DPD/fix_rx.cpp | 8 +++++++- src/USER-DPD/fix_shardlow.cpp | 2 +- src/USER-DPD/pair_multi_lucy.cpp | 3 ++- src/USER-DPD/pair_multi_lucy_rx.cpp | 3 ++- 10 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/USER-DIFFRACTION/compute_saed.cpp b/src/USER-DIFFRACTION/compute_saed.cpp index fc76a8f867..cc1dec96fa 100644 --- a/src/USER-DIFFRACTION/compute_saed.cpp +++ b/src/USER-DIFFRACTION/compute_saed.cpp @@ -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); diff --git a/src/USER-DIFFRACTION/compute_xrd.cpp b/src/USER-DIFFRACTION/compute_xrd.cpp index 5d30cfc877..f56409f57c 100644 --- a/src/USER-DIFFRACTION/compute_xrd.cpp +++ b/src/USER-DIFFRACTION/compute_xrd.cpp @@ -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); diff --git a/src/USER-DIFFRACTION/fix_saed_vtk.cpp b/src/USER-DIFFRACTION/fix_saed_vtk.cpp index d06c4a681a..064a40ae25 100644 --- a/src/USER-DIFFRACTION/fix_saed_vtk.cpp +++ b/src/USER-DIFFRACTION/fix_saed_vtk.cpp @@ -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"); diff --git a/src/USER-DPD/compute_dpd_atom.cpp b/src/USER-DPD/compute_dpd_atom.cpp index ffac09c48e..5770ed451b 100644 --- a/src/USER-DPD/compute_dpd_atom.cpp +++ b/src/USER-DPD/compute_dpd_atom.cpp @@ -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)"); } diff --git a/src/USER-DPD/fix_eos_table.cpp b/src/USER-DPD/fix_eos_table.cpp index 854f6a4a78..04293c0e17 100644 --- a/src/USER-DPD/fix_eos_table.cpp +++ b/src/USER-DPD/fix_eos_table.cpp @@ -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; diff --git a/src/USER-DPD/fix_eos_table_rx.cpp b/src/USER-DPD/fix_eos_table_rx.cpp index 85c3a6dd2a..e10ce96089 100644 --- a/src/USER-DPD/fix_eos_table_rx.cpp +++ b/src/USER-DPD/fix_eos_table_rx.cpp @@ -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; diff --git a/src/USER-DPD/fix_rx.cpp b/src/USER-DPD/fix_rx.cpp index cd23addda9..a9601f43f0 100644 --- a/src/USER-DPD/fix_rx.cpp +++ b/src/USER-DPD/fix_rx.cpp @@ -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; diff --git a/src/USER-DPD/fix_shardlow.cpp b/src/USER-DPD/fix_shardlow.cpp index 22022945ad..e16c81c5bb 100644 --- a/src/USER-DPD/fix_shardlow.cpp +++ b/src/USER-DPD/fix_shardlow.cpp @@ -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); diff --git a/src/USER-DPD/pair_multi_lucy.cpp b/src/USER-DPD/pair_multi_lucy.cpp index a4ea8cad22..8e94495344 100644 --- a/src/USER-DPD/pair_multi_lucy.cpp +++ b/src/USER-DPD/pair_multi_lucy.cpp @@ -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); diff --git a/src/USER-DPD/pair_multi_lucy_rx.cpp b/src/USER-DPD/pair_multi_lucy_rx.cpp index 586e58908d..cd107f1519 100644 --- a/src/USER-DPD/pair_multi_lucy_rx.cpp +++ b/src/USER-DPD/pair_multi_lucy_rx.cpp @@ -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); -- GitLab