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

@ -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)");
}