diff --git a/src/angle_deprecated.cpp b/src/angle_deprecated.cpp index 968445f3f1..fb3f90ec28 100644 --- a/src/angle_deprecated.cpp +++ b/src/angle_deprecated.cpp @@ -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"); } diff --git a/src/bond_deprecated.cpp b/src/bond_deprecated.cpp index 7bd65b795d..0d91f73ea7 100644 --- a/src/bond_deprecated.cpp +++ b/src/bond_deprecated.cpp @@ -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"); } diff --git a/src/compute_deprecated.cpp b/src/compute_deprecated.cpp index 356e6b372a..2419e5bc8b 100644 --- a/src/compute_deprecated.cpp +++ b/src/compute_deprecated.cpp @@ -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"); } diff --git a/src/deprecated.cpp b/src/deprecated.cpp index 8cd3fc8cb1..dc0ab400d4 100644 --- a/src/deprecated.cpp +++ b/src/deprecated.cpp @@ -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"); } diff --git a/src/dihedral_deprecated.cpp b/src/dihedral_deprecated.cpp index a44dcae9d9..1709f7d3d7 100644 --- a/src/dihedral_deprecated.cpp +++ b/src/dihedral_deprecated.cpp @@ -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"); } diff --git a/src/dump_deprecated.cpp b/src/dump_deprecated.cpp index 3dae66248d..822bed7832 100644 --- a/src/dump_deprecated.cpp +++ b/src/dump_deprecated.cpp @@ -31,6 +31,5 @@ DumpDeprecated::DumpDeprecated(LAMMPS *lmp, int narg, char **arg) : utils::logmesg(lmp,"\nDump style 'DEPRECATED' is a dummy style\n\n"); return; } - - lmp->error->all(FLERR,"This dump style is no longer available"); + error->all(FLERR,"This dump style is no longer available"); } diff --git a/src/fix_deprecated.cpp b/src/fix_deprecated.cpp index c6313bd872..d3ceb69ea0 100644 --- a/src/fix_deprecated.cpp +++ b/src/fix_deprecated.cpp @@ -43,6 +43,5 @@ FixDeprecated::FixDeprecated(LAMMPS *lmp, int narg, char **arg) : "compute chunk/atom:\n dim, origin, delta, region, " "bound, discard, units\n\n"); } - - lmp->error->all(FLERR,"This fix style is no longer available"); + error->all(FLERR,"This fix style is no longer available"); } diff --git a/src/improper_deprecated.cpp b/src/improper_deprecated.cpp index ea089b5da6..0c1a45603e 100644 --- a/src/improper_deprecated.cpp +++ b/src/improper_deprecated.cpp @@ -45,8 +45,7 @@ void ImproperDeprecated::settings(int, char **) utils::logmesg(lmp,"\nImproper style 'DEPRECATED' is a dummy style\n\n"); return; } - - lmp->error->all(FLERR,"This improper style is no longer available"); + error->all(FLERR,"This improper style is no longer available"); } diff --git a/src/kspace_deprecated.cpp b/src/kspace_deprecated.cpp index 076bd8a186..5dc2b50e2b 100644 --- a/src/kspace_deprecated.cpp +++ b/src/kspace_deprecated.cpp @@ -35,8 +35,7 @@ void KSpaceDeprecated::settings(int, char **) utils::logmesg(lmp,"\nKSpace style 'DEPRECATED' is a dummy style\n\n"); return; } - - lmp->error->all(FLERR,"This kspace style is no longer available"); + error->all(FLERR,"This kspace style is no longer available"); } diff --git a/src/pair_deprecated.cpp b/src/pair_deprecated.cpp index d48638a456..75cb7efcdf 100644 --- a/src/pair_deprecated.cpp +++ b/src/pair_deprecated.cpp @@ -50,6 +50,5 @@ void PairDeprecated::settings(int, char **) utils::logmesg(lmp,"\nPair style 'reax' has been removed from LAMMPS " "after the 12 December 2018 version\n\n"); } - - lmp->error->all(FLERR,"This pair style is no longer available"); + error->all(FLERR,"This pair style is no longer available"); } diff --git a/src/region_deprecated.cpp b/src/region_deprecated.cpp index d0f1fb8e1f..afbe9e4189 100644 --- a/src/region_deprecated.cpp +++ b/src/region_deprecated.cpp @@ -31,5 +31,5 @@ RegionDeprecated::RegionDeprecated(LAMMPS *lmp, int narg, char **arg) : utils::logmesg(lmp,"\nRegion style 'DEPRECATED' is a dummy style\n\n"); return; } - lmp->error->all(FLERR,"This region style is no longer available"); + error->all(FLERR,"This region style is no longer available"); }