Add copymode protection to class2 styles
This commit is contained in:
@ -41,6 +41,8 @@ AngleClass2::AngleClass2(LAMMPS *lmp) : Angle(lmp) {}
|
|||||||
|
|
||||||
AngleClass2::~AngleClass2()
|
AngleClass2::~AngleClass2()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(setflag_a);
|
memory->destroy(setflag_a);
|
||||||
|
|||||||
@ -36,6 +36,8 @@ BondClass2::BondClass2(LAMMPS *lmp) : Bond(lmp) {}
|
|||||||
|
|
||||||
BondClass2::~BondClass2()
|
BondClass2::~BondClass2()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(r0);
|
memory->destroy(r0);
|
||||||
|
|||||||
@ -46,6 +46,8 @@ DihedralClass2::DihedralClass2(LAMMPS *lmp) : Dihedral(lmp)
|
|||||||
|
|
||||||
DihedralClass2::~DihedralClass2()
|
DihedralClass2::~DihedralClass2()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(setflag_d);
|
memory->destroy(setflag_d);
|
||||||
|
|||||||
@ -45,6 +45,8 @@ ImproperClass2::ImproperClass2(LAMMPS *lmp) : Improper(lmp)
|
|||||||
|
|
||||||
ImproperClass2::~ImproperClass2()
|
ImproperClass2::~ImproperClass2()
|
||||||
{
|
{
|
||||||
|
if (copymode) return;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy(setflag);
|
memory->destroy(setflag);
|
||||||
memory->destroy(setflag_i);
|
memory->destroy(setflag_i);
|
||||||
|
|||||||
Reference in New Issue
Block a user