mirror of https://github.com/lammps/lammps.git
Add copymode protection to class2 styles
This commit is contained in:
parent
ccaec315db
commit
5f93fad012
|
@ -41,6 +41,8 @@ AngleClass2::AngleClass2(LAMMPS *lmp) : Angle(lmp) {}
|
|||
|
||||
AngleClass2::~AngleClass2()
|
||||
{
|
||||
if (copymode) return;
|
||||
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(setflag_a);
|
||||
|
|
|
@ -36,6 +36,8 @@ BondClass2::BondClass2(LAMMPS *lmp) : Bond(lmp) {}
|
|||
|
||||
BondClass2::~BondClass2()
|
||||
{
|
||||
if (copymode) return;
|
||||
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(r0);
|
||||
|
|
|
@ -46,6 +46,8 @@ DihedralClass2::DihedralClass2(LAMMPS *lmp) : Dihedral(lmp)
|
|||
|
||||
DihedralClass2::~DihedralClass2()
|
||||
{
|
||||
if (copymode) return;
|
||||
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(setflag_d);
|
||||
|
|
|
@ -45,6 +45,8 @@ ImproperClass2::ImproperClass2(LAMMPS *lmp) : Improper(lmp)
|
|||
|
||||
ImproperClass2::~ImproperClass2()
|
||||
{
|
||||
if (copymode) return;
|
||||
|
||||
if (allocated) {
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(setflag_i);
|
||||
|
|
Loading…
Reference in New Issue