Commit 8aecefe2 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

fix uninitialized data bug in compute adf

parent 2140caa6
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -275,20 +275,19 @@ ComputeADF::~ComputeADF()

void ComputeADF::init()
{
  double mycutneigh;
  double maxouter;
  double mycutneigh = 0.0;
  double maxouter = 0.0;

  if (!cutflag) {
    if (!force->pair)
      error->all(FLERR,"Compute adf requires a pair style be defined "
                 "or outer cutoff specified");
                 "or an outer cutoff specified");
    rcutinnerj[0] = 0.0;
    rcutinnerk[0] = 0.0;
    rcutouterj[0] = force->pair->cutforce;
    rcutouterk[0] = force->pair->cutforce;
    maxouter = force->pair->cutforce;;
  } else {
    maxouter = 0.0;
    for (int m = 0; m < ntriples; m++) {
      maxouter = MAX(rcutouterj[m],maxouter);
      maxouter = MAX(rcutouterk[m],maxouter);