be more thorough in initializing optional data in pair style dpd/fdt/energy

This commit is contained in:
Axel Kohlmeyer 2016-11-18 16:18:47 -05:00
parent a5bde82e37
commit e175a18bdb
1 changed files with 5 additions and 4 deletions

View File

@ -43,6 +43,9 @@ using namespace LAMMPS_NS;
PairDPDfdtEnergy::PairDPDfdtEnergy(LAMMPS *lmp) : Pair(lmp)
{
random = NULL;
duCond = NULL;
duMech = NULL;
splitFDT_flag = false;
comm_reverse = 2;
}
@ -59,10 +62,8 @@ PairDPDfdtEnergy::~PairDPDfdtEnergy()
memory->destroy(a0);
memory->destroy(sigma);
memory->destroy(kappa);
if (!splitFDT_flag) {
memory->destroy(duCond);
memory->destroy(duMech);
}
memory->destroy(duCond);
memory->destroy(duMech);
}
if (random) delete random;