Unverified Commit 37d56a6b authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

small cleanup in "deprecated" styles

parent 94e9b3bc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@ void AngleDeprecated::settings(int, char **)
      utils::logmesg(lmp,"\nAngle style 'DEPRECATED' is a dummy style\n\n");
    return;
  }

  lmp->error->all(FLERR,"This angle style is no longer available");
  error->all(FLERR,"This angle style is no longer available");
}

+1 −2
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@ void BondDeprecated::settings(int, char **)
      utils::logmesg(lmp,"\nBond style 'DEPRECATED' is a dummy style\n\n");
    return;
  }

  lmp->error->all(FLERR,"This bond style is no longer available");
  error->all(FLERR,"This bond style is no longer available");
}

+1 −2
Original line number Diff line number Diff line
@@ -31,6 +31,5 @@ ComputeDeprecated::ComputeDeprecated(LAMMPS *lmp, int narg, char **arg) :
      utils::logmesg(lmp,"\nCompute style 'DEPRECATED' is a dummy style\n\n");
    return;
  }

  lmp->error->all(FLERR,"This compute style is no longer available");
  error->all(FLERR,"This compute style is no longer available");
}
+6 −9
Original line number Diff line number Diff line
@@ -24,13 +24,6 @@

using namespace LAMMPS_NS;

static void writemsg(LAMMPS *lmp, const std::string &msg, int abend=1)
{
  if (lmp->comm->me == 0) utils::logmesg(lmp,msg);
  if (abend)
    lmp->error->all(FLERR,"This command is no longer available");
}

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

void Deprecated::command(int /* narg */, char ** /* arg */)
@@ -38,8 +31,12 @@ void Deprecated::command(int /* narg */, char ** /* arg */)
  const std::string cmd = input->command;

  if (cmd == "DEPRECATED") {
    writemsg(lmp,"\nCommand 'DEPRECATED' is a dummy command\n\n",0);
    if (lmp->comm->me == 0)
      utils::logmesg(lmp,"\nCommand 'DEPRECATED' is a dummy command\n\n");
    return;
  } else if (cmd == "reset_ids") {
    writemsg(lmp,"\n'reset_ids' has been renamed to 'reset_atom_ids'\n\n");
    if (lmp->comm->me == 0)
      utils::logmesg(lmp,"\n'reset_ids' has been renamed to 'reset_atom_ids'\n\n");
  }
  error->all(FLERR,"This command is no longer available");
}
+1 −2
Original line number Diff line number Diff line
@@ -45,6 +45,5 @@ void DihedralDeprecated::settings(int, char **)
      utils::logmesg(lmp,"\nDihedral style 'DEPRECATED' is a dummy style\n\n");
    return;
  }

  lmp->error->all(FLERR,"This dihedral style is no longer available");
  error->all(FLERR,"This dihedral style is no longer available");
}
Loading