forked from lijiext/lammps
add depreacted kspace style
This commit is contained in:
parent
0ec94b2ad6
commit
9d7c4ac5f2
|
@ -0,0 +1,49 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
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.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing author: Axel Kohlmeyer (Temple U)
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <cstring>
|
||||
#include "kspace_deprecated.h"
|
||||
#include "kspace_hybrid.h"
|
||||
#include "comm.h"
|
||||
#include "force.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 kspace style is no longer available");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void KspaceDeprecated::settings(int, char **)
|
||||
{
|
||||
const char *my_style = force->kspace_style;
|
||||
|
||||
if (strcmp(my_style,"DEPRECATED") == 0) {
|
||||
writemsg(lmp,"\nKspace style 'DEPRECATED' is a dummy style\n\n",0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/* -*- 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 KSPACE_CLASS
|
||||
|
||||
KspaceStyle(DEPRECATED,KspaceDeprecated)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_KSPACE_DEPRECATED_H
|
||||
#define LMP_KSPACE_DEPRECATED_H
|
||||
|
||||
#include "kspace.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class KspaceDeprecated : public Kspace {
|
||||
public:
|
||||
KspaceDeprecated(class LAMMPS *lmp) : Kspace(lmp) {}
|
||||
virtual ~KspaceDeprecated() {}
|
||||
|
||||
virtual void init() {}
|
||||
virtual void setup() {}
|
||||
virtual void compute(int, int) {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ERROR/WARNING messages:
|
||||
|
||||
*/
|
Loading…
Reference in New Issue