diff --git a/src/neighbor.cpp b/src/neighbor.cpp index d4a2727662..2b4911958f 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -1660,9 +1660,15 @@ int Neighbor::choose_stencil(NeighRequest *rq) else if (rq->newton == 1) newtflag = 1; else if (rq->newton == 2) newtflag = 0; - //printf("STENCIL RQ FLAGS: hff %d %d n %d g %d s %d newtflag %d\n", + // request a full stencil if building full neighbor list or newton is off + + int fullflag = 0; + if (rq->full) fullflag = 1; + if (!newtflag) fullflag = 1; + + //printf("STENCIL RQ FLAGS: hff %d %d n %d g %d s %d newtflag %d fullflag %d\n", // rq->half,rq->full,rq->newton,rq->ghost,rq->ssa, - // newtflag); + // newtflag, fullflag); // use request and system settings to match exactly one NStencil class mask // checks are bitwise using NeighConst bit masks @@ -1672,24 +1678,15 @@ int Neighbor::choose_stencil(NeighRequest *rq) for (int i = 0; i < nsclass; i++) { mask = stencilmasks[i]; - //printf("III %d: half %d full %d newton %d newtoff %d ghost %d ssa %d\n", - // i,mask & NS_HALF,mask & NS_FULL,mask & NS_NEWTON, - // mask & NS_NEWTOFF,mask & NS_GHOST,mask & NS_SSA); + //printf("III %d: half %d full %d ghost %d ssa %d\n", + // i,mask & NS_HALF,mask & NS_FULL,mask & NS_GHOST,mask & NS_SSA); // exactly one of half or full is set and must match - if (rq->half) { - if (!(mask & NS_HALF)) continue; - } else if (rq->full) { + if (fullflag) { if (!(mask & NS_FULL)) continue; - } - - // newtflag is on or off and must match - - if (newtflag) { - if (!(mask & NS_NEWTON)) continue; - } else if (!newtflag) { - if (!(mask & NS_NEWTOFF)) continue; + } else { + if (!(mask & NS_HALF)) continue; } // require match of these request flags and mask bits diff --git a/src/neighbor.h b/src/neighbor.h index 0012cb29fa..b1cc95f5e7 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -248,13 +248,11 @@ namespace NeighConst { static const int NS_FULL = 1<<3; static const int NS_2D = 1<<4; static const int NS_3D = 1<<5; - static const int NS_NEWTON = 1<<6; - static const int NS_NEWTOFF = 1<<7; - static const int NS_ORTHO = 1<<8; - static const int NS_TRI = 1<<9; - static const int NS_GHOST = 1<<10; - static const int NS_SSA = 1<<11; - static const int NS_MULTI2 = 1<<12; + static const int NS_ORTHO = 1<<6; + static const int NS_TRI = 1<<7; + static const int NS_GHOST = 1<<8; + static const int NS_SSA = 1<<9; + static const int NS_MULTI2 = 1<<10; static const int NP_NSQ = 1<<0; static const int NP_BIN = 1<<1; diff --git a/src/nstencil_full_bin_2d.h b/src/nstencil_full_bin_2d.h index d85063596f..0d97cc2634 100644 --- a/src/nstencil_full_bin_2d.h +++ b/src/nstencil_full_bin_2d.h @@ -15,8 +15,7 @@ NStencilStyle(full/bin/2d, NStencilFullBin2d, - NS_FULL | NS_BIN | NS_2D | - NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) + NS_FULL | NS_BIN | NS_2D | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_bin_3d.h b/src/nstencil_full_bin_3d.h index facddd8ead..47f84aebcc 100644 --- a/src/nstencil_full_bin_3d.h +++ b/src/nstencil_full_bin_3d.h @@ -15,8 +15,7 @@ NStencilStyle(full/bin/3d, NStencilFullBin3d, - NS_FULL | NS_BIN | NS_3D | - NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) + NS_FULL | NS_BIN | NS_3D | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_ghost_bin_2d.h b/src/nstencil_full_ghost_bin_2d.h index 531c7d2eb1..db870f9c04 100644 --- a/src/nstencil_full_ghost_bin_2d.h +++ b/src/nstencil_full_ghost_bin_2d.h @@ -15,8 +15,7 @@ NStencilStyle(full/ghost/bin/2d, NStencilFullGhostBin2d, - NS_FULL | NS_GHOST | NS_BIN | NS_2D | - NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) + NS_FULL | NS_GHOST | NS_BIN | NS_2D | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_ghost_bin_3d.h b/src/nstencil_full_ghost_bin_3d.h index ed4ca6c4d6..d99be6d869 100644 --- a/src/nstencil_full_ghost_bin_3d.h +++ b/src/nstencil_full_ghost_bin_3d.h @@ -15,8 +15,7 @@ NStencilStyle(full/ghost/bin/3d, NStencilFullGhostBin3d, - NS_FULL | NS_GHOST | NS_BIN | NS_3D | - NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) + NS_FULL | NS_GHOST | NS_BIN | NS_3D | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_multi2_3d.h b/src/nstencil_full_multi2_3d.h index b9b835fd24..48bdfd2611 100644 --- a/src/nstencil_full_multi2_3d.h +++ b/src/nstencil_full_multi2_3d.h @@ -14,9 +14,7 @@ #ifdef NSTENCIL_CLASS NStencilStyle(full/multi/tiered/3d, - NStencilFullMultiTiered3d, - NS_FULL | NS_Multi_Tiered | NS_3D | - NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) + NStencilFullMultiTiered3d, NS_FULL | NS_Multi_Tiered | NS_3D | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_multi_2d.h b/src/nstencil_full_multi_2d.h index f78eecc55f..2c28bb56bf 100644 --- a/src/nstencil_full_multi_2d.h +++ b/src/nstencil_full_multi_2d.h @@ -15,8 +15,7 @@ NStencilStyle(full/multi/2d, NStencilFullMulti2d, - NS_FULL | NS_MULTI | NS_2D | - NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) + NS_FULL | NS_MULTI | NS_2D | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_full_multi_3d.h b/src/nstencil_full_multi_3d.h index 9e3696f5d2..b2edfd8b0d 100644 --- a/src/nstencil_full_multi_3d.h +++ b/src/nstencil_full_multi_3d.h @@ -15,8 +15,7 @@ NStencilStyle(full/multi/3d, NStencilFullMulti3d, - NS_FULL | NS_MULTI | NS_3D | - NS_NEWTON | NS_NEWTOFF | NS_ORTHO | NS_TRI) + NS_FULL | NS_MULTI | NS_3D | NS_ORTHO | NS_TRI) #else diff --git a/src/nstencil_half_bin_2d_newton.cpp b/src/nstencil_half_bin_2d.cpp similarity index 87% rename from src/nstencil_half_bin_2d_newton.cpp rename to src/nstencil_half_bin_2d.cpp index 8fdc8f1aa9..fc7b552118 100644 --- a/src/nstencil_half_bin_2d_newton.cpp +++ b/src/nstencil_half_bin_2d.cpp @@ -11,19 +11,19 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "nstencil_half_bin_2d_newton.h" +#include "nstencil_half_bin_2d.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfBin2dNewton::NStencilHalfBin2dNewton(LAMMPS *lmp) : NStencil(lmp) {} +NStencilHalfBin2d::NStencilHalfBin2d(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- create stencil based on bin geometry and cutoff ------------------------------------------------------------------------- */ -void NStencilHalfBin2dNewton::create() +void NStencilHalfBin2d::create() { int i,j; diff --git a/src/nstencil_half_bin_3d_newton.h b/src/nstencil_half_bin_2d.h similarity index 69% rename from src/nstencil_half_bin_3d_newton.h rename to src/nstencil_half_bin_2d.h index 96f19adae1..29a8868221 100644 --- a/src/nstencil_half_bin_3d_newton.h +++ b/src/nstencil_half_bin_2d.h @@ -13,23 +13,23 @@ #ifdef NSTENCIL_CLASS -NStencilStyle(half/bin/3d/newton, - NStencilHalfBin3dNewton, - NS_HALF | NS_BIN | NS_3D | NS_NEWTON | NS_ORTHO) +NStencilStyle(half/bin/2d, + NStencilHalfBin2d, + NS_HALF | NS_BIN | NS_2D | NS_ORTHO) #else -#ifndef LMP_NSTENCIL_HALF_BIN_3D_NEWTON_H -#define LMP_NSTENCIL_HALF_BIN_3D_NEWTON_H +#ifndef LMP_NSTENCIL_HALF_BIN_2D_H +#define LMP_NSTENCIL_HALF_BIN_2D_H #include "nstencil.h" namespace LAMMPS_NS { -class NStencilHalfBin3dNewton : public NStencil { +class NStencilHalfBin2d : public NStencil { public: - NStencilHalfBin3dNewton(class LAMMPS *); - ~NStencilHalfBin3dNewton() {} + NStencilHalfBin2d(class LAMMPS *); + ~NStencilHalfBin2d() {} void create(); }; diff --git a/src/nstencil_half_bin_2d_newtoff.cpp b/src/nstencil_half_bin_2d_newtoff.cpp deleted file mode 100644 index f3a6c5d08b..0000000000 --- a/src/nstencil_half_bin_2d_newtoff.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* ---------------------------------------------------------------------- - 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 "nstencil_half_bin_2d_newtoff.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -NStencilHalfBin2dNewtoff::NStencilHalfBin2dNewtoff(LAMMPS *lmp) : - NStencil(lmp) {} - -/* ---------------------------------------------------------------------- - create stencil based on bin geometry and cutoff -------------------------------------------------------------------------- */ - -void NStencilHalfBin2dNewtoff::create() -{ - int i,j; - - nstencil = 0; - - for (j = -sy; j <= sy; j++) - for (i = -sx; i <= sx; i++) - if (bin_distance(i,j,0) < cutneighmaxsq) - stencil[nstencil++] = j*mbinx + i; -} diff --git a/src/nstencil_half_bin_2d_newtoff.h b/src/nstencil_half_bin_2d_newtoff.h deleted file mode 100644 index 7a350df1bc..0000000000 --- a/src/nstencil_half_bin_2d_newtoff.h +++ /dev/null @@ -1,43 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/bin/2d/newtoff, - NStencilHalfBin2dNewtoff, - NS_HALF | NS_BIN | NS_2D | NS_NEWTOFF | NS_ORTHO | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_BIN_2D_NEWTOFF_H -#define LMP_NSTENCIL_HALF_BIN_2D_NEWTOFF_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfBin2dNewtoff : public NStencil { - public: - NStencilHalfBin2dNewtoff(class LAMMPS *); - ~NStencilHalfBin2dNewtoff() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_bin_2d_newton_tri.h b/src/nstencil_half_bin_2d_newton_tri.h deleted file mode 100644 index b9926608d7..0000000000 --- a/src/nstencil_half_bin_2d_newton_tri.h +++ /dev/null @@ -1,43 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/bin/2d/newton/tri, - NStencilHalfBin2dNewtonTri, - NS_HALF | NS_BIN | NS_2D | NS_NEWTON | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_BIN_2D_NEWTON_TRI_H -#define LMP_NSTENCIL_HALF_BIN_2D_NEWTON_TRI_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfBin2dNewtonTri : public NStencil { - public: - NStencilHalfBin2dNewtonTri(class LAMMPS *); - ~NStencilHalfBin2dNewtonTri() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_bin_2d_newton_tri.cpp b/src/nstencil_half_bin_2d_tri.cpp similarity index 87% rename from src/nstencil_half_bin_2d_newton_tri.cpp rename to src/nstencil_half_bin_2d_tri.cpp index 30d064fb29..0ad5456d62 100644 --- a/src/nstencil_half_bin_2d_newton_tri.cpp +++ b/src/nstencil_half_bin_2d_tri.cpp @@ -11,20 +11,20 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "nstencil_half_bin_2d_newton_tri.h" +#include "nstencil_half_bin_2d_tri.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfBin2dNewtonTri::NStencilHalfBin2dNewtonTri(LAMMPS *lmp) : +NStencilHalfBin2dTri::NStencilHalfBin2dTri(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- create stencil based on bin geometry and cutoff ------------------------------------------------------------------------- */ -void NStencilHalfBin2dNewtonTri::create() +void NStencilHalfBin2dTri::create() { int i,j; diff --git a/src/nstencil_half_bin_2d_newton.h b/src/nstencil_half_bin_2d_tri.h similarity index 69% rename from src/nstencil_half_bin_2d_newton.h rename to src/nstencil_half_bin_2d_tri.h index 64bbfc5fe4..4dba9151ba 100644 --- a/src/nstencil_half_bin_2d_newton.h +++ b/src/nstencil_half_bin_2d_tri.h @@ -13,23 +13,23 @@ #ifdef NSTENCIL_CLASS -NStencilStyle(half/bin/2d/newton, - NStencilHalfBin2dNewton, - NS_HALF | NS_BIN | NS_2D | NS_NEWTON | NS_ORTHO) +NStencilStyle(half/bin/2d/tri, + NStencilHalfBin2dTri, + NS_HALF | NS_BIN | NS_2D | NS_TRI) #else -#ifndef LMP_NSTENCIL_HALF_BIN_2D_NEWTON_H -#define LMP_NSTENCIL_HALF_BIN_2D_NEWTON_H +#ifndef LMP_NSTENCIL_HALF_BIN_2D_TRI_H +#define LMP_NSTENCIL_HALF_BIN_2D_TRI_H #include "nstencil.h" namespace LAMMPS_NS { -class NStencilHalfBin2dNewton : public NStencil { +class NStencilHalfBin2dTri : public NStencil { public: - NStencilHalfBin2dNewton(class LAMMPS *); - ~NStencilHalfBin2dNewton() {} + NStencilHalfBin2dTri(class LAMMPS *); + ~NStencilHalfBin2dTri() {} void create(); }; diff --git a/src/nstencil_half_bin_3d_newton.cpp b/src/nstencil_half_bin_3d.cpp similarity index 88% rename from src/nstencil_half_bin_3d_newton.cpp rename to src/nstencil_half_bin_3d.cpp index 998ed28afe..43dcd2b648 100644 --- a/src/nstencil_half_bin_3d_newton.cpp +++ b/src/nstencil_half_bin_3d.cpp @@ -11,19 +11,19 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "nstencil_half_bin_3d_newton.h" +#include "nstencil_half_bin_3d.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfBin3dNewton::NStencilHalfBin3dNewton(LAMMPS *lmp) : NStencil(lmp) {} +NStencilHalfBin3d::NStencilHalfBin3d(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- create stencil based on bin geometry and cutoff ------------------------------------------------------------------------- */ -void NStencilHalfBin3dNewton::create() +void NStencilHalfBin3d::create() { int i,j,k; diff --git a/src/nstencil_half_multi_2d_newton.h b/src/nstencil_half_bin_3d.h similarity index 68% rename from src/nstencil_half_multi_2d_newton.h rename to src/nstencil_half_bin_3d.h index 9ecac4c696..729dcf9c91 100644 --- a/src/nstencil_half_multi_2d_newton.h +++ b/src/nstencil_half_bin_3d.h @@ -13,23 +13,23 @@ #ifdef NSTENCIL_CLASS -NStencilStyle(half/multi/2d/newton, - NStencilHalfMulti2dNewton, - NS_HALF | NS_MULTI | NS_2D | NS_NEWTON | NS_ORTHO) +NStencilStyle(half/bin/3d, + NStencilHalfBin3d, + NS_HALF | NS_BIN | NS_3D | NS_ORTHO) #else -#ifndef LMP_NSTENCIL_HALF_MULTI_2D_NEWTON_H -#define LMP_NSTENCIL_HALF_MULTI_2D_NEWTON_H +#ifndef LMP_NSTENCIL_HALF_BIN_3D_H +#define LMP_NSTENCIL_HALF_BIN_3D_H #include "nstencil.h" namespace LAMMPS_NS { -class NStencilHalfMulti2dNewton : public NStencil { +class NStencilHalfBin3d : public NStencil { public: - NStencilHalfMulti2dNewton(class LAMMPS *); - ~NStencilHalfMulti2dNewton() {} + NStencilHalfBin3d(class LAMMPS *); + ~NStencilHalfBin3d() {} void create(); }; diff --git a/src/nstencil_half_bin_3d_newtoff.cpp b/src/nstencil_half_bin_3d_newtoff.cpp deleted file mode 100644 index e44a93d47d..0000000000 --- a/src/nstencil_half_bin_3d_newtoff.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* ---------------------------------------------------------------------- - 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 "nstencil_half_bin_3d_newtoff.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -NStencilHalfBin3dNewtoff::NStencilHalfBin3dNewtoff(LAMMPS *lmp) : - NStencil(lmp) {} - -/* ---------------------------------------------------------------------- - create stencil based on bin geometry and cutoff -------------------------------------------------------------------------- */ - -void NStencilHalfBin3dNewtoff::create() -{ - int i,j,k; - - nstencil = 0; - - for (k = -sz; k <= sz; k++) - for (j = -sy; j <= sy; j++) - for (i = -sx; i <= sx; i++) - if (bin_distance(i,j,k) < cutneighmaxsq) - stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i; -} diff --git a/src/nstencil_half_bin_3d_newtoff.h b/src/nstencil_half_bin_3d_newtoff.h deleted file mode 100644 index d1eac666cc..0000000000 --- a/src/nstencil_half_bin_3d_newtoff.h +++ /dev/null @@ -1,43 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/bin/3d/newtoff, - NStencilHalfBin3dNewtoff, - NS_HALF | NS_BIN | NS_3D | NS_NEWTOFF | NS_ORTHO | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_BIN_3D_NEWTOFF_H -#define LMP_NSTENCIL_HALF_BIN_3D_NEWTOFF_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfBin3dNewtoff : public NStencil { - public: - NStencilHalfBin3dNewtoff(class LAMMPS *); - ~NStencilHalfBin3dNewtoff() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_bin_3d_newton_tri.h b/src/nstencil_half_bin_3d_newton_tri.h deleted file mode 100644 index 8c265acb46..0000000000 --- a/src/nstencil_half_bin_3d_newton_tri.h +++ /dev/null @@ -1,43 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/bin/3d/newton/tri, - NStencilHalfBin3dNewtonTri, - NS_HALF | NS_BIN | NS_3D | NS_NEWTON | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_BIN_3D_NEWTON_TRI_H -#define LMP_NSTENCIL_HALF_BIN_3D_NEWTON_TRI_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfBin3dNewtonTri : public NStencil { - public: - NStencilHalfBin3dNewtonTri(class LAMMPS *); - ~NStencilHalfBin3dNewtonTri() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_bin_3d_newton_tri.cpp b/src/nstencil_half_bin_3d_tri.cpp similarity index 88% rename from src/nstencil_half_bin_3d_newton_tri.cpp rename to src/nstencil_half_bin_3d_tri.cpp index 2aae44ceaf..ca016d956a 100644 --- a/src/nstencil_half_bin_3d_newton_tri.cpp +++ b/src/nstencil_half_bin_3d_tri.cpp @@ -11,20 +11,20 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "nstencil_half_bin_3d_newton_tri.h" +#include "nstencil_half_bin_3d_tri.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfBin3dNewtonTri::NStencilHalfBin3dNewtonTri(LAMMPS *lmp) : +NStencilHalfBin3dTri::NStencilHalfBin3dTri(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- create stencil based on bin geometry and cutoff ------------------------------------------------------------------------- */ -void NStencilHalfBin3dNewtonTri::create() +void NStencilHalfBin3dTri::create() { int i,j,k; diff --git a/src/nstencil_half_multi_3d_newton.h b/src/nstencil_half_bin_3d_tri.h similarity index 68% rename from src/nstencil_half_multi_3d_newton.h rename to src/nstencil_half_bin_3d_tri.h index bbdc7752c6..33183cd318 100644 --- a/src/nstencil_half_multi_3d_newton.h +++ b/src/nstencil_half_bin_3d_tri.h @@ -13,23 +13,23 @@ #ifdef NSTENCIL_CLASS -NStencilStyle(half/multi/3d/newton, - NStencilHalfMulti3dNewton, - NS_HALF | NS_MULTI | NS_3D | NS_NEWTON | NS_ORTHO) +NStencilStyle(half/bin/3d/tri, + NStencilHalfBin3dTri, + NS_HALF | NS_BIN | NS_3D | NS_TRI) #else -#ifndef LMP_NSTENCIL_HALF_MULTI_3D_NEWTON_H -#define LMP_NSTENCIL_HALF_MULTI_3D_NEWTON_H +#ifndef LMP_NSTENCIL_HALF_BIN_3D_TRI_H +#define LMP_NSTENCIL_HALF_BIN_3D_TRI_H #include "nstencil.h" namespace LAMMPS_NS { -class NStencilHalfMulti3dNewton : public NStencil { +class NStencilHalfBin3dTri : public NStencil { public: - NStencilHalfMulti3dNewton(class LAMMPS *); - ~NStencilHalfMulti3dNewton() {} + NStencilHalfBin3dTri(class LAMMPS *); + ~NStencilHalfBin3dTri() {} void create(); }; diff --git a/src/nstencil_half_ghost_bin_2d_newtoff.cpp b/src/nstencil_half_ghost_bin_2d_newtoff.cpp deleted file mode 100644 index 6f9a7585fe..0000000000 --- a/src/nstencil_half_ghost_bin_2d_newtoff.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* ---------------------------------------------------------------------- - 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 "nstencil_half_ghost_bin_2d_newtoff.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -NStencilHalfGhostBin2dNewtoff:: -NStencilHalfGhostBin2dNewtoff(LAMMPS *lmp) : NStencil(lmp) -{ - xyzflag = 1; -} - -/* ---------------------------------------------------------------------- - create stencil based on bin geometry and cutoff -------------------------------------------------------------------------- */ - -void NStencilHalfGhostBin2dNewtoff::create() -{ - int i,j; - - nstencil = 0; - - for (j = -sy; j <= sy; j++) - for (i = -sx; i <= sx; i++) - if (bin_distance(i,j,0) < cutneighmaxsq) { - stencilxyz[nstencil][0] = i; - stencilxyz[nstencil][1] = j; - stencilxyz[nstencil][2] = 0; - stencil[nstencil++] = j*mbinx + i; - } -} diff --git a/src/nstencil_half_ghost_bin_2d_newtoff.h b/src/nstencil_half_ghost_bin_2d_newtoff.h deleted file mode 100644 index 3286810c1c..0000000000 --- a/src/nstencil_half_ghost_bin_2d_newtoff.h +++ /dev/null @@ -1,44 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/ghost/bin/2d/newtoff, - NStencilHalfGhostBin2dNewtoff, - NS_HALF | NS_GHOST | NS_BIN | NS_2D | - NS_NEWTOFF | NS_ORTHO | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_GHOST_BIN_2D_NEWTOFF_H -#define LMP_NSTENCIL_HALF_GHOST_BIN_2D_NEWTOFF_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfGhostBin2dNewtoff : public NStencil { - public: - NStencilHalfGhostBin2dNewtoff(class LAMMPS *); - ~NStencilHalfGhostBin2dNewtoff() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_ghost_bin_3d_newtoff.cpp b/src/nstencil_half_ghost_bin_3d_newtoff.cpp deleted file mode 100644 index 6492fe4a4e..0000000000 --- a/src/nstencil_half_ghost_bin_3d_newtoff.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* ---------------------------------------------------------------------- - 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 "nstencil_half_ghost_bin_3d_newtoff.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -NStencilHalfGhostBin3dNewtoff:: -NStencilHalfGhostBin3dNewtoff(LAMMPS *lmp) : NStencil(lmp) -{ - xyzflag = 1; -} - -/* ---------------------------------------------------------------------- - create stencil based on bin geometry and cutoff -------------------------------------------------------------------------- */ - -void NStencilHalfGhostBin3dNewtoff::create() -{ - int i,j,k; - - nstencil = 0; - - for (k = -sz; k <= sz; k++) - for (j = -sy; j <= sy; j++) - for (i = -sx; i <= sx; i++) - if (bin_distance(i,j,k) < cutneighmaxsq) { - stencilxyz[nstencil][0] = i; - stencilxyz[nstencil][1] = j; - stencilxyz[nstencil][2] = k; - stencil[nstencil++] = k*mbiny*mbinx + j*mbinx + i; - } -} diff --git a/src/nstencil_half_ghost_bin_3d_newtoff.h b/src/nstencil_half_ghost_bin_3d_newtoff.h deleted file mode 100644 index ee58c29342..0000000000 --- a/src/nstencil_half_ghost_bin_3d_newtoff.h +++ /dev/null @@ -1,44 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/ghost/bin/3d/newtoff, - NStencilHalfGhostBin3dNewtoff, - NS_HALF | NS_GHOST | NS_BIN | NS_3D | - NS_NEWTOFF | NS_ORTHO | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_GHOST_BIN_3D_NEWTOFF_H -#define LMP_NSTENCIL_HALF_GHOST_BIN_3D_NEWTOFF_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfGhostBin3dNewtoff : public NStencil { - public: - NStencilHalfGhostBin3dNewtoff(class LAMMPS *); - ~NStencilHalfGhostBin3dNewtoff() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_multi2_2d_newton.cpp b/src/nstencil_half_multi2_2d_newton.cpp deleted file mode 100644 index 66158202bf..0000000000 --- a/src/nstencil_half_multi2_2d_newton.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* ---------------------------------------------------------------------- - 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 "nstencil_half_bytype_2d_newton.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "nbin.h" -#include "memory.h" -#include "atom.h" -#include - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -NStencilHalfBytype2dNewton::NStencilHalfBytype2dNewton(LAMMPS *lmp) : - NStencil(lmp) -{ - maxstencil_type = NULL; -} - -NStencilHalfBytype2dNewton::~NStencilHalfBytype2dNewton() { - - memory->destroy(nstencil_type); - for (int i = 1; i <= atom->ntypes; i++) { - for (int j = 0; j <= atom->ntypes; j++) { - if (maxstencil_type[i][j] > 0) memory->destroy(stencil_type[i][j]); - } - delete [] stencil_type[i]; - } - delete [] stencil_type; - memory->destroy(maxstencil_type); -} - -/* ---------------------------------------------------------------------- */ - -// KS To superclass -void NStencilHalfBytype2dNewton::copy_bin_info_bytype(int itype) { - - mbinx = nb->mbinx_type[itype]; - mbiny = nb->mbiny_type[itype]; - mbinz = nb->mbinz_type[itype]; - binsizex = nb->binsizex_type[itype]; - binsizey = nb->binsizey_type[itype]; - binsizez = nb->binsizez_type[itype]; - bininvx = nb->bininvx_type[itype]; - bininvy = nb->bininvy_type[itype]; - bininvz = nb->bininvz_type[itype]; -} - -/* ---------------------------------------------------------------------- */ - -// KS To superclass? -int NStencilHalfBytype2dNewton::copy_neigh_info_bytype(int itype) { - - cutneighmaxsq = neighbor->cutneighsq[itype][itype]; - cutneighmax = sqrt(cutneighmaxsq); - cuttypesq = neighbor->cuttypesq; - - // sx,sy,sz = max range of stencil in each dim - // smax = max possible size of entire 2d stencil - // stencil will be empty if cutneighmax = 0.0 - - sx = static_cast (cutneighmax*bininvx); - if (sx*binsizex < cutneighmax) sx++; - sy = static_cast (cutneighmax*bininvy); - if (sy*binsizey < cutneighmax) sy++; - sz = static_cast (cutneighmax*bininvz); - if (sz*binsizez < cutneighmax) sz++; - - return ((2*sx+1) * (2*sy+1) * (2*sz+1)); -} - -/* ---------------------------------------------------------------------- */ - -void NStencilHalfBytype2dNewton::create_setup() -{ - - int itype, jtype; - int maxtypes; - int smax; - - // maxstencil_type to superclass? - maxtypes = atom->ntypes; - - if (maxstencil_type == NULL) { - memory->create(maxstencil_type, maxtypes+1, maxtypes+1, "maxstencil_type"); - memory->create(nstencil_type, maxtypes+1, maxtypes+1, "nstencil_type"); - stencil_type = new int**[maxtypes+1](); - for (itype = 1; itype <= maxtypes; ++itype) { - stencil_type[itype] = new int*[maxtypes+1](); - for (jtype = 1; jtype <= maxtypes; ++jtype) { - maxstencil_type[itype][jtype] = 0; - nstencil_type[itype][jtype] = 0; - } - } - } - - // like -> like => use standard Newton stencil at bin - - for (itype = 1; itype <= maxtypes; ++itype) { - copy_bin_info_bytype(itype); - smax = copy_neigh_info_bytype(itype); - if (smax > maxstencil_type[itype][itype]) { - maxstencil_type[itype][itype] = smax; - memory->destroy(stencil_type[itype][itype]); - memory->create(stencil_type[itype][itype], smax, - "NStencilHalfBytypeNewton::create_steup() stencil"); - } - create_newton(itype, itype, cutneighmaxsq); - } - - // Cross types: "Newton on" reached by using Newton off stencil and - // looking one way through hierarchy - // smaller -> larger => use Newton off stencil in larger bin - // larger -> smaller => no nstecil required - // If cut offs are same, use existing type-type stencil - - for (itype = 1; itype <= maxtypes; ++itype) { - for (jtype = 1; jtype <= maxtypes; ++jtype) { - if (itype == jtype) continue; - if (cuttypesq[itype] == cuttypesq[jtype]) { - nstencil_type[itype][jtype] = nstencil_type[jtype][jtype]; - stencil_type[itype][jtype] = stencil_type[jtype][jtype]; - } - else if (cuttypesq[itype] < cuttypesq[jtype]) { - copy_bin_info_bytype(jtype); - - cutneighmaxsq = cuttypesq[jtype]; - cutneighmax = sqrt(cutneighmaxsq); - sx = static_cast (cutneighmax*bininvx); - if (sx*binsizex < cutneighmax) sx++; - sy = static_cast (cutneighmax*bininvy); - if (sy*binsizey < cutneighmax) sy++; - sz = static_cast (cutneighmax*bininvz); - if (sz*binsizez < cutneighmax) sz++; - - smax = (2*sx+1) * (2*sy+1) * (2*sz+1); - if (smax > maxstencil_type[itype][jtype]) { - maxstencil_type[itype][jtype] = smax; - memory->destroy(stencil_type[itype][jtype]); - memory->create(stencil_type[itype][jtype], smax, "stencil_type[]"); - } - create_newtoff(itype, jtype, cuttypesq[jtype]); - } - } - } - -} - -/* ---------------------------------------------------------------------- */ - -void NStencilHalfBytype2dNewton::create_newton(int itype, int jtype, double cutsq) { - - int i, j, ns; - - ns = 0; - - for (j = 0; j <= sy; j++) - for (i = -sx; i <= sx; i++) - if (j > 0 || (j == 0 && i > 0)) { - if (bin_distance(i,j,0) < cutsq) - stencil_type[itype][jtype][ns++] = j*mbinx + i; - } - nstencil_type[itype][jtype] = ns; -} - -/* ---------------------------------------------------------------------- */ - -void NStencilHalfBytype2dNewton::create_newtoff(int itype, int jtype, double cutsq) { - - int i, j, ns; - - ns = 0; - - for (j = -sy; j <= sy; j++) - for (i = -sx; i <= sx; i++) - if (bin_distance(i,j,0) < cutsq) - stencil_type[itype][jtype][ns++] = j*mbinx + i; - - nstencil_type[itype][jtype] = ns; -} - -/* ---------------------------------------------------------------------- - create stencil based on bin geometry and cutoff -------------------------------------------------------------------------- */ - -void NStencilHalfBytype2dNewton::create() -{ - // KS. Move "creation" here. -} diff --git a/src/nstencil_half_multi2_2d_newton.h b/src/nstencil_half_multi2_2d_newton.h deleted file mode 100644 index 4d33c26a71..0000000000 --- a/src/nstencil_half_multi2_2d_newton.h +++ /dev/null @@ -1,52 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/bytype/2d/newton, - NStencilHalfBytype2dNewton, - NS_HALF | NS_BYTYPE | NS_2D | NS_NEWTON | NS_ORTHO) - -#else - -#ifndef LMP_NSTENCIL_HALF_BYTYPE_2D_NEWTON_H -#define LMP_NSTENCIL_HALF_BYTYPE_2D_NEWTON_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfBytype2dNewton : public NStencil { - public: - NStencilHalfBytype2dNewton(class LAMMPS *); - ~NStencilHalfBytype2dNewton(); - void create_setup(); - void create(); - - private: - int ** maxstencil_type; - - void copy_bin_info_bytype(int); - int copy_neigh_info_bytype(int); - void create_newton(int, int, double); - void create_newtoff(int, int, double); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_multi2_3d_newton.cpp b/src/nstencil_half_multi2_3d.cpp similarity index 100% rename from src/nstencil_half_multi2_3d_newton.cpp rename to src/nstencil_half_multi2_3d.cpp diff --git a/src/nstencil_half_multi2_3d_newton_tri.h b/src/nstencil_half_multi2_3d.h old mode 100755 new mode 100644 similarity index 82% rename from src/nstencil_half_multi2_3d_newton_tri.h rename to src/nstencil_half_multi2_3d.h index e419161bb5..e39db1c1e1 --- a/src/nstencil_half_multi2_3d_newton_tri.h +++ b/src/nstencil_half_multi2_3d.h @@ -13,14 +13,13 @@ #ifdef NSTENCIL_CLASS -NStencilStyle(half/bytype/3d/newton, - NStencilHalfBytype3dNewton, - NS_HALF | NS_BYTYPE | NS_3D | NS_NEWTON | NS_TRI) +NStencilStyle(half/bytype/3d, + NStencilHalfBytype3dNewton, NS_HALF | NS_BYTYPE | NS_3D | NS_ORTHO) #else -#ifndef LMP_NSTENCIL_HALF_BYTYPE_3D_NEWTON_H -#define LMP_NSTENCIL_HALF_BYTYPE_3D_NEWTON_H +#ifndef LMP_NSTENCIL_HALF_BYTYPE_3D_H +#define LMP_NSTENCIL_HALF_BYTYPE_3D_H #include "nstencil.h" diff --git a/src/nstencil_half_multi2_3d_newtoff.cpp b/src/nstencil_half_multi2_3d_delete_noff.cpp similarity index 100% rename from src/nstencil_half_multi2_3d_newtoff.cpp rename to src/nstencil_half_multi2_3d_delete_noff.cpp diff --git a/src/nstencil_half_multi2_3d_newtoff.h b/src/nstencil_half_multi2_3d_delete_noff.h similarity index 100% rename from src/nstencil_half_multi2_3d_newtoff.h rename to src/nstencil_half_multi2_3d_delete_noff.h diff --git a/src/nstencil_half_multi2_3d_newton_tri.cpp b/src/nstencil_half_multi2_3d_tri.cpp similarity index 100% rename from src/nstencil_half_multi2_3d_newton_tri.cpp rename to src/nstencil_half_multi2_3d_tri.cpp diff --git a/src/nstencil_half_multi2_3d_newton.h b/src/nstencil_half_multi2_3d_tri.h old mode 100644 new mode 100755 similarity index 82% rename from src/nstencil_half_multi2_3d_newton.h rename to src/nstencil_half_multi2_3d_tri.h index cbb88fcb1d..5424d73f11 --- a/src/nstencil_half_multi2_3d_newton.h +++ b/src/nstencil_half_multi2_3d_tri.h @@ -13,14 +13,13 @@ #ifdef NSTENCIL_CLASS -NStencilStyle(half/bytype/3d/newton, - NStencilHalfBytype3dNewton, - NS_HALF | NS_BYTYPE | NS_3D | NS_NEWTON | NS_ORTHO) +NStencilStyle(half/bytype/3d, + NStencilHalfBytype3d, NS_HALF | NS_BYTYPE | NS_3D | NS_TRI) #else -#ifndef LMP_NSTENCIL_HALF_BYTYPE_3D_NEWTON_H -#define LMP_NSTENCIL_HALF_BYTYPE_3D_NEWTON_H +#ifndef LMP_NSTENCIL_HALF_BYTYPE_3D_H +#define LMP_NSTENCIL_HALF_BYTYPE_3D_H #include "nstencil.h" diff --git a/src/nstencil_half_multi_2d_newton.cpp b/src/nstencil_half_multi_2d.cpp similarity index 89% rename from src/nstencil_half_multi_2d_newton.cpp rename to src/nstencil_half_multi_2d.cpp index f6f6c488a5..db009030cf 100644 --- a/src/nstencil_half_multi_2d_newton.cpp +++ b/src/nstencil_half_multi_2d.cpp @@ -11,21 +11,21 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "nstencil_half_multi_2d_newton.h" +#include "nstencil_half_multi_2d.h" #include "atom.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfMulti2dNewton:: -NStencilHalfMulti2dNewton(LAMMPS *lmp) : NStencil(lmp) {} +NStencilHalfMulti2d:: +NStencilHalfMulti2d(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- create stencil based on bin geometry and cutoff ------------------------------------------------------------------------- */ -void NStencilHalfMulti2dNewton::create() +void NStencilHalfMulti2d::create() { int i,j,n; double rsq,typesq; diff --git a/src/nstencil_half_multi_2d.h b/src/nstencil_half_multi_2d.h new file mode 100644 index 0000000000..128d37a2e9 --- /dev/null +++ b/src/nstencil_half_multi_2d.h @@ -0,0 +1,42 @@ +/* -*- 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 NSTENCIL_CLASS + +NStencilStyle(half/multi/2d, + NStencilHalfMulti2d, NS_HALF | NS_MULTI | NS_2D | NS_ORTHO) + +#else + +#ifndef LMP_NSTENCIL_HALF_MULTI_2D_H +#define LMP_NSTENCIL_HALF_MULTI_2D_H + +#include "nstencil.h" + +namespace LAMMPS_NS { + +class NStencilHalfMulti2d : public NStencil { + public: + NStencilHalfMulti2d(class LAMMPS *); + ~NStencilHalfMulti2d() {} + void create(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +*/ diff --git a/src/nstencil_half_multi_2d_newtoff.cpp b/src/nstencil_half_multi_2d_newtoff.cpp deleted file mode 100644 index 63cd3fd524..0000000000 --- a/src/nstencil_half_multi_2d_newtoff.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* ---------------------------------------------------------------------- - 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 "nstencil_half_multi_2d_newtoff.h" -#include "atom.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -NStencilHalfMulti2dNewtoff:: -NStencilHalfMulti2dNewtoff(LAMMPS *lmp) : NStencil(lmp) {} - -/* ---------------------------------------------------------------------- - create stencil based on bin geometry and cutoff -------------------------------------------------------------------------- */ - -void NStencilHalfMulti2dNewtoff::create() -{ - int i,j,n; - double rsq,typesq; - int *s; - double *distsq; - - int ntypes = atom->ntypes; - for (int itype = 1; itype <= ntypes; itype++) { - typesq = cuttypesq[itype]; - s = stencil_multi[itype]; - distsq = distsq_multi[itype]; - n = 0; - for (j = -sy; j <= sy; j++) - for (i = -sx; i <= sx; i++) { - rsq = bin_distance(i,j,0); - if (rsq < typesq) { - distsq[n] = rsq; - s[n++] = j*mbinx + i; - } - } - nstencil_multi[itype] = n; - } -} diff --git a/src/nstencil_half_multi_2d_newtoff.h b/src/nstencil_half_multi_2d_newtoff.h deleted file mode 100644 index 5603f37beb..0000000000 --- a/src/nstencil_half_multi_2d_newtoff.h +++ /dev/null @@ -1,43 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/multi/2d/newtoff, - NStencilHalfMulti2dNewtoff, - NS_HALF | NS_MULTI | NS_2D | NS_NEWTOFF | NS_ORTHO | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_MULTI_2D_NEWTOFF_H -#define LMP_NSTENCIL_HALF_MULTI_2D_NEWTOFF_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfMulti2dNewtoff : public NStencil { - public: - NStencilHalfMulti2dNewtoff(class LAMMPS *); - ~NStencilHalfMulti2dNewtoff() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_multi_2d_newton_tri.h b/src/nstencil_half_multi_2d_newton_tri.h deleted file mode 100644 index 62d7dfdebf..0000000000 --- a/src/nstencil_half_multi_2d_newton_tri.h +++ /dev/null @@ -1,43 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/multi/2d/newton/tri, - NStencilHalfMulti2dNewtonTri, - NS_HALF | NS_MULTI | NS_2D | NS_NEWTON | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_MULTI_2D_NEWTON_TRI_H -#define LMP_NSTENCIL_HALF_MULTI_2D_NEWTON_TRI_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfMulti2dNewtonTri : public NStencil { - public: - NStencilHalfMulti2dNewtonTri(class LAMMPS *); - ~NStencilHalfMulti2dNewtonTri() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_multi_2d_newton_tri.cpp b/src/nstencil_half_multi_2d_tri.cpp similarity index 88% rename from src/nstencil_half_multi_2d_newton_tri.cpp rename to src/nstencil_half_multi_2d_tri.cpp index b44ab36ea0..fef551f3e0 100644 --- a/src/nstencil_half_multi_2d_newton_tri.cpp +++ b/src/nstencil_half_multi_2d_tri.cpp @@ -11,21 +11,21 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "nstencil_half_multi_2d_newton_tri.h" +#include "nstencil_half_multi_2d_tri.h" #include "atom.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfMulti2dNewtonTri:: -NStencilHalfMulti2dNewtonTri(LAMMPS *lmp) : NStencil(lmp) {} +NStencilHalfMulti2dTri:: +NStencilHalfMulti2dTri(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- create stencil based on bin geometry and cutoff ------------------------------------------------------------------------- */ -void NStencilHalfMulti2dNewtonTri::create() +void NStencilHalfMulti2dTri::create() { int i,j,n; double rsq,typesq; diff --git a/src/nstencil_half_multi_2d_tri.h b/src/nstencil_half_multi_2d_tri.h new file mode 100644 index 0000000000..776c42e96b --- /dev/null +++ b/src/nstencil_half_multi_2d_tri.h @@ -0,0 +1,42 @@ +/* -*- 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 NSTENCIL_CLASS + +NStencilStyle(half/multi/2d/tri, + NStencilHalfMulti2dTri, NS_HALF | NS_MULTI | NS_2D | NS_TRI) + +#else + +#ifndef LMP_NSTENCIL_HALF_MULTI_2D_TRI_H +#define LMP_NSTENCIL_HALF_MULTI_2D_TRI_H + +#include "nstencil.h" + +namespace LAMMPS_NS { + +class NStencilHalfMulti2dTri : public NStencil { + public: + NStencilHalfMulti2dTri(class LAMMPS *); + ~NStencilHalfMulti2dTri() {} + void create(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +*/ diff --git a/src/nstencil_half_multi_3d_newton.cpp b/src/nstencil_half_multi_3d.cpp similarity index 90% rename from src/nstencil_half_multi_3d_newton.cpp rename to src/nstencil_half_multi_3d.cpp index 5b0c7f9f63..ca1c7f2f02 100644 --- a/src/nstencil_half_multi_3d_newton.cpp +++ b/src/nstencil_half_multi_3d.cpp @@ -11,21 +11,21 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "nstencil_half_multi_3d_newton.h" +#include "nstencil_half_multi_3d.h" #include "atom.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfMulti3dNewton:: -NStencilHalfMulti3dNewton(LAMMPS *lmp) : NStencil(lmp) {} +NStencilHalfMulti3d:: +NStencilHalfMulti3d(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- create stencil based on bin geometry and cutoff ------------------------------------------------------------------------- */ -void NStencilHalfMulti3dNewton::create() +void NStencilHalfMulti3d::create() { int i,j,k,n; double rsq,typesq; diff --git a/src/nstencil_half_multi_3d.h b/src/nstencil_half_multi_3d.h new file mode 100644 index 0000000000..51cf9d5c29 --- /dev/null +++ b/src/nstencil_half_multi_3d.h @@ -0,0 +1,42 @@ +/* -*- 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 NSTENCIL_CLASS + +NStencilStyle(half/multi/3d, + NStencilHalfMulti3d, NS_HALF | NS_MULTI | NS_3D | NS_ORTHO) + +#else + +#ifndef LMP_NSTENCIL_HALF_MULTI_3D_H +#define LMP_NSTENCIL_HALF_MULTI_3D_H + +#include "nstencil.h" + +namespace LAMMPS_NS { + +class NStencilHalfMulti3d : public NStencil { + public: + NStencilHalfMulti3d(class LAMMPS *); + ~NStencilHalfMulti3d() {} + void create(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +*/ diff --git a/src/nstencil_half_multi_3d_newtoff.cpp b/src/nstencil_half_multi_3d_newtoff.cpp deleted file mode 100644 index 5a83c4e002..0000000000 --- a/src/nstencil_half_multi_3d_newtoff.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* ---------------------------------------------------------------------- - 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 "nstencil_half_multi_3d_newtoff.h" -#include "atom.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -NStencilHalfMulti3dNewtoff:: -NStencilHalfMulti3dNewtoff(LAMMPS *lmp) : NStencil(lmp) {} - -/* ---------------------------------------------------------------------- - create stencil based on bin geometry and cutoff -------------------------------------------------------------------------- */ - -void NStencilHalfMulti3dNewtoff::create() -{ - int i,j,k,n; - double rsq,typesq; - int *s; - double *distsq; - - int ntypes = atom->ntypes; - for (int itype = 1; itype <= ntypes; itype++) { - typesq = cuttypesq[itype]; - s = stencil_multi[itype]; - distsq = distsq_multi[itype]; - n = 0; - for (k = -sz; k <= sz; k++) - for (j = -sy; j <= sy; j++) - for (i = -sx; i <= sx; i++) { - rsq = bin_distance(i,j,k); - if (rsq < typesq) { - distsq[n] = rsq; - s[n++] = k*mbiny*mbinx + j*mbinx + i; - } - } - nstencil_multi[itype] = n; - } -} diff --git a/src/nstencil_half_multi_3d_newtoff.h b/src/nstencil_half_multi_3d_newtoff.h deleted file mode 100644 index 99428deb6a..0000000000 --- a/src/nstencil_half_multi_3d_newtoff.h +++ /dev/null @@ -1,43 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/multi/3d/newtoff, - NStencilHalfMulti3dNewtoff, - NS_HALF | NS_MULTI | NS_3D | NS_NEWTOFF | NS_ORTHO | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_MULTI_3D_NEWTOFF_H -#define LMP_NSTENCIL_HALF_MULTI_3D_NEWTOFF_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfMulti3dNewtoff : public NStencil { - public: - NStencilHalfMulti3dNewtoff(class LAMMPS *); - ~NStencilHalfMulti3dNewtoff() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_multi_3d_newton_tri.h b/src/nstencil_half_multi_3d_newton_tri.h deleted file mode 100644 index f6866489a4..0000000000 --- a/src/nstencil_half_multi_3d_newton_tri.h +++ /dev/null @@ -1,43 +0,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 NSTENCIL_CLASS - -NStencilStyle(half/multi/3d/newton/tri, - NStencilHalfMulti3dNewtonTri, - NS_HALF | NS_MULTI | NS_3D | NS_NEWTON | NS_TRI) - -#else - -#ifndef LMP_NSTENCIL_HALF_MULTI_3D_NEWTON_TRI_H -#define LMP_NSTENCIL_HALF_MULTI_3D_NEWTON_TRI_H - -#include "nstencil.h" - -namespace LAMMPS_NS { - -class NStencilHalfMulti3dNewtonTri : public NStencil { - public: - NStencilHalfMulti3dNewtonTri(class LAMMPS *); - ~NStencilHalfMulti3dNewtonTri() {} - void create(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/nstencil_half_multi_3d_newton_tri.cpp b/src/nstencil_half_multi_3d_tri.cpp similarity index 89% rename from src/nstencil_half_multi_3d_newton_tri.cpp rename to src/nstencil_half_multi_3d_tri.cpp index b25a0d0bdb..2970977a1e 100644 --- a/src/nstencil_half_multi_3d_newton_tri.cpp +++ b/src/nstencil_half_multi_3d_tri.cpp @@ -11,21 +11,21 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "nstencil_half_multi_3d_newton_tri.h" +#include "nstencil_half_multi_3d_tri.h" #include "atom.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -NStencilHalfMulti3dNewtonTri:: -NStencilHalfMulti3dNewtonTri(LAMMPS *lmp) : NStencil(lmp) {} +NStencilHalfMulti3dTri:: +NStencilHalfMulti3dTri(LAMMPS *lmp) : NStencil(lmp) {} /* ---------------------------------------------------------------------- create stencil based on bin geometry and cutoff ------------------------------------------------------------------------- */ -void NStencilHalfMulti3dNewtonTri::create() +void NStencilHalfMulti3dTri::create() { int i,j,k,n; double rsq,typesq; diff --git a/src/nstencil_half_multi_3d_tri.h b/src/nstencil_half_multi_3d_tri.h new file mode 100644 index 0000000000..f33f65cfea --- /dev/null +++ b/src/nstencil_half_multi_3d_tri.h @@ -0,0 +1,42 @@ +/* -*- 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 NSTENCIL_CLASS + +NStencilStyle(half/multi/3d/tri, + NStencilHalfMulti3dTri, NS_HALF | NS_MULTI | NS_3D | NS_TRI) + +#else + +#ifndef LMP_NSTENCIL_HALF_MULTI_3D_TRI_H +#define LMP_NSTENCIL_HALF_MULTI_3D_TRI_H + +#include "nstencil.h" + +namespace LAMMPS_NS { + +class NStencilHalfMulti3dTri : public NStencil { + public: + NStencilHalfMulti3dTri(class LAMMPS *); + ~NStencilHalfMulti3dTri() {} + void create(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +*/