diff --git a/src/fix_deprecated.cpp b/src/fix_deprecated.cpp new file mode 100644 index 0000000000..8139a14d9d --- /dev/null +++ b/src/fix_deprecated.cpp @@ -0,0 +1,42 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include +#include "fix_deprecated.h" +#include "comm.h" +#include "error.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +FixDeprecated::FixDeprecated(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (strncmp(style,"ave/spatial",11) == 0) { + const char *message = "\n" + "NOTE: The fix styles 'ave/spatial' and 'ave/spatial/sphere' have been replaced\n" + "by the more general fix ave/chunk and compute chunk/atom commands.\n" + "All ave/spatial and ave/spatial/sphere functionality is available in these\n" + "new commands. These ave/spatial keywords & options are part of fix ave/chunk:\n" + " Nevery, Nrepeat, Nfreq, input values, norm, ave, file, overwrite, title123\n" + "These ave/spatial keywords & options for binning are part of compute chunk/atom:\n" + " dim, origin, delta, region, bound, discard, units\n\n"; + + if (comm->me == 0) { + if (screen) fprintf(screen,message); + if (logfile) fprintf(logfile,message); + } + } + error->all(FLERR,"This fix command has been removed from LAMMPS"); +} diff --git a/src/fix_deprecated.h b/src/fix_deprecated.h new file mode 100644 index 0000000000..dcfe75358f --- /dev/null +++ b/src/fix_deprecated.h @@ -0,0 +1,51 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +// list all deprecated and removed fix styles here + +FixStyle(ave/spatial,FixDeprecated) +FixStyle(ave/spatial/sphere,FixDeprecated) + +#else + +#ifndef LMP_FIX_DEPRECATED_H +#define LMP_FIX_DEPRECATED_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixDeprecated : public Fix { + public: + FixDeprecated(class LAMMPS *, int, char **); + ~FixDeprecated() {} + int setmask() {return 0;} + void init() {} +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: The fix ave/spatial command has been removed from LAMMPS + +It has been replaced by the more flexible fix ave/chunk and compute +chunk/atom commands. All the fix ave/spatial keywords and options are +available in those two newer commands. + +*/