git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15104 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2016-06-02 14:14:17 +00:00
parent 10be4c06bd
commit 195c521b8a
2 changed files with 93 additions and 0 deletions

42
src/fix_deprecated.cpp Normal file
View File

@ -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 <string.h>
#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");
}

51
src/fix_deprecated.h Normal file
View File

@ -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.
*/