Unverified Commit b975d59d authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

make use of copymode flag in pair style destructors consistent

parent 8f90d6c6
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -38,7 +38,8 @@ PairLJClass2::PairLJClass2(LAMMPS *lmp) : Pair(lmp)

PairLJClass2::~PairLJClass2()
{
  if (!copymode) {
  if (copymode) return;

  if (allocated) {
    memory->destroy(setflag);
    memory->destroy(cutsq);
@@ -53,7 +54,6 @@ PairLJClass2::~PairLJClass2()
    memory->destroy(offset);
  }
}
}

/* ---------------------------------------------------------------------- */

+17 −17
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@ PairLJClass2CoulCut::PairLJClass2CoulCut(LAMMPS *lmp) : Pair(lmp)

PairLJClass2CoulCut::~PairLJClass2CoulCut()
{
  if (!copymode) {
  if (copymode) return;

  if (allocated) {
    memory->destroy(setflag);
    memory->destroy(cutsq);
@@ -57,7 +58,6 @@ PairLJClass2CoulCut::~PairLJClass2CoulCut()
    memory->destroy(offset);
  }
}
}

/* ---------------------------------------------------------------------- */

+15 −15
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ PairLJClass2CoulLong::PairLJClass2CoulLong(LAMMPS *lmp) : Pair(lmp)

PairLJClass2CoulLong::~PairLJClass2CoulLong()
{
  if (!copymode) {
  if (copymode) return;

  if (allocated) {
    memory->destroy(setflag);
    memory->destroy(cutsq);
@@ -65,7 +66,6 @@ PairLJClass2CoulLong::~PairLJClass2CoulLong()
    memory->destroy(lj4);
    memory->destroy(offset);
  }
  }
  if (ftable) free_tables();
}

+16 −16
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ PairBuckCoulLong::PairBuckCoulLong(LAMMPS *lmp) : Pair(lmp)

PairBuckCoulLong::~PairBuckCoulLong()
{
  if (!copymode) {
  if (copymode) return;

  if (allocated) {
    memory->destroy(setflag);
    memory->destroy(cutsq);
@@ -67,7 +68,6 @@ PairBuckCoulLong::~PairBuckCoulLong()
  }
  if (ftable) free_tables();
}
}

/* ---------------------------------------------------------------------- */

+7 −7
Original line number Diff line number Diff line
@@ -55,7 +55,8 @@ PairCoulLong::PairCoulLong(LAMMPS *lmp) : Pair(lmp)

PairCoulLong::~PairCoulLong()
{
  if (!copymode) {
  if (copymode) return;

  if (allocated) {
    memory->destroy(setflag);
    memory->destroy(cutsq);
@@ -64,7 +65,6 @@ PairCoulLong::~PairCoulLong()
  }
  if (ftable) free_tables();
}
}

/* ---------------------------------------------------------------------- */

Loading