skip deleting internal data before setup has been run

This commit is contained in:
Axel Kohlmeyer
2017-06-23 10:37:00 -04:00
parent 7a4a569859
commit 05fbf93455

View File

@ -84,10 +84,11 @@ PairReaxCOMP::PairReaxCOMP(LAMMPS *lmp) : PairReaxC(lmp), ThrOMP(lmp, THR_PAIR)
PairReaxCOMP::~PairReaxCOMP()
{
reax_list * bonds = lists+BONDS;
for (int i=0; i<bonds->num_intrs; ++i)
sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction");
if (setup_flag) {
reax_list * bonds = lists+BONDS;
for (int i=0; i<bonds->num_intrs; ++i)
sfree(bonds->select.bond_list[i].bo_data.CdboReduction, "CdboReduction");
}
memory->destroy(num_nbrs_offset);
#ifdef OMP_TIMING