Labelling stencils half/full, removing unnecessary newton on/off designation

This commit is contained in:
Joel Clemmer
2020-11-10 17:15:28 -07:00
parent 943a187be7
commit af57879416
49 changed files with 261 additions and 1060 deletions

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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();
};

View File

@ -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;
}

View File

@ -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:
*/

View File

@ -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:
*/

View File

@ -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;

View File

@ -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();
};

View File

@ -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;

View File

@ -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();
};

View File

@ -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;
}

View File

@ -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:
*/

View File

@ -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:
*/

View File

@ -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;

View File

@ -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();
};

View File

@ -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;
}
}

View File

@ -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:
*/

View File

@ -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;
}
}

View File

@ -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:
*/

View File

@ -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 <math.h>
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<int> (cutneighmax*bininvx);
if (sx*binsizex < cutneighmax) sx++;
sy = static_cast<int> (cutneighmax*bininvy);
if (sy*binsizey < cutneighmax) sy++;
sz = static_cast<int> (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<int> (cutneighmax*bininvx);
if (sx*binsizex < cutneighmax) sx++;
sy = static_cast<int> (cutneighmax*bininvy);
if (sy*binsizey < cutneighmax) sy++;
sz = static_cast<int> (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.
}

View File

@ -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:
*/

View File

@ -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"

View File

@ -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"

View File

@ -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;

View File

@ -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:
*/

View File

@ -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;
}
}

View File

@ -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:
*/

View File

@ -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:
*/

View File

@ -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;

View File

@ -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:
*/

View File

@ -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;

View File

@ -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:
*/

View File

@ -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;
}
}

View File

@ -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:
*/

View File

@ -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:
*/

View File

@ -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;

View File

@ -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:
*/