Commit 3c94f7d5 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add pointer Force class to temporarily hold the name of the restarted pair style

parent c2c49395
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -78,6 +78,8 @@ Force::Force(LAMMPS *lmp) : Pointers(lmp)
  kspace_style = new char[n];
  strcpy(kspace_style,str);

  pair_restart = NULL;

  // fill pair map with pair styles listed in style_pair.h

  pair_map = new PairCreatorMap();
@@ -146,6 +148,8 @@ Force::~Force()
  delete [] improper_style;
  delete [] kspace_style;

  delete [] pair_restart;

  if (pair) delete pair;
  if (bond) delete bond;
  if (angle) delete angle;
@@ -197,8 +201,10 @@ void Force::create_pair(const char *style, int trysuffix)
{
  delete [] pair_style;
  if (pair) delete pair;
  if (pair_restart) delete [] pair_restart;
  pair_style = NULL;
  pair = NULL;
  pair_restart = NULL;

  int sflag;
  pair = new_pair(style,trysuffix,sflag);
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ class Force : protected Pointers {

  class Pair *pair;
  char *pair_style;
  char *pair_restart;

  class Bond *bond;
  char *bond_style;