handle the case when the bond style is recreated after a restart

This commit is contained in:
Axel Kohlmeyer
2023-03-07 20:18:41 -05:00
parent 010b030b56
commit fd2cda66bb

View File

@ -40,7 +40,7 @@ BondHarmonicRestrain::BondHarmonicRestrain(LAMMPS *_lmp) : Bond(_lmp), initial(n
BondHarmonicRestrain::~BondHarmonicRestrain()
{
modify->delete_fix("BOND_RESTRAIN");
if (initial) modify->delete_fix("BOND_RESTRAIN");
if (allocated) {
memory->destroy(setflag);
memory->destroy(k);