diff --git a/src/USER-INTEL/pair_sw_intel.cpp b/src/USER-INTEL/pair_sw_intel.cpp index 1955cd2e6d..a15f255199 100644 --- a/src/USER-INTEL/pair_sw_intel.cpp +++ b/src/USER-INTEL/pair_sw_intel.cpp @@ -1292,6 +1292,11 @@ void PairSWIntel::ForceConst::set_ntypes(const int ntypes, _memory->destroy(op2e); _memory->destroy(op3); } + memory->destroy(p2); + memory->create(p2f); + memory->create(p2f2); + memory->create(p2e); + memory->create(p3); if (ntypes > 0) { _cop = cop; memory->create(p2,ntypes,ntypes,"fc.p2"); diff --git a/src/USER-INTEL/pair_sw_intel.h b/src/USER-INTEL/pair_sw_intel.h index 36e39e3e85..973caa5daf 100644 --- a/src/USER-INTEL/pair_sw_intel.h +++ b/src/USER-INTEL/pair_sw_intel.h @@ -87,7 +87,7 @@ class PairSWIntel : public PairSW { fc_packed2 **p2e; fc_packed3 ***p3; - ForceConst() : _ntypes(0) {} + ForceConst() : _ntypes(0), p2(0), p2f(0), p2f2(0), p2e(0), p3(0) {} ~ForceConst() { set_ntypes(0, NULL, _cop); } void set_ntypes(const int ntypes, Memory *memory, const int cop);