Skip to content
Snippets Groups Projects
Commit 7bb5821b authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add deprecated dump and region styles

parent 2b0e4747
No related branches found
No related tags found
No related merge requests found
/* ----------------------------------------------------------------------
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);
}
}
/* -*- 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
*/
/* ----------------------------------------------------------------------
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);
}
}
/* -*- 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
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment