Renaming multi2->multi npair classes, renaming npair multi variables
This commit is contained in:
@ -94,10 +94,10 @@ void NPairFullMultiOldOmp::build(NeighList *list)
|
|||||||
// skip i = j
|
// skip i = j
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "omp_compat.h"
|
#include "omp_compat.h"
|
||||||
#include "npair_full_multi2_omp.h"
|
#include "npair_full_multi_omp.h"
|
||||||
#include "npair_omp.h"
|
#include "npair_omp.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
@ -26,15 +26,15 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairFullMulti2Omp::NPairFullMulti2Omp(LAMMPS *lmp) : NPair(lmp) {}
|
NPairFullMultiOmp::NPairFullMultiOmp(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
binned neighbor list construction for all neighbors
|
binned neighbor list construction for all neighbors
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
every neighbor pair appears in list of both atoms i and j
|
every neighbor pair appears in list of both atoms i and j
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairFullMulti2Omp::build(NeighList *list)
|
void NPairFullMultiOmp::build(NeighList *list)
|
||||||
{
|
{
|
||||||
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
||||||
const int molecular = atom->molecular;
|
const int molecular = atom->molecular;
|
||||||
@ -89,7 +89,7 @@ void NPairFullMulti2Omp::build(NeighList *list)
|
|||||||
tagprev = tag[i] - iatom - 1;
|
tagprev = tag[i] - iatom - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -102,12 +102,12 @@ void NPairFullMulti2Omp::build(NeighList *list)
|
|||||||
// skip i = j
|
// skip i = j
|
||||||
// use full stencil for all type combinations
|
// use full stencil for all type combinations
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if (i == j) continue;
|
if (i == j) continue;
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
@ -13,24 +13,24 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(full/multi2/omp,
|
NPairStyle(full/multi/omp,
|
||||||
NPairFullMulti2Omp,
|
NPairFullMultiOmp,
|
||||||
NP_FULL | NP_MULTI2 | NP_OMP |
|
NP_FULL | NP_MULTI | NP_OMP |
|
||||||
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_FULL_MULTI2_OMP_H
|
#ifndef LMP_NPAIR_FULL_MULTI_OMP_H
|
||||||
#define LMP_NPAIR_FULL_MULTI2_OMP_H
|
#define LMP_NPAIR_FULL_MULTI_OMP_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairFullMulti2Omp : public NPair {
|
class NPairFullMultiOmp : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairFullMulti2Omp(class LAMMPS *);
|
NPairFullMultiOmp(class LAMMPS *);
|
||||||
~NPairFullMulti2Omp() {}
|
~NPairFullMultiOmp() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "omp_compat.h"
|
#include "omp_compat.h"
|
||||||
#include "npair_half_multi2_newtoff_omp.h"
|
#include "npair_half_multi_newtoff_omp.h"
|
||||||
#include "npair_omp.h"
|
#include "npair_omp.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
@ -26,17 +26,17 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfMulti2NewtoffOmp::NPairHalfMulti2NewtoffOmp(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfMultiNewtoffOmp::NPairHalfMultiNewtoffOmp(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
binned neighbor list construction with partial Newton's 3rd law
|
binned neighbor list construction with partial Newton's 3rd law
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks own bin and other bins in stencil
|
each owned atom i checks own bin and other bins in stencil
|
||||||
pair stored once if i,j are both owned and i < j
|
pair stored once if i,j are both owned and i < j
|
||||||
pair stored by me if j is ghost (also stored by proc owning j)
|
pair stored by me if j is ghost (also stored by proc owning j)
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfMulti2NewtoffOmp::build(NeighList *list)
|
void NPairHalfMultiNewtoffOmp::build(NeighList *list)
|
||||||
{
|
{
|
||||||
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
||||||
const int molecular = atom->molecular;
|
const int molecular = atom->molecular;
|
||||||
@ -91,7 +91,7 @@ void NPairHalfMulti2NewtoffOmp::build(NeighList *list)
|
|||||||
tagprev = tag[i] - iatom - 1;
|
tagprev = tag[i] - iatom - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -106,12 +106,12 @@ void NPairHalfMulti2NewtoffOmp::build(NeighList *list)
|
|||||||
// stores own/ghost pairs on both procs
|
// stores own/ghost pairs on both procs
|
||||||
// use full stencil for all type combinations
|
// use full stencil for all type combinations
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >=0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >=0; j = bins_multi[jtype][j]) {
|
||||||
if (j <= i) continue;
|
if (j <= i) continue;
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
43
src/USER-OMP/npair_half_multi_newtoff_omp.h
Executable file
43
src/USER-OMP/npair_half_multi_newtoff_omp.h
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
/* -*- 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 NPAIR_CLASS
|
||||||
|
|
||||||
|
NPairStyle(half/multi/newtoff/omp,
|
||||||
|
NPairHalfMultiNewtoffOmp,
|
||||||
|
NP_HALF | NP_MULTI | NP_NEWTOFF | NP_OMP | NP_ORTHO | NP_TRI)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef LMP_NPAIR_HALF_MULTI_NEWTOFF_OMP_H
|
||||||
|
#define LMP_NPAIR_HALF_MULTI_NEWTOFF_OMP_H
|
||||||
|
|
||||||
|
#include "npair.h"
|
||||||
|
|
||||||
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
|
class NPairHalfMultiNewtoffOmp : public NPair {
|
||||||
|
public:
|
||||||
|
NPairHalfMultiNewtoffOmp(class LAMMPS *);
|
||||||
|
~NPairHalfMultiNewtoffOmp() {}
|
||||||
|
void build(class NeighList *);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ERROR/WARNING messages:
|
||||||
|
|
||||||
|
*/
|
||||||
@ -12,7 +12,7 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "omp_compat.h"
|
#include "omp_compat.h"
|
||||||
#include "npair_half_multi2_newton_omp.h"
|
#include "npair_half_multi_newton_omp.h"
|
||||||
#include "npair_omp.h"
|
#include "npair_omp.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
@ -26,16 +26,16 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfMulti2NewtonOmp::NPairHalfMulti2NewtonOmp(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfMultiNewtonOmp::NPairHalfMultiNewtonOmp(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
binned neighbor list construction with full Newton's 3rd law
|
binned neighbor list construction with full Newton's 3rd law
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks its own bin and other bins in Newton stencil
|
each owned atom i checks its own bin and other bins in Newton stencil
|
||||||
every pair stored exactly once by some processor
|
every pair stored exactly once by some processor
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfMulti2NewtonOmp::build(NeighList *list)
|
void NPairHalfMultiNewtonOmp::build(NeighList *list)
|
||||||
{
|
{
|
||||||
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
||||||
const int molecular = atom->molecular;
|
const int molecular = atom->molecular;
|
||||||
@ -90,7 +90,7 @@ void NPairHalfMulti2NewtonOmp::build(NeighList *list)
|
|||||||
tagprev = tag[i] - iatom - 1;
|
tagprev = tag[i] - iatom - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -109,9 +109,9 @@ void NPairHalfMulti2NewtonOmp::build(NeighList *list)
|
|||||||
// if j is owned atom, store it, since j is beyond i in linked list
|
// if j is owned atom, store it, since j is beyond i in linked list
|
||||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||||
|
|
||||||
js = bins_multi2[itype][i];
|
js = bins_multi[itype][i];
|
||||||
|
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if (j >= nlocal) {
|
if (j >= nlocal) {
|
||||||
if (x[j][2] < ztmp) continue;
|
if (x[j][2] < ztmp) continue;
|
||||||
if (x[j][2] == ztmp) {
|
if (x[j][2] == ztmp) {
|
||||||
@ -150,9 +150,9 @@ void NPairHalfMulti2NewtonOmp::build(NeighList *list)
|
|||||||
// if j is owned atom, store it if j > i
|
// if j is owned atom, store it if j > i
|
||||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||||
|
|
||||||
js = binhead_multi2[jtype][jbin];
|
js = binhead_multi[jtype][jbin];
|
||||||
|
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if(j < i) continue;
|
if(j < i) continue;
|
||||||
|
|
||||||
if (j >= nlocal) {
|
if (j >= nlocal) {
|
||||||
@ -194,12 +194,12 @@ void NPairHalfMulti2NewtonOmp::build(NeighList *list)
|
|||||||
// stencil is half if i same size as j
|
// stencil is half if i same size as j
|
||||||
// stencil is full if i smaller than j
|
// stencil is full if i smaller than j
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
|
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(half/multi2/newton/omp,
|
NPairStyle(half/multi/newton/omp,
|
||||||
NPairHalfMulti2NewtonOmp,
|
NPairHalfMultiNewtonOmp,
|
||||||
NP_HALF | NP_MULTI2 | NP_NEWTON | NP_OMP | NP_ORTHO)
|
NP_HALF | NP_MULTI | NP_NEWTON | NP_OMP | NP_ORTHO)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_MULTI2_NEWTON_OMP_H
|
#ifndef LMP_NPAIR_HALF_MULTI_NEWTON_OMP_H
|
||||||
#define LMP_NPAIR_HALF_MULTI2_NEWTON_OMP_H
|
#define LMP_NPAIR_HALF_MULTI_NEWTON_OMP_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairHalfMulti2NewtonOmp : public NPair {
|
class NPairHalfMultiNewtonOmp : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairHalfMulti2NewtonOmp(class LAMMPS *);
|
NPairHalfMultiNewtonOmp(class LAMMPS *);
|
||||||
~NPairHalfMulti2NewtonOmp() {}
|
~NPairHalfMultiNewtonOmp() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "omp_compat.h"
|
#include "omp_compat.h"
|
||||||
#include "npair_half_multi2_newton_tri_omp.h"
|
#include "npair_half_multi_newton_tri_omp.h"
|
||||||
#include "npair_omp.h"
|
#include "npair_omp.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
@ -26,17 +26,17 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfMulti2NewtonTriOmp::NPairHalfMulti2NewtonTriOmp(LAMMPS *lmp) :
|
NPairHalfMultiNewtonTriOmp::NPairHalfMultiNewtonTriOmp(LAMMPS *lmp) :
|
||||||
NPair(lmp) {}
|
NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
binned neighbor list construction with Newton's 3rd law for triclinic
|
binned neighbor list construction with Newton's 3rd law for triclinic
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks its own bin and other bins in triclinic stencil
|
each owned atom i checks its own bin and other bins in triclinic stencil
|
||||||
every pair stored exactly once by some processor
|
every pair stored exactly once by some processor
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfMulti2NewtonTriOmp::build(NeighList *list)
|
void NPairHalfMultiNewtonTriOmp::build(NeighList *list)
|
||||||
{
|
{
|
||||||
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
||||||
const int molecular = atom->molecular;
|
const int molecular = atom->molecular;
|
||||||
@ -91,7 +91,7 @@ void NPairHalfMulti2NewtonTriOmp::build(NeighList *list)
|
|||||||
tagprev = tag[i] - iatom - 1;
|
tagprev = tag[i] - iatom - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -109,12 +109,12 @@ void NPairHalfMulti2NewtonTriOmp::build(NeighList *list)
|
|||||||
// (equal zyx and j <= i)
|
// (equal zyx and j <= i)
|
||||||
// latter excludes self-self interaction but allows superposed atoms
|
// latter excludes self-self interaction but allows superposed atoms
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
|
|
||||||
// if same size (e.g. same type), use half stencil
|
// if same size (e.g. same type), use half stencil
|
||||||
if(cutneighsq[itype][itype] == cutneighsq[jtype][jtype]){
|
if(cutneighsq[itype][itype] == cutneighsq[jtype][jtype]){
|
||||||
43
src/USER-OMP/npair_half_multi_newton_tri_omp.h
Executable file
43
src/USER-OMP/npair_half_multi_newton_tri_omp.h
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
/* -*- 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 NPAIR_CLASS
|
||||||
|
|
||||||
|
NPairStyle(half/multi/newton/tri/omp,
|
||||||
|
NPairHalfMultiNewtonTriOmp,
|
||||||
|
NP_HALF | NP_MULTI | NP_NEWTON | NP_TRI | NP_OMP)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef LMP_NPAIR_HALF_MULTI_NEWTON_TRI_OMP_H
|
||||||
|
#define LMP_NPAIR_HALF_MULTI_NEWTON_TRI_OMP_H
|
||||||
|
|
||||||
|
#include "npair.h"
|
||||||
|
|
||||||
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
|
class NPairHalfMultiNewtonTriOmp : public NPair {
|
||||||
|
public:
|
||||||
|
NPairHalfMultiNewtonTriOmp(class LAMMPS *);
|
||||||
|
~NPairHalfMultiNewtonTriOmp() {}
|
||||||
|
void build(class NeighList *);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ERROR/WARNING messages:
|
||||||
|
|
||||||
|
*/
|
||||||
@ -98,10 +98,10 @@ void NPairHalfMultiOldNewtoffOmp::build(NeighList *list)
|
|||||||
// stores own/ghost pairs on both procs
|
// stores own/ghost pairs on both procs
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
if (j <= i) continue;
|
if (j <= i) continue;
|
||||||
|
|||||||
@ -132,10 +132,10 @@ void NPairHalfMultiOldNewtonOmp::build(NeighList *list)
|
|||||||
// skip if i,j neighbor cutoff is less than bin distance
|
// skip if i,j neighbor cutoff is less than bin distance
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -100,10 +100,10 @@ void NPairHalfMultiOldNewtonTriOmp::build(NeighList *list)
|
|||||||
// latter excludes self-self interaction but allows superposed atoms
|
// latter excludes self-self interaction but allows superposed atoms
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -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 NPAIR_CLASS
|
|
||||||
|
|
||||||
NPairStyle(half/size/multi2/newtoff/omp,
|
|
||||||
NPairHalfSizeMulti2NewtoffOmp,
|
|
||||||
NP_HALF | NP_SIZE | NP_MULTI2 | NP_NEWTOFF | NP_OMP | NP_ORTHO | NP_TRI)
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_SIZE_MULTI2_NEWTOFF_OMP_H
|
|
||||||
#define LMP_NPAIR_HALF_SIZE_MULTI2_NEWTOFF_OMP_H
|
|
||||||
|
|
||||||
#include "npair.h"
|
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
|
||||||
|
|
||||||
class NPairHalfSizeMulti2NewtoffOmp : public NPair {
|
|
||||||
public:
|
|
||||||
NPairHalfSizeMulti2NewtoffOmp(class LAMMPS *);
|
|
||||||
~NPairHalfSizeMulti2NewtoffOmp() {}
|
|
||||||
void build(class NeighList *);
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ERROR/WARNING messages:
|
|
||||||
|
|
||||||
*/
|
|
||||||
@ -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 NPAIR_CLASS
|
|
||||||
|
|
||||||
NPairStyle(half/size/multi2/newton/omp,
|
|
||||||
NPairHalfSizeMulti2NewtonOmp,
|
|
||||||
NP_HALF | NP_SIZE | NP_MULTI2 | NP_NEWTON | NP_OMP | NP_ORTHO)
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_SIZE_MULTI2_NEWTON_OMP_H
|
|
||||||
#define LMP_NPAIR_HALF_SIZE_MULTI2_NEWTON_OMP_H
|
|
||||||
|
|
||||||
#include "npair.h"
|
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
|
||||||
|
|
||||||
class NPairHalfSizeMulti2NewtonOmp : public NPair {
|
|
||||||
public:
|
|
||||||
NPairHalfSizeMulti2NewtonOmp(class LAMMPS *);
|
|
||||||
~NPairHalfSizeMulti2NewtonOmp() {}
|
|
||||||
void build(class NeighList *);
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ERROR/WARNING messages:
|
|
||||||
|
|
||||||
*/
|
|
||||||
@ -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 NPAIR_CLASS
|
|
||||||
|
|
||||||
NPairStyle(half/size/multi2/newton/tri/omp,
|
|
||||||
NPairHalfSizeMulti2NewtonTriOmp,
|
|
||||||
NP_HALF | NP_SIZE | NP_MULTI2 | NP_NEWTON | NP_TRI | NP_OMP)
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_SIZE_MULTI2_NEWTON_TRI_OMP_H
|
|
||||||
#define LMP_NPAIR_HALF_SIZE_MULTI2_NEWTON_TRI_OMP_H
|
|
||||||
|
|
||||||
#include "npair.h"
|
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
|
||||||
|
|
||||||
class NPairHalfSizeMulti2NewtonTriOmp : public NPair {
|
|
||||||
public:
|
|
||||||
NPairHalfSizeMulti2NewtonTriOmp(class LAMMPS *);
|
|
||||||
~NPairHalfSizeMulti2NewtonTriOmp() {}
|
|
||||||
void build(class NeighList *);
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ERROR/WARNING messages:
|
|
||||||
|
|
||||||
*/
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "omp_compat.h"
|
#include "omp_compat.h"
|
||||||
#include "npair_half_size_multi2_newtoff_omp.h"
|
#include "npair_half_size_multi_newtoff_omp.h"
|
||||||
#include "npair_omp.h"
|
#include "npair_omp.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
@ -24,18 +24,18 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfSizeMulti2NewtoffOmp::NPairHalfSizeMulti2NewtoffOmp(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfSizeMultiNewtoffOmp::NPairHalfSizeMultiNewtoffOmp(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
size particles
|
size particles
|
||||||
binned neighbor list construction with partial Newton's 3rd law
|
binned neighbor list construction with partial Newton's 3rd law
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks own bin and other bins in stencil
|
each owned atom i checks own bin and other bins in stencil
|
||||||
pair stored once if i,j are both owned and i < j
|
pair stored once if i,j are both owned and i < j
|
||||||
pair stored by me if j is ghost (also stored by proc owning j)
|
pair stored by me if j is ghost (also stored by proc owning j)
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfSizeMulti2NewtoffOmp::build(NeighList *list)
|
void NPairHalfSizeMultiNewtoffOmp::build(NeighList *list)
|
||||||
{
|
{
|
||||||
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
||||||
const int history = list->history;
|
const int history = list->history;
|
||||||
@ -80,7 +80,7 @@ void NPairHalfSizeMulti2NewtoffOmp::build(NeighList *list)
|
|||||||
ztmp = x[i][2];
|
ztmp = x[i][2];
|
||||||
radi = radius[i];
|
radi = radius[i];
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -95,12 +95,12 @@ void NPairHalfSizeMulti2NewtoffOmp::build(NeighList *list)
|
|||||||
// stores own/ghost pairs on both procs
|
// stores own/ghost pairs on both procs
|
||||||
// use full stencil for all type combinations
|
// use full stencil for all type combinations
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >=0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >=0; j = bins_multi[jtype][j]) {
|
||||||
if (j <= i) continue;
|
if (j <= i) continue;
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(half/multi2/newtoff/omp,
|
NPairStyle(half/size/multi/newtoff/omp,
|
||||||
NPairHalfMulti2NewtoffOmp,
|
NPairHalfSizeMultiNewtoffOmp,
|
||||||
NP_HALF | NP_MULTI2 | NP_NEWTOFF | NP_OMP | NP_ORTHO | NP_TRI)
|
NP_HALF | NP_SIZE | NP_MULTI | NP_NEWTOFF | NP_OMP | NP_ORTHO | NP_TRI)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_MULTI2_NEWTOFF_OMP_H
|
#ifndef LMP_NPAIR_HALF_SIZE_MULTI_NEWTOFF_OMP_H
|
||||||
#define LMP_NPAIR_HALF_MULTI2_NEWTOFF_OMP_H
|
#define LMP_NPAIR_HALF_SIZE_MULTI_NEWTOFF_OMP_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairHalfMulti2NewtoffOmp : public NPair {
|
class NPairHalfSizeMultiNewtoffOmp : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairHalfMulti2NewtoffOmp(class LAMMPS *);
|
NPairHalfSizeMultiNewtoffOmp(class LAMMPS *);
|
||||||
~NPairHalfMulti2NewtoffOmp() {}
|
~NPairHalfSizeMultiNewtoffOmp() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "omp_compat.h"
|
#include "omp_compat.h"
|
||||||
#include "npair_half_size_multi2_newton_omp.h"
|
#include "npair_half_size_multi_newton_omp.h"
|
||||||
#include "npair_omp.h"
|
#include "npair_omp.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
@ -24,17 +24,17 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfSizeMulti2NewtonOmp::NPairHalfSizeMulti2NewtonOmp(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfSizeMultiNewtonOmp::NPairHalfSizeMultiNewtonOmp(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
size particles
|
size particles
|
||||||
binned neighbor list construction with full Newton's 3rd law
|
binned neighbor list construction with full Newton's 3rd law
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks its own bin and other bins in Newton stencil
|
each owned atom i checks its own bin and other bins in Newton stencil
|
||||||
every pair stored exactly once by some processor
|
every pair stored exactly once by some processor
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfSizeMulti2NewtonOmp::build(NeighList *list)
|
void NPairHalfSizeMultiNewtonOmp::build(NeighList *list)
|
||||||
{
|
{
|
||||||
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
||||||
const int history = list->history;
|
const int history = list->history;
|
||||||
@ -79,7 +79,7 @@ void NPairHalfSizeMulti2NewtonOmp::build(NeighList *list)
|
|||||||
ztmp = x[i][2];
|
ztmp = x[i][2];
|
||||||
radi = radius[i];
|
radi = radius[i];
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -98,9 +98,9 @@ void NPairHalfSizeMulti2NewtonOmp::build(NeighList *list)
|
|||||||
// if j is owned atom, store it, since j is beyond i in linked list
|
// if j is owned atom, store it, since j is beyond i in linked list
|
||||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||||
|
|
||||||
js = bins_multi2[itype][i];
|
js = bins_multi[itype][i];
|
||||||
|
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if (j >= nlocal) {
|
if (j >= nlocal) {
|
||||||
if (x[j][2] < ztmp) continue;
|
if (x[j][2] < ztmp) continue;
|
||||||
if (x[j][2] == ztmp) {
|
if (x[j][2] == ztmp) {
|
||||||
@ -132,9 +132,9 @@ void NPairHalfSizeMulti2NewtonOmp::build(NeighList *list)
|
|||||||
// if j is owned atom, store it if j > i
|
// if j is owned atom, store it if j > i
|
||||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||||
|
|
||||||
js = binhead_multi2[jtype][jbin];
|
js = binhead_multi[jtype][jbin];
|
||||||
|
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if(j < i) continue;
|
if(j < i) continue;
|
||||||
|
|
||||||
if (j >= nlocal) {
|
if (j >= nlocal) {
|
||||||
@ -169,12 +169,12 @@ void NPairHalfSizeMulti2NewtonOmp::build(NeighList *list)
|
|||||||
// stencil is half if i same size as j
|
// stencil is half if i same size as j
|
||||||
// stencil is full if i smaller than j
|
// stencil is full if i smaller than j
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
|
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(half/multi2/newton/tri/omp,
|
NPairStyle(half/size/multi/newton/omp,
|
||||||
NPairHalfMulti2NewtonTriOmp,
|
NPairHalfSizeMultiNewtonOmp,
|
||||||
NP_HALF | NP_MULTI2 | NP_NEWTON | NP_TRI | NP_OMP)
|
NP_HALF | NP_SIZE | NP_MULTI | NP_NEWTON | NP_OMP | NP_ORTHO)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_MULTI2_NEWTON_TRI_OMP_H
|
#ifndef LMP_NPAIR_HALF_SIZE_MULTI_NEWTON_OMP_H
|
||||||
#define LMP_NPAIR_HALF_MULTI2_NEWTON_TRI_OMP_H
|
#define LMP_NPAIR_HALF_SIZE_MULTI_NEWTON_OMP_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairHalfMulti2NewtonTriOmp : public NPair {
|
class NPairHalfSizeMultiNewtonOmp : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairHalfMulti2NewtonTriOmp(class LAMMPS *);
|
NPairHalfSizeMultiNewtonOmp(class LAMMPS *);
|
||||||
~NPairHalfMulti2NewtonTriOmp() {}
|
~NPairHalfSizeMultiNewtonOmp() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "omp_compat.h"
|
#include "omp_compat.h"
|
||||||
#include "npair_half_size_multi2_newton_tri_omp.h"
|
#include "npair_half_size_multi_newton_tri_omp.h"
|
||||||
#include "npair_omp.h"
|
#include "npair_omp.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
@ -24,18 +24,18 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfSizeMulti2NewtonTriOmp::NPairHalfSizeMulti2NewtonTriOmp(LAMMPS *lmp) :
|
NPairHalfSizeMultiNewtonTriOmp::NPairHalfSizeMultiNewtonTriOmp(LAMMPS *lmp) :
|
||||||
NPair(lmp) {}
|
NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
size particles
|
size particles
|
||||||
binned neighbor list construction with Newton's 3rd law for triclinic
|
binned neighbor list construction with Newton's 3rd law for triclinic
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks its own bin and other bins in triclinic stencil
|
each owned atom i checks its own bin and other bins in triclinic stencil
|
||||||
every pair stored exactly once by some processor
|
every pair stored exactly once by some processor
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfSizeMulti2NewtonTriOmp::build(NeighList *list)
|
void NPairHalfSizeMultiNewtonTriOmp::build(NeighList *list)
|
||||||
{
|
{
|
||||||
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
const int nlocal = (includegroup) ? atom->nfirst : atom->nlocal;
|
||||||
const int history = list->history;
|
const int history = list->history;
|
||||||
@ -80,7 +80,7 @@ void NPairHalfSizeMulti2NewtonTriOmp::build(NeighList *list)
|
|||||||
ztmp = x[i][2];
|
ztmp = x[i][2];
|
||||||
radi = radius[i];
|
radi = radius[i];
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -99,12 +99,12 @@ void NPairHalfSizeMulti2NewtonTriOmp::build(NeighList *list)
|
|||||||
// (equal zyx and j <= i)
|
// (equal zyx and j <= i)
|
||||||
// latter excludes self-self interaction but allows superposed atoms
|
// latter excludes self-self interaction but allows superposed atoms
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
|
|
||||||
// if same size (e.g. same type), use half stencil
|
// if same size (e.g. same type), use half stencil
|
||||||
if(cutneighsq[itype][itype] == cutneighsq[jtype][jtype]){
|
if(cutneighsq[itype][itype] == cutneighsq[jtype][jtype]){
|
||||||
43
src/USER-OMP/npair_half_size_multi_newton_tri_omp.h
Executable file
43
src/USER-OMP/npair_half_size_multi_newton_tri_omp.h
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
/* -*- 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 NPAIR_CLASS
|
||||||
|
|
||||||
|
NPairStyle(half/size/multi/newton/tri/omp,
|
||||||
|
NPairHalfSizeMultiNewtonTriOmp,
|
||||||
|
NP_HALF | NP_SIZE | NP_MULTI | NP_NEWTON | NP_TRI | NP_OMP)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef LMP_NPAIR_HALF_SIZE_MULTI_NEWTON_TRI_OMP_H
|
||||||
|
#define LMP_NPAIR_HALF_SIZE_MULTI_NEWTON_TRI_OMP_H
|
||||||
|
|
||||||
|
#include "npair.h"
|
||||||
|
|
||||||
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
|
class NPairHalfSizeMultiNewtonTriOmp : public NPair {
|
||||||
|
public:
|
||||||
|
NPairHalfSizeMultiNewtonTriOmp(class LAMMPS *);
|
||||||
|
~NPairHalfSizeMultiNewtonTriOmp() {}
|
||||||
|
void build(class NeighList *);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ERROR/WARNING messages:
|
||||||
|
|
||||||
|
*/
|
||||||
@ -86,10 +86,10 @@ void NPairHalfSizeMultiNewtoffOldOmp::build(NeighList *list)
|
|||||||
// stores own/ghost pairs on both procs
|
// stores own/ghost pairs on both procs
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
if (j <= i) continue;
|
if (j <= i) continue;
|
||||||
|
|||||||
@ -112,10 +112,10 @@ void NPairHalfSizeMultiNewtonOldOmp::build(NeighList *list)
|
|||||||
// skip if i,j neighbor cutoff is less than bin distance
|
// skip if i,j neighbor cutoff is less than bin distance
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -87,10 +87,10 @@ void NPairHalfSizeMultiOldNewtonTriOmp::build(NeighList *list)
|
|||||||
// latter excludes self-self interaction but allows superposed atoms
|
// latter excludes self-self interaction but allows superposed atoms
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -135,24 +135,24 @@ void NPair::copy_bin_info()
|
|||||||
bins = nb->bins;
|
bins = nb->bins;
|
||||||
binhead = nb->binhead;
|
binhead = nb->binhead;
|
||||||
|
|
||||||
nbinx_multi2 = nb->nbinx_multi2;
|
nbinx_multi = nb->nbinx_multi;
|
||||||
nbiny_multi2 = nb->nbiny_multi2;
|
nbiny_multi = nb->nbiny_multi;
|
||||||
nbinz_multi2 = nb->nbinz_multi2;
|
nbinz_multi = nb->nbinz_multi;
|
||||||
mbins_multi2 = nb->mbins_multi2;
|
mbins_multi = nb->mbins_multi;
|
||||||
mbinx_multi2 = nb->mbinx_multi2;
|
mbinx_multi = nb->mbinx_multi;
|
||||||
mbiny_multi2 = nb->mbiny_multi2;
|
mbiny_multi = nb->mbiny_multi;
|
||||||
mbinz_multi2 = nb->mbinz_multi2;
|
mbinz_multi = nb->mbinz_multi;
|
||||||
mbinxlo_multi2 = nb->mbinxlo_multi2;
|
mbinxlo_multi = nb->mbinxlo_multi;
|
||||||
mbinylo_multi2 = nb->mbinylo_multi2;
|
mbinylo_multi = nb->mbinylo_multi;
|
||||||
mbinzlo_multi2 = nb->mbinzlo_multi2;
|
mbinzlo_multi = nb->mbinzlo_multi;
|
||||||
|
|
||||||
bininvx_multi2 = nb->bininvx_multi2;
|
bininvx_multi = nb->bininvx_multi;
|
||||||
bininvy_multi2 = nb->bininvy_multi2;
|
bininvy_multi = nb->bininvy_multi;
|
||||||
bininvz_multi2 = nb->bininvz_multi2;
|
bininvz_multi = nb->bininvz_multi;
|
||||||
|
|
||||||
atom2bin_multi2 = nb->atom2bin_multi2;
|
atom2bin_multi = nb->atom2bin_multi;
|
||||||
bins_multi2 = nb->bins_multi2;
|
bins_multi = nb->bins_multi;
|
||||||
binhead_multi2 = nb->binhead_multi2;
|
binhead_multi = nb->binhead_multi;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
@ -164,12 +164,12 @@ void NPair::copy_stencil_info()
|
|||||||
nstencil = ns->nstencil;
|
nstencil = ns->nstencil;
|
||||||
stencil = ns->stencil;
|
stencil = ns->stencil;
|
||||||
stencilxyz = ns->stencilxyz;
|
stencilxyz = ns->stencilxyz;
|
||||||
|
nstencil_multi_old = ns->nstencil_multi_old;
|
||||||
|
stencil_multi_old = ns->stencil_multi_old;
|
||||||
|
distsq_multi_old = ns->distsq_multi_old;
|
||||||
|
|
||||||
nstencil_multi = ns->nstencil_multi;
|
nstencil_multi = ns->nstencil_multi;
|
||||||
stencil_multi = ns->stencil_multi;
|
stencil_multi = ns->stencil_multi;
|
||||||
distsq_multi = ns->distsq_multi;
|
|
||||||
|
|
||||||
nstencil_multi2 = ns->nstencil_multi2;
|
|
||||||
stencil_multi2 = ns->stencil_multi2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
@ -277,32 +277,32 @@ int NPair::coord2bin(double *x, int it)
|
|||||||
error->one(FLERR,"Non-numeric positions - simulation unstable");
|
error->one(FLERR,"Non-numeric positions - simulation unstable");
|
||||||
|
|
||||||
if (x[0] >= bboxhi[0])
|
if (x[0] >= bboxhi[0])
|
||||||
ix = static_cast<int> ((x[0]-bboxhi[0])*bininvx_multi2[it]) + nbinx_multi2[it];
|
ix = static_cast<int> ((x[0]-bboxhi[0])*bininvx_multi[it]) + nbinx_multi[it];
|
||||||
else if (x[0] >= bboxlo[0]) {
|
else if (x[0] >= bboxlo[0]) {
|
||||||
ix = static_cast<int> ((x[0]-bboxlo[0])*bininvx_multi2[it]);
|
ix = static_cast<int> ((x[0]-bboxlo[0])*bininvx_multi[it]);
|
||||||
ix = MIN(ix,nbinx_multi2[it]-1);
|
ix = MIN(ix,nbinx_multi[it]-1);
|
||||||
} else
|
} else
|
||||||
ix = static_cast<int> ((x[0]-bboxlo[0])*bininvx_multi2[it]) - 1;
|
ix = static_cast<int> ((x[0]-bboxlo[0])*bininvx_multi[it]) - 1;
|
||||||
|
|
||||||
if (x[1] >= bboxhi[1])
|
if (x[1] >= bboxhi[1])
|
||||||
iy = static_cast<int> ((x[1]-bboxhi[1])*bininvy_multi2[it]) + nbiny_multi2[it];
|
iy = static_cast<int> ((x[1]-bboxhi[1])*bininvy_multi[it]) + nbiny_multi[it];
|
||||||
else if (x[1] >= bboxlo[1]) {
|
else if (x[1] >= bboxlo[1]) {
|
||||||
iy = static_cast<int> ((x[1]-bboxlo[1])*bininvy_multi2[it]);
|
iy = static_cast<int> ((x[1]-bboxlo[1])*bininvy_multi[it]);
|
||||||
iy = MIN(iy,nbiny_multi2[it]-1);
|
iy = MIN(iy,nbiny_multi[it]-1);
|
||||||
} else
|
} else
|
||||||
iy = static_cast<int> ((x[1]-bboxlo[1])*bininvy_multi2[it]) - 1;
|
iy = static_cast<int> ((x[1]-bboxlo[1])*bininvy_multi[it]) - 1;
|
||||||
|
|
||||||
if (x[2] >= bboxhi[2])
|
if (x[2] >= bboxhi[2])
|
||||||
iz = static_cast<int> ((x[2]-bboxhi[2])*bininvz_multi2[it]) + nbinz_multi2[it];
|
iz = static_cast<int> ((x[2]-bboxhi[2])*bininvz_multi[it]) + nbinz_multi[it];
|
||||||
else if (x[2] >= bboxlo[2]) {
|
else if (x[2] >= bboxlo[2]) {
|
||||||
iz = static_cast<int> ((x[2]-bboxlo[2])*bininvz_multi2[it]);
|
iz = static_cast<int> ((x[2]-bboxlo[2])*bininvz_multi[it]);
|
||||||
iz = MIN(iz,nbinz_multi2[it]-1);
|
iz = MIN(iz,nbinz_multi[it]-1);
|
||||||
} else
|
} else
|
||||||
iz = static_cast<int> ((x[2]-bboxlo[2])*bininvz_multi2[it]) - 1;
|
iz = static_cast<int> ((x[2]-bboxlo[2])*bininvz_multi[it]) - 1;
|
||||||
|
|
||||||
|
|
||||||
ibin = (iz-mbinzlo_multi2[it])*mbiny_multi2[it]*mbinx_multi2[it]
|
ibin = (iz-mbinzlo_multi[it])*mbiny_multi[it]*mbinx_multi[it]
|
||||||
+ (iy-mbinylo_multi2[it])*mbinx_multi2[it]
|
+ (iy-mbinylo_multi[it])*mbinx_multi[it]
|
||||||
+ (ix-mbinxlo_multi2[it]);
|
+ (ix-mbinxlo_multi[it]);
|
||||||
return ibin;
|
return ibin;
|
||||||
}
|
}
|
||||||
24
src/npair.h
24
src/npair.h
@ -79,25 +79,25 @@ class NPair : protected Pointers {
|
|||||||
int *atom2bin,*bins;
|
int *atom2bin,*bins;
|
||||||
int *binhead;
|
int *binhead;
|
||||||
|
|
||||||
int *nbinx_multi2, *nbiny_multi2, *nbinz_multi2;
|
int *nbinx_multi, *nbiny_multi, *nbinz_multi;
|
||||||
int *mbins_multi2;
|
int *mbins_multi;
|
||||||
int *mbinx_multi2, *mbiny_multi2, *mbinz_multi2;
|
int *mbinx_multi, *mbiny_multi, *mbinz_multi;
|
||||||
int *mbinxlo_multi2, *mbinylo_multi2, *mbinzlo_multi2;
|
int *mbinxlo_multi, *mbinylo_multi, *mbinzlo_multi;
|
||||||
double *bininvx_multi2, *bininvy_multi2, *bininvz_multi2;
|
double *bininvx_multi, *bininvy_multi, *bininvz_multi;
|
||||||
int **binhead_multi2,**bins_multi2;
|
int **binhead_multi,**bins_multi;
|
||||||
int **atom2bin_multi2;
|
int **atom2bin_multi;
|
||||||
|
|
||||||
// data from NStencil class
|
// data from NStencil class
|
||||||
|
|
||||||
int nstencil;
|
int nstencil;
|
||||||
int *stencil;
|
int *stencil;
|
||||||
int **stencilxyz;
|
int **stencilxyz;
|
||||||
int *nstencil_multi;
|
int *nstencil_multi_old;
|
||||||
int **stencil_multi;
|
int **stencil_multi_old;
|
||||||
double **distsq_multi;
|
double **distsq_multi_old;
|
||||||
|
|
||||||
int ** nstencil_multi2;
|
int ** nstencil_multi;
|
||||||
int *** stencil_multi2;
|
int *** stencil_multi;
|
||||||
|
|
||||||
// data common to all NPair variants
|
// data common to all NPair variants
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "npair_full_multi2.h"
|
#include "npair_full_multi.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atom_vec.h"
|
#include "atom_vec.h"
|
||||||
@ -24,15 +24,15 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairFullMulti2::NPairFullMulti2(LAMMPS *lmp) : NPair(lmp) {}
|
NPairFullMulti::NPairFullMulti(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
binned neighbor list construction for all neighbors
|
binned neighbor list construction for all neighbors
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
every neighbor pair appears in list of both atoms i and j
|
every neighbor pair appears in list of both atoms i and j
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairFullMulti2::build(NeighList *list)
|
void NPairFullMulti::build(NeighList *list)
|
||||||
{
|
{
|
||||||
int i,j,k,n,itype,jtype,ibin,jbin,which,ns,imol,iatom,moltemplate;
|
int i,j,k,n,itype,jtype,ibin,jbin,which,ns,imol,iatom,moltemplate;
|
||||||
tagint tagprev;
|
tagint tagprev;
|
||||||
@ -78,7 +78,7 @@ void NPairFullMulti2::build(NeighList *list)
|
|||||||
tagprev = tag[i] - iatom - 1;
|
tagprev = tag[i] - iatom - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -91,12 +91,12 @@ void NPairFullMulti2::build(NeighList *list)
|
|||||||
// skip i = j
|
// skip i = j
|
||||||
// use full stencil for all type combinations
|
// use full stencil for all type combinations
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if (i == j) continue;
|
if (i == j) continue;
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(full/multi2,
|
NPairStyle(full/multi,
|
||||||
NPairFullMulti2,
|
NPairFullMulti,
|
||||||
NP_FULL | NP_MULTI2 | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
NP_FULL | NP_MULTI | NP_NEWTON | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_FULL_MULTI2_H
|
#ifndef LMP_NPAIR_FULL_MULTI_H
|
||||||
#define LMP_NPAIR_FULL_MULTI2_H
|
#define LMP_NPAIR_FULL_MULTI_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairFullMulti2 : public NPair {
|
class NPairFullMulti : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairFullMulti2(class LAMMPS *);
|
NPairFullMulti(class LAMMPS *);
|
||||||
~NPairFullMulti2() {}
|
~NPairFullMulti() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -83,10 +83,10 @@ void NPairFullMultiOld::build(NeighList *list)
|
|||||||
// skip i = j
|
// skip i = j
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "npair_half_multi2_newtoff.h"
|
#include "npair_half_multi_newtoff.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atom_vec.h"
|
#include "atom_vec.h"
|
||||||
@ -24,17 +24,17 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfMulti2Newtoff::NPairHalfMulti2Newtoff(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfMultiNewtoff::NPairHalfMultiNewtoff(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
binned neighbor list construction with partial Newton's 3rd law
|
binned neighbor list construction with partial Newton's 3rd law
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks own bin and other bins in stencil
|
each owned atom i checks own bin and other bins in stencil
|
||||||
pair stored once if i,j are both owned and i < j
|
pair stored once if i,j are both owned and i < j
|
||||||
pair stored by me if j is ghost (also stored by proc owning j)
|
pair stored by me if j is ghost (also stored by proc owning j)
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfMulti2Newtoff::build(NeighList *list)
|
void NPairHalfMultiNewtoff::build(NeighList *list)
|
||||||
{
|
{
|
||||||
int i,j,k,n,itype,jtype,ibin,jbin,which,ns,imol,iatom,moltemplate;
|
int i,j,k,n,itype,jtype,ibin,jbin,which,ns,imol,iatom,moltemplate;
|
||||||
tagint tagprev;
|
tagint tagprev;
|
||||||
@ -80,7 +80,7 @@ void NPairHalfMulti2Newtoff::build(NeighList *list)
|
|||||||
tagprev = tag[i] - iatom - 1;
|
tagprev = tag[i] - iatom - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -95,12 +95,12 @@ void NPairHalfMulti2Newtoff::build(NeighList *list)
|
|||||||
// stores own/ghost pairs on both procs
|
// stores own/ghost pairs on both procs
|
||||||
// use full stencil for all type combinations
|
// use full stencil for all type combinations
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >=0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >=0; j = bins_multi[jtype][j]) {
|
||||||
if (j <= i) continue;
|
if (j <= i) continue;
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(half/multi2/newtoff,
|
NPairStyle(half/multi/newtoff,
|
||||||
NPairHalfMulti2Newtoff,
|
NPairHalfMultiNewtoff,
|
||||||
NP_HALF | NP_MULTI2 | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
NP_HALF | NP_MULTI | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_MULTI2_NEWTOFF_H
|
#ifndef LMP_NPAIR_HALF_MULTI_NEWTOFF_H
|
||||||
#define LMP_NPAIR_HALF_MULTI2_NEWTOFF_H
|
#define LMP_NPAIR_HALF_MULTI_NEWTOFF_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairHalfMulti2Newtoff : public NPair {
|
class NPairHalfMultiNewtoff : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairHalfMulti2Newtoff(class LAMMPS *);
|
NPairHalfMultiNewtoff(class LAMMPS *);
|
||||||
~NPairHalfMulti2Newtoff() {}
|
~NPairHalfMultiNewtoff() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "npair_half_multi2_newton.h"
|
#include "npair_half_multi_newton.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atom_vec.h"
|
#include "atom_vec.h"
|
||||||
@ -24,16 +24,16 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfMulti2Newton::NPairHalfMulti2Newton(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfMultiNewton::NPairHalfMultiNewton(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
binned neighbor list construction with full Newton's 3rd law
|
binned neighbor list construction with full Newton's 3rd law
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks its own bin and other bins in Newton stencil
|
each owned atom i checks its own bin and other bins in Newton stencil
|
||||||
every pair stored exactly once by some processor
|
every pair stored exactly once by some processor
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfMulti2Newton::build(NeighList *list)
|
void NPairHalfMultiNewton::build(NeighList *list)
|
||||||
{
|
{
|
||||||
int i,j,k,n,itype,jtype,ibin,jbin,which,ns,imol,iatom,moltemplate;
|
int i,j,k,n,itype,jtype,ibin,jbin,which,ns,imol,iatom,moltemplate;
|
||||||
tagint tagprev;
|
tagint tagprev;
|
||||||
@ -79,7 +79,7 @@ void NPairHalfMulti2Newton::build(NeighList *list)
|
|||||||
tagprev = tag[i] - iatom - 1;
|
tagprev = tag[i] - iatom - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -98,9 +98,9 @@ void NPairHalfMulti2Newton::build(NeighList *list)
|
|||||||
// if j is owned atom, store it, since j is beyond i in linked list
|
// if j is owned atom, store it, since j is beyond i in linked list
|
||||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||||
|
|
||||||
js = bins_multi2[itype][i];
|
js = bins_multi[itype][i];
|
||||||
|
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if (j >= nlocal) {
|
if (j >= nlocal) {
|
||||||
if (x[j][2] < ztmp) continue;
|
if (x[j][2] < ztmp) continue;
|
||||||
if (x[j][2] == ztmp) {
|
if (x[j][2] == ztmp) {
|
||||||
@ -139,9 +139,9 @@ void NPairHalfMulti2Newton::build(NeighList *list)
|
|||||||
// if j is owned atom, store it if j > i
|
// if j is owned atom, store it if j > i
|
||||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||||
|
|
||||||
js = binhead_multi2[jtype][jbin];
|
js = binhead_multi[jtype][jbin];
|
||||||
|
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if(j < i) continue;
|
if(j < i) continue;
|
||||||
|
|
||||||
if (j >= nlocal) {
|
if (j >= nlocal) {
|
||||||
@ -183,12 +183,12 @@ void NPairHalfMulti2Newton::build(NeighList *list)
|
|||||||
// stencil is half if i same size as j
|
// stencil is half if i same size as j
|
||||||
// stencil is full if i smaller than j
|
// stencil is full if i smaller than j
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
|
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(half/multi2/newton,
|
NPairStyle(half/multi/newton,
|
||||||
NPairHalfMulti2Newton,
|
NPairHalfMultiNewton,
|
||||||
NP_HALF | NP_MULTI2 | NP_NEWTON | NP_ORTHO)
|
NP_HALF | NP_MULTI | NP_NEWTON | NP_ORTHO)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_MULTI2_NEWTON_H
|
#ifndef LMP_NPAIR_HALF_MULTI_NEWTON_H
|
||||||
#define LMP_NPAIR_HALF_MULTI2_NEWTON_H
|
#define LMP_NPAIR_HALF_MULTI_NEWTON_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairHalfMulti2Newton : public NPair {
|
class NPairHalfMultiNewton : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairHalfMulti2Newton(class LAMMPS *);
|
NPairHalfMultiNewton(class LAMMPS *);
|
||||||
~NPairHalfMulti2Newton() {}
|
~NPairHalfMultiNewton() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "npair_half_multi2_newton_tri.h"
|
#include "npair_half_multi_newton_tri.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atom_vec.h"
|
#include "atom_vec.h"
|
||||||
@ -24,16 +24,16 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfMulti2NewtonTri::NPairHalfMulti2NewtonTri(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfMultiNewtonTri::NPairHalfMultiNewtonTri(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
binned neighbor list construction with Newton's 3rd law for triclinic
|
binned neighbor list construction with Newton's 3rd law for triclinic
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks its own bin and other bins in triclinic stencil
|
each owned atom i checks its own bin and other bins in triclinic stencil
|
||||||
every pair stored exactly once by some processor
|
every pair stored exactly once by some processor
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfMulti2NewtonTri::build(NeighList *list)
|
void NPairHalfMultiNewtonTri::build(NeighList *list)
|
||||||
{
|
{
|
||||||
int i,j,k,n,itype,jtype,ibin,jbin,which,ns,imol,iatom,moltemplate;
|
int i,j,k,n,itype,jtype,ibin,jbin,which,ns,imol,iatom,moltemplate;
|
||||||
tagint tagprev;
|
tagint tagprev;
|
||||||
@ -79,7 +79,7 @@ void NPairHalfMulti2NewtonTri::build(NeighList *list)
|
|||||||
tagprev = tag[i] - iatom - 1;
|
tagprev = tag[i] - iatom - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -97,12 +97,12 @@ void NPairHalfMulti2NewtonTri::build(NeighList *list)
|
|||||||
// (equal zyx and j <= i)
|
// (equal zyx and j <= i)
|
||||||
// latter excludes self-self interaction but allows superposed atoms
|
// latter excludes self-self interaction but allows superposed atoms
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
|
|
||||||
// if same size (e.g. same type), use half stencil
|
// if same size (e.g. same type), use half stencil
|
||||||
if(cutneighsq[itype][itype] == cutneighsq[jtype][jtype]){
|
if(cutneighsq[itype][itype] == cutneighsq[jtype][jtype]){
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(half/multi2/newton/tri,
|
NPairStyle(half/multi/newton/tri,
|
||||||
NPairHalfMulti2NewtonTri,
|
NPairHalfMultiNewtonTri,
|
||||||
NP_HALF | NP_MULTI2 | NP_NEWTON | NP_TRI)
|
NP_HALF | NP_MULTI | NP_NEWTON | NP_TRI)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_MULTI2_NEWTON_TRI_H
|
#ifndef LMP_NPAIR_HALF_MULTI_NEWTON_TRI_H
|
||||||
#define LMP_NPAIR_HALF_MULTI2_NEWTON_TRI_H
|
#define LMP_NPAIR_HALF_MULTI_NEWTON_TRI_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairHalfMulti2NewtonTri : public NPair {
|
class NPairHalfMultiNewtonTri : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairHalfMulti2NewtonTri(class LAMMPS *);
|
NPairHalfMultiNewtonTri(class LAMMPS *);
|
||||||
~NPairHalfMulti2NewtonTri() {}
|
~NPairHalfMultiNewtonTri() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -87,10 +87,10 @@ void NPairHalfMultiOldNewtoff::build(NeighList *list)
|
|||||||
// stores own/ghost pairs on both procs
|
// stores own/ghost pairs on both procs
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
if (j <= i) continue;
|
if (j <= i) continue;
|
||||||
|
|||||||
@ -121,10 +121,10 @@ void NPairHalfMultiOldNewton::build(NeighList *list)
|
|||||||
// skip if i,j neighbor cutoff is less than bin distance
|
// skip if i,j neighbor cutoff is less than bin distance
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -88,10 +88,10 @@ void NPairHalfMultiOldNewtonTri::build(NeighList *list)
|
|||||||
// latter excludes self-self interaction but allows superposed atoms
|
// latter excludes self-self interaction but allows superposed atoms
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -1,47 +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 NPAIR_CLASS
|
|
||||||
|
|
||||||
NPairStyle(half/size/multi2/newton/tri,
|
|
||||||
NPairHalfSizeMulti2NewtonTri,
|
|
||||||
NP_HALF | NP_SIZE | NP_MULTI2 | NP_NEWTON | NP_TRI)
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_SIZE_MULTI2_NEWTON_TRI_H
|
|
||||||
#define LMP_NPAIR_HALF_SIZE_MULTI2_NEWTON_TRI_H
|
|
||||||
|
|
||||||
#include "npair.h"
|
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
|
||||||
|
|
||||||
class NPairHalfSizeMulti2NewtonTri : public NPair {
|
|
||||||
public:
|
|
||||||
NPairHalfSizeMulti2NewtonTri(class LAMMPS *);
|
|
||||||
~NPairHalfSizeMulti2NewtonTri() {}
|
|
||||||
void build(class NeighList *);
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ERROR/WARNING messages:
|
|
||||||
|
|
||||||
E: Neighbor list overflow, boost neigh_modify one
|
|
||||||
|
|
||||||
UNDOCUMENTED
|
|
||||||
|
|
||||||
*/
|
|
||||||
@ -12,7 +12,7 @@ es certain rights in this software. This software is distributed under
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "npair_half_size_multi2_newtoff.h"
|
#include "npair_half_size_multi_newtoff.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atom_vec.h"
|
#include "atom_vec.h"
|
||||||
@ -23,18 +23,18 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfSizeMulti2Newtoff::NPairHalfSizeMulti2Newtoff(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfSizeMultiNewtoff::NPairHalfSizeMultiNewtoff(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
size particles
|
size particles
|
||||||
binned neighbor list construction with partial Newton's 3rd law
|
binned neighbor list construction with partial Newton's 3rd law
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks own bin and other bins in stencil
|
each owned atom i checks own bin and other bins in stencil
|
||||||
pair stored once if i,j are both owned and i < j
|
pair stored once if i,j are both owned and i < j
|
||||||
pair stored by me if j is ghost (also stored by proc owning j)
|
pair stored by me if j is ghost (also stored by proc owning j)
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfSizeMulti2Newtoff::build(NeighList *list)
|
void NPairHalfSizeMultiNewtoff::build(NeighList *list)
|
||||||
{
|
{
|
||||||
int i,j,k,n,itype,jtype,ibin,jbin,ns;
|
int i,j,k,n,itype,jtype,ibin,jbin,ns;
|
||||||
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
|
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
|
||||||
@ -71,7 +71,7 @@ void NPairHalfSizeMulti2Newtoff::build(NeighList *list)
|
|||||||
ztmp = x[i][2];
|
ztmp = x[i][2];
|
||||||
radi = radius[i];
|
radi = radius[i];
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -86,12 +86,12 @@ void NPairHalfSizeMulti2Newtoff::build(NeighList *list)
|
|||||||
// stores own/ghost pairs on both procs
|
// stores own/ghost pairs on both procs
|
||||||
// use full stencil for all type combinations
|
// use full stencil for all type combinations
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >=0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >=0; j = bins_multi[jtype][j]) {
|
||||||
if (j <= i) continue;
|
if (j <= i) continue;
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(half/size/multi2/newtoff,
|
NPairStyle(half/size/multi/newtoff,
|
||||||
NPairHalfSizeMulti2Newtoff,
|
NPairHalfSizeMultiNewtoff,
|
||||||
NP_HALF | NP_SIZE | NP_MULTI2 | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
NP_HALF | NP_SIZE | NP_MULTI | NP_NEWTOFF | NP_ORTHO | NP_TRI)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_SIZE_MULTI2_NEWTOFF_H
|
#ifndef LMP_NPAIR_HALF_SIZE_MULTI_NEWTOFF_H
|
||||||
#define LMP_NPAIR_HALF_SIZE_MULTI2_NEWTOFF_H
|
#define LMP_NPAIR_HALF_SIZE_MULTI_NEWTOFF_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairHalfSizeMulti2Newtoff : public NPair {
|
class NPairHalfSizeMultiNewtoff : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairHalfSizeMulti2Newtoff(class LAMMPS *);
|
NPairHalfSizeMultiNewtoff(class LAMMPS *);
|
||||||
~NPairHalfSizeMulti2Newtoff() {}
|
~NPairHalfSizeMultiNewtoff() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "npair_half_size_multi2_newton.h"
|
#include "npair_half_size_multi_newton.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atom_vec.h"
|
#include "atom_vec.h"
|
||||||
@ -22,17 +22,17 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfSizeMulti2Newton::NPairHalfSizeMulti2Newton(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfSizeMultiNewton::NPairHalfSizeMultiNewton(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
size particles
|
size particles
|
||||||
binned neighbor list construction with full Newton's 3rd law
|
binned neighbor list construction with full Newton's 3rd law
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks its own bin and other bins in Newton stencil
|
each owned atom i checks its own bin and other bins in Newton stencil
|
||||||
every pair stored exactly once by some processor
|
every pair stored exactly once by some processor
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfSizeMulti2Newton::build(NeighList *list)
|
void NPairHalfSizeMultiNewton::build(NeighList *list)
|
||||||
{
|
{
|
||||||
int i,j,k,n,itype,jtype,ibin,jbin,ns,js;
|
int i,j,k,n,itype,jtype,ibin,jbin,ns,js;
|
||||||
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
|
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
|
||||||
@ -68,7 +68,7 @@ void NPairHalfSizeMulti2Newton::build(NeighList *list)
|
|||||||
ztmp = x[i][2];
|
ztmp = x[i][2];
|
||||||
radi = radius[i];
|
radi = radius[i];
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -87,9 +87,9 @@ void NPairHalfSizeMulti2Newton::build(NeighList *list)
|
|||||||
// if j is owned atom, store it, since j is beyond i in linked list
|
// if j is owned atom, store it, since j is beyond i in linked list
|
||||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||||
|
|
||||||
js = bins_multi2[itype][i];
|
js = bins_multi[itype][i];
|
||||||
|
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if (j >= nlocal) {
|
if (j >= nlocal) {
|
||||||
if (x[j][2] < ztmp) continue;
|
if (x[j][2] < ztmp) continue;
|
||||||
if (x[j][2] == ztmp) {
|
if (x[j][2] == ztmp) {
|
||||||
@ -121,9 +121,9 @@ void NPairHalfSizeMulti2Newton::build(NeighList *list)
|
|||||||
// if j is owned atom, store it if j > i
|
// if j is owned atom, store it if j > i
|
||||||
// if j is ghost, only store if j coords are "above and to the right" of i
|
// if j is ghost, only store if j coords are "above and to the right" of i
|
||||||
|
|
||||||
js = binhead_multi2[jtype][jbin];
|
js = binhead_multi[jtype][jbin];
|
||||||
|
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
if(j < i) continue;
|
if(j < i) continue;
|
||||||
|
|
||||||
if (j >= nlocal) {
|
if (j >= nlocal) {
|
||||||
@ -158,12 +158,12 @@ void NPairHalfSizeMulti2Newton::build(NeighList *list)
|
|||||||
// stencil is half if i same size as j
|
// stencil is half if i same size as j
|
||||||
// stencil is full if i smaller than j
|
// stencil is full if i smaller than j
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
|
|
||||||
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
|
||||||
|
|
||||||
@ -13,23 +13,23 @@
|
|||||||
|
|
||||||
#ifdef NPAIR_CLASS
|
#ifdef NPAIR_CLASS
|
||||||
|
|
||||||
NPairStyle(half/size/multi2/newton,
|
NPairStyle(half/size/multi/newton,
|
||||||
NPairHalfSizeMulti2Newton,
|
NPairHalfSizeMultiNewton,
|
||||||
NP_HALF | NP_SIZE | NP_MULTI2 | NP_NEWTON | NP_ORTHO)
|
NP_HALF | NP_SIZE | NP_MULTI | NP_NEWTON | NP_ORTHO)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifndef LMP_NPAIR_HALF_SIZE_MULTI2_NEWTON_H
|
#ifndef LMP_NPAIR_HALF_SIZE_MULTI_NEWTON_H
|
||||||
#define LMP_NPAIR_HALF_SIZE_MULTI2_NEWTON_H
|
#define LMP_NPAIR_HALF_SIZE_MULTI_NEWTON_H
|
||||||
|
|
||||||
#include "npair.h"
|
#include "npair.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
class NPairHalfSizeMulti2Newton : public NPair {
|
class NPairHalfSizeMultiNewton : public NPair {
|
||||||
public:
|
public:
|
||||||
NPairHalfSizeMulti2Newton(class LAMMPS *);
|
NPairHalfSizeMultiNewton(class LAMMPS *);
|
||||||
~NPairHalfSizeMulti2Newton() {}
|
~NPairHalfSizeMultiNewton() {}
|
||||||
void build(class NeighList *);
|
void build(class NeighList *);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
See the README file in the top-level LAMMPS directory.
|
See the README file in the top-level LAMMPS directory.
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "npair_half_size_multi2_newton_tri.h"
|
#include "npair_half_size_multi_newton_tri.h"
|
||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "atom_vec.h"
|
#include "atom_vec.h"
|
||||||
@ -22,17 +22,17 @@ using namespace LAMMPS_NS;
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
NPairHalfSizeMulti2NewtonTri::NPairHalfSizeMulti2NewtonTri(LAMMPS *lmp) : NPair(lmp) {}
|
NPairHalfSizeMultiNewtonTri::NPairHalfSizeMultiNewtonTri(LAMMPS *lmp) : NPair(lmp) {}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
size particles
|
size particles
|
||||||
binned neighbor list construction with Newton's 3rd law for triclinic
|
binned neighbor list construction with Newton's 3rd law for triclinic
|
||||||
multi2-type stencil is itype-jtype dependent
|
multi-type stencil is itype-jtype dependent
|
||||||
each owned atom i checks its own bin and other bins in triclinic stencil
|
each owned atom i checks its own bin and other bins in triclinic stencil
|
||||||
every pair stored exactly once by some processor
|
every pair stored exactly once by some processor
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
void NPairHalfSizeMulti2NewtonTri::build(NeighList *list)
|
void NPairHalfSizeMultiNewtonTri::build(NeighList *list)
|
||||||
{
|
{
|
||||||
int i,j,k,n,itype,jtype,ibin,jbin,ns,js;
|
int i,j,k,n,itype,jtype,ibin,jbin,ns,js;
|
||||||
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
|
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
|
||||||
@ -68,7 +68,7 @@ void NPairHalfSizeMulti2NewtonTri::build(NeighList *list)
|
|||||||
ztmp = x[i][2];
|
ztmp = x[i][2];
|
||||||
radi = radius[i];
|
radi = radius[i];
|
||||||
|
|
||||||
ibin = atom2bin_multi2[itype][i];
|
ibin = atom2bin_multi[itype][i];
|
||||||
|
|
||||||
// loop through stencils for all types
|
// loop through stencils for all types
|
||||||
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
for (jtype = 1; jtype <= atom->ntypes; jtype++) {
|
||||||
@ -87,12 +87,12 @@ void NPairHalfSizeMulti2NewtonTri::build(NeighList *list)
|
|||||||
// (equal zyx and j <= i)
|
// (equal zyx and j <= i)
|
||||||
// latter excludes self-self interaction but allows superposed atoms
|
// latter excludes self-self interaction but allows superposed atoms
|
||||||
|
|
||||||
s = stencil_multi2[itype][jtype];
|
s = stencil_multi[itype][jtype];
|
||||||
ns = nstencil_multi2[itype][jtype];
|
ns = nstencil_multi[itype][jtype];
|
||||||
|
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
js = binhead_multi2[jtype][jbin + s[k]];
|
js = binhead_multi[jtype][jbin + s[k]];
|
||||||
for (j = js; j >= 0; j = bins_multi2[jtype][j]) {
|
for (j = js; j >= 0; j = bins_multi[jtype][j]) {
|
||||||
|
|
||||||
// if same size (e.g. same type), use half stencil
|
// if same size (e.g. same type), use half stencil
|
||||||
if(cutneighsq[itype][itype] == cutneighsq[jtype][jtype]){
|
if(cutneighsq[itype][itype] == cutneighsq[jtype][jtype]){
|
||||||
47
src/npair_half_size_multi_newton_tri.h
Executable file
47
src/npair_half_size_multi_newton_tri.h
Executable file
@ -0,0 +1,47 @@
|
|||||||
|
/* -*- 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 NPAIR_CLASS
|
||||||
|
|
||||||
|
NPairStyle(half/size/multi/newton/tri,
|
||||||
|
NPairHalfSizeMultiNewtonTri,
|
||||||
|
NP_HALF | NP_SIZE | NP_MULTI | NP_NEWTON | NP_TRI)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifndef LMP_NPAIR_HALF_SIZE_MULTI_NEWTON_TRI_H
|
||||||
|
#define LMP_NPAIR_HALF_SIZE_MULTI_NEWTON_TRI_H
|
||||||
|
|
||||||
|
#include "npair.h"
|
||||||
|
|
||||||
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
|
class NPairHalfSizeMultiNewtonTri : public NPair {
|
||||||
|
public:
|
||||||
|
NPairHalfSizeMultiNewtonTri(class LAMMPS *);
|
||||||
|
~NPairHalfSizeMultiNewtonTri() {}
|
||||||
|
void build(class NeighList *);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ERROR/WARNING messages:
|
||||||
|
|
||||||
|
E: Neighbor list overflow, boost neigh_modify one
|
||||||
|
|
||||||
|
UNDOCUMENTED
|
||||||
|
|
||||||
|
*/
|
||||||
@ -77,10 +77,10 @@ void NPairHalfSizeMultiOldNewtoff::build(NeighList *list)
|
|||||||
// stores own/ghost pairs on both procs
|
// stores own/ghost pairs on both procs
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
if (j <= i) continue;
|
if (j <= i) continue;
|
||||||
|
|||||||
@ -104,10 +104,10 @@ void NPairHalfSizeMultiOldNewton::build(NeighList *list)
|
|||||||
// skip if i,j neighbor cutoff is less than bin distance
|
// skip if i,j neighbor cutoff is less than bin distance
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
@ -78,10 +78,10 @@ void NPairHalfSizeMultiOldNewtonTri::build(NeighList *list)
|
|||||||
// latter excludes self-self interaction but allows superposed atoms
|
// latter excludes self-self interaction but allows superposed atoms
|
||||||
|
|
||||||
ibin = atom2bin[i];
|
ibin = atom2bin[i];
|
||||||
s = stencil_multi[itype];
|
s = stencil_multi_old[itype];
|
||||||
distsq = distsq_multi[itype];
|
distsq = distsq_multi_old[itype];
|
||||||
cutsq = cutneighsq[itype];
|
cutsq = cutneighsq[itype];
|
||||||
ns = nstencil_multi[itype];
|
ns = nstencil_multi_old[itype];
|
||||||
for (k = 0; k < ns; k++) {
|
for (k = 0; k < ns; k++) {
|
||||||
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
for (j = binhead[ibin+s[k]]; j >= 0; j = bins[j]) {
|
||||||
jtype = type[j];
|
jtype = type[j];
|
||||||
|
|||||||
Reference in New Issue
Block a user