add deprecated dump and region styles
This commit is contained in:
40
src/dump_deprecated.cpp
Normal file
40
src/dump_deprecated.cpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
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 <cstring>
|
||||||
|
#include "dump_deprecated.h"
|
||||||
|
#include "comm.h"
|
||||||
|
#include "error.h"
|
||||||
|
|
||||||
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
|
static void writemsg(LAMMPS *lmp, const char *msg, int abend=1)
|
||||||
|
{
|
||||||
|
if (lmp->comm->me == 0) {
|
||||||
|
if (lmp->screen) fputs(msg,lmp->screen);
|
||||||
|
if (lmp->logfile) fputs(msg,lmp->logfile);
|
||||||
|
}
|
||||||
|
if (abend)
|
||||||
|
lmp->error->all(FLERR,"This dump style is no longer available");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
DumpDeprecated::DumpDeprecated(LAMMPS *lmp, int narg, char **arg) :
|
||||||
|
Dump(lmp, narg, arg)
|
||||||
|
{
|
||||||
|
if (strcmp(style,"DEPRECATED") == 0) {
|
||||||
|
writemsg(lmp,"\nDump style 'DEPRECATED' is a dummy style\n\n",0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
50
src/dump_deprecated.h
Normal file
50
src/dump_deprecated.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/* -*- 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 DUMP_CLASS
|
||||||
|
|
||||||
|
// list all deprecated and removed dump styles here
|
||||||
|
|
||||||
|
DumpStyle(DEPRECATED,DumpDeprecated)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef LMP_DUMP_DEPRECATED_H
|
||||||
|
#define LMP_DUMP_DEPRECATED_H
|
||||||
|
|
||||||
|
#include "dump.h"
|
||||||
|
|
||||||
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
|
class DumpDeprecated : public Dump {
|
||||||
|
public:
|
||||||
|
DumpDeprecated(class LAMMPS *, int, char **);
|
||||||
|
~DumpDeprecated() {}
|
||||||
|
virtual void init_style() {}
|
||||||
|
virtual void write_header(bigint) {}
|
||||||
|
virtual void pack(tagint *) {}
|
||||||
|
virtual void write_data(int, double *) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ERROR/WARNING messages:
|
||||||
|
|
||||||
|
E: This dump style has been removed from LAMMPS
|
||||||
|
|
||||||
|
UNDOCUMENTED
|
||||||
|
|
||||||
|
*/
|
||||||
40
src/region_deprecated.cpp
Normal file
40
src/region_deprecated.cpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
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 <cstring>
|
||||||
|
#include "region_deprecated.h"
|
||||||
|
#include "comm.h"
|
||||||
|
#include "error.h"
|
||||||
|
|
||||||
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
|
static void writemsg(LAMMPS *lmp, const char *msg, int abend=1)
|
||||||
|
{
|
||||||
|
if (lmp->comm->me == 0) {
|
||||||
|
if (lmp->screen) fputs(msg,lmp->screen);
|
||||||
|
if (lmp->logfile) fputs(msg,lmp->logfile);
|
||||||
|
}
|
||||||
|
if (abend)
|
||||||
|
lmp->error->all(FLERR,"This region style is no longer available");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
RegionDeprecated::RegionDeprecated(LAMMPS *lmp, int narg, char **arg) :
|
||||||
|
Region(lmp, narg, arg)
|
||||||
|
{
|
||||||
|
if (strcmp(style,"DEPRECATED") == 0) {
|
||||||
|
writemsg(lmp,"\nRegion style 'DEPRECATED' is a dummy style\n\n",0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
50
src/region_deprecated.h
Normal file
50
src/region_deprecated.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/* -*- 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 REGION_CLASS
|
||||||
|
|
||||||
|
// list all deprecated and removed region styles here
|
||||||
|
|
||||||
|
RegionStyle(DEPRECATED,RegionDeprecated)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef LMP_REGION_DEPRECATED_H
|
||||||
|
#define LMP_REGION_DEPRECATED_H
|
||||||
|
|
||||||
|
#include "region.h"
|
||||||
|
|
||||||
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
|
class RegionDeprecated : public Region {
|
||||||
|
public:
|
||||||
|
RegionDeprecated(class LAMMPS *, int, char **);
|
||||||
|
~RegionDeprecated() {}
|
||||||
|
virtual void init() {}
|
||||||
|
virtual int inside(double, double, double) { return 0; }
|
||||||
|
virtual int surface_interior(double *, double) { return 0; }
|
||||||
|
virtual int surface_exterior(double *, double) { return 0; }
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ERROR/WARNING messages:
|
||||||
|
|
||||||
|
E: This region command has been removed from LAMMPS
|
||||||
|
|
||||||
|
UNDOCUMENTED
|
||||||
|
|
||||||
|
*/
|
||||||
Reference in New Issue
Block a user