NULLed ptrs in files

This commit is contained in:
Anders Hafreager 2016-11-07 16:07:37 +01:00
parent f8226e8ae5
commit 45f2e86dd6
9 changed files with 30 additions and 15 deletions

View File

@ -32,7 +32,8 @@ int Fix::instance_total = 0;
/* ---------------------------------------------------------------------- */
Fix::Fix(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp),
id(NULL), style(NULL), eatom(NULL), vatom(NULL)
id(NULL), style(NULL), extlist(NULL), vector_atom(NULL), array_atom(NULL),
vector_local(NULL), array_local(NULL), eatom(NULL), vatom(NULL)
{
instance_me = instance_total++;

View File

@ -37,7 +37,16 @@ using namespace MathConst;
/* ---------------------------------------------------------------------- */
Molecule::Molecule(LAMMPS *lmp, int narg, char **arg, int &index) :
Pointers(lmp)
Pointers(lmp), id(NULL), x(NULL), type(NULL), q(NULL), radius(NULL),
rmass(NULL), num_bond(NULL), bond_type(NULL), bond_atom(NULL),
num_angle(NULL), angle_type(NULL), angle_atom1(NULL), angle_atom2(NULL),
angle_atom3(NULL), num_dihedral(NULL), dihedral_type(NULL), dihedral_atom1(NULL),
dihedral_atom2(NULL), dihedral_atom3(NULL), dihedral_atom4(NULL), num_improper(NULL),
improper_type(NULL), improper_atom1(NULL), improper_atom2(NULL),
improper_atom3(NULL), improper_atom4(NULL), nspecial(NULL), special(NULL),
shake_flag(NULL), shake_atom(NULL), shake_type(NULL), avec_body(NULL), ibodyparams(NULL),
dbodyparams(NULL), dx(NULL), dxcom(NULL), dxbody(NULL), quat_external(NULL),
fp(NULL), count(NULL)
{
me = comm->me;

View File

@ -31,15 +31,12 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp)
PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp),
styles(NULL), keywords(NULL), multiple(NULL), nmap(NULL),
map(NULL), special_lj(NULL), special_coul(NULL)
{
nstyles = 0;
styles = NULL;
keywords = NULL;
multiple = NULL;
special_lj = NULL;
special_coul = NULL;
outerflag = 0;
respaflag = 0;

View File

@ -22,7 +22,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
RanMars::RanMars(LAMMPS *lmp, int seed) : Pointers(lmp)
RanMars::RanMars(LAMMPS *lmp, int seed) : Pointers(lmp),
u(NULL)
{
int ij,kl,i,j,k,l,ii,jj,m;
double s,t;

View File

@ -28,7 +28,8 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
Region::Region(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
Region::Region(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp),
id(NULL), style(NULL), contact(NULL), list(NULL), xstr(NULL), ystr(NULL), zstr(NULL), tstr(NULL)
{
int n = strlen(arg[0]) + 1;
id = new char[n];

View File

@ -30,7 +30,7 @@ enum{CONSTANT,VARIABLE};
/* ---------------------------------------------------------------------- */
RegCylinder::RegCylinder(LAMMPS *lmp, int narg, char **arg) :
Region(lmp, narg, arg)
Region(lmp, narg, arg), rstr(NULL)
{
options(narg-8,&arg[8]);

View File

@ -23,8 +23,10 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
RegIntersect::RegIntersect(LAMMPS *lmp, int narg, char **arg) :
Region(lmp, narg, arg)
Region(lmp, narg, arg), idsub(NULL)
{
nregion = 0;
if (narg < 5) error->all(FLERR,"Illegal region command");
int n = force->inumeric(FLERR,arg[2]);
if (n < 2) error->all(FLERR,"Illegal region command");

View File

@ -24,8 +24,10 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
RegUnion::RegUnion(LAMMPS *lmp, int narg, char **arg) : Region(lmp, narg, arg)
RegUnion::RegUnion(LAMMPS *lmp, int narg, char **arg) : Region(lmp, narg, arg),
idsub(NULL)
{
nregion = 0;
if (narg < 5) error->all(FLERR,"Illegal region command");
int n = force->inumeric(FLERR,arg[2]);
if (n < 2) error->all(FLERR,"Illegal region command");

View File

@ -44,8 +44,10 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
Respa::Respa(LAMMPS *lmp, int narg, char **arg) : Integrate(lmp, narg, arg)
Respa::Respa(LAMMPS *lmp, int narg, char **arg) : Integrate(lmp, narg, arg),
step(NULL), loop(NULL), hybrid_level(NULL), hybrid_compute(NULL), newton(NULL), fix_respa(NULL)
{
nhybrid_styles = 0;
if (narg < 1) error->all(FLERR,"Illegal run_style respa command");
nlevels = force->inumeric(FLERR,arg[0]);