Unverified Commit 4ac7a26f authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add support for extracting r0 array to bond style zero

parent 6b1dbe23
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -144,8 +144,6 @@ void BondZero::write_data(FILE *fp)
    fprintf(fp,"%d %g\n",i,r0[i]);
}



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

double BondZero::single(int /*type*/, double /*rsq*/, int /*i*/, int /*j*/,
@@ -153,3 +151,12 @@ double BondZero::single(int /*type*/, double /*rsq*/, int /*i*/, int /*j*/,
{
  return 0.0;
}

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

void *BondZero::extract(const char *str, int &dim)
{
  dim = 1;
  if (strcmp(str,"r0")==0) return (void*) r0;
  return NULL;
}
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ class BondZero : public Bond {
  void write_data(FILE *);

  double single(int, double, int, int, double &);
  virtual void *extract(const char *, int &);

 protected:
  double *r0;