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

clear svector for every invocation. document changes

parent 41d9dbff
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -62,7 +62,10 @@ pair styles do not define any additional quantities, so N = 0. An
example of ones that do are the "granular pair styles"_pair_gran.html
which calculate the tangential force between two particles and return
its components and magnitude acting on atom I for N = 1,2,3,4.  See
individual pair styles for details.
individual pair styles for details. When using hybrid pair styles,
these quantities are the combined lists of the individual quantities
for the pair styles active for a given pair of atom types padded with
zeros.

The value {dist} will be in distance "units"_units.html.  The value
{eng} will be in energy "units"_units.html.  The values {force}, {fx},
+2 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ void PairHybrid::flags()
    if (styles[m]->compute_flag) compute_flag = 1;
  }

  // single_extra = sum of all sub-style single_extra
  // single_extra = list all sub-style single_extra
  // allocate svector

  single_extra = 0;
@@ -759,6 +759,7 @@ double PairHybrid::single(int i, int j, int itype, int jtype,
  fforce = 0.0;
  double esum = 0.0;
  int n = 0;
  if (single_extra) memset(svector,0,single_extra*sizeof(double));

  for (int m = 0; m < nmap[itype][jtype]; m++) {
    if (rsq < styles[map[itype][jtype][m]]->cutsq[itype][jtype]) {