Commit 40fd97bd authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

silence warnings about cases, that cannot happen

(cherry picked from commit 60bf26bad9c6f43bc4af63b97bcc3cb6bc3f9afc)
parent 8492212c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ void FixController::end_of_step()

  // invoke compute if not previously invoked

  double current;
  double current = 0.0;

  if (pvwhich == COMPUTE) {
    if (pvindex == 0) {
+2 −1
Original line number Diff line number Diff line
@@ -59,8 +59,9 @@ void ImbalanceVar::compute(double *weight)
{
  if (_id >= 0) {
    const int all = _lmp->group->find("all");
    const int nlocal = _lmp->atom->nlocal;
    if (all < 0) return;

    const int nlocal = _lmp->atom->nlocal;
    double *val = new double[nlocal];
    _lmp->input->variable->compute_atom(_id,all,val,1,0);
    for (int i = 0; i < nlocal; ++i) weight[i] *= val[i];
+1 −1
Original line number Diff line number Diff line
@@ -898,7 +898,7 @@ double Variable::compute_equal(int ivar)
    error->all(FLERR,"Variable has circular dependency");
  eval_in_progress[ivar] = 1;

  double value;
  double value = 0.0;
  if (style[ivar] == EQUAL) value = evaluate(data[ivar][0],NULL);
  else if (style[ivar] == INTERNAL) value = dvalue[ivar];
  else if (style[ivar] == PYTHON) {