Commit 9d7c4ac5 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add depreacted kspace style

parent 0ec94b2a
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
/* ----------------------------------------------------------------------
   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);

  }
}  

+44 −0
Original line number Diff line number Diff line
/* -*- 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:

*/