diff --git a/doc/src/comm_modify.rst b/doc/src/comm_modify.rst index 9a2ae60f1e..68d40281c1 100644 --- a/doc/src/comm_modify.rst +++ b/doc/src/comm_modify.rst @@ -84,13 +84,15 @@ information is available, then also a heuristic based on that bond length is computed. It is used as communication cutoff, if there is no pair style present and no *comm_modify cutoff* command used. Otherwise a warning is printed, if this bond based estimate is larger than the -communication cutoff used. A +communication cutoff used. The *cutoff/multi* option is equivalent to *cutoff*\ , but applies to communication mode *multi* instead. Since in this case the communication cutoffs are determined per atom type, a type specifier is needed and cutoff for one or multiple types can be extended. Also ranges of types -using the usual asterisk notation can be given. +using the usual asterisk notation can be given. For granular pairstyles, +the default cutoff is set to the sum of the current maximum atomic radii +for each type. These are simulation scenarios in which it may be useful or even necessary to set a ghost cutoff > neighbor cutoff: diff --git a/src/npair_half_size_multi_newtoff.cpp b/src/npair_half_size_multi_newtoff.cpp index ec4ff805e2..813a642b96 100644 --- a/src/npair_half_size_multi_newtoff.cpp +++ b/src/npair_half_size_multi_newtoff.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_multi_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" @@ -27,6 +25,7 @@ using namespace LAMMPS_NS; NPairHalfSizeMultiNewtoff::NPairHalfSizeMultiNewtoff(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- + size particles binned neighbor list construction with partial Newton's 3rd law each owned atom i checks own bin and other bins in stencil multi-type stencil is itype dependent and is distance checked @@ -46,7 +45,6 @@ void NPairHalfSizeMultiNewtoff::build(NeighList *list) double *radius = atom->radius; int *type = atom->type; int *mask = atom->mask; - tagint *tag = atom->tag; tagint *molecule = atom->molecule; int nlocal = atom->nlocal; if (includegroup) nlocal = atom->nfirst; @@ -99,7 +97,7 @@ void NPairHalfSizeMultiNewtoff::build(NeighList *list) cutdistsq = (radsum+skin) * (radsum+skin); if (rsq <= cutdistsq) { - if (history && rsq < radsum*radsum) + if (history && rsq < radsum*radsum) neighptr[n++] = j ^ mask_history; else neighptr[n++] = j; diff --git a/src/npair_half_size_multi_newtoff.h b/src/npair_half_size_multi_newtoff.h index 8abe5b5456..f255f9a17d 100644 --- a/src/npair_half_size_multi_newtoff.h +++ b/src/npair_half_size_multi_newtoff.h @@ -40,4 +40,7 @@ class NPairHalfSizeMultiNewtoff : public NPair { /* ERROR/WARNING messages: +E: Neighbor list overflow, boost neigh_modify one + +UNDOCUMENTED */ diff --git a/src/npair_half_size_multi_newton.cpp b/src/npair_half_size_multi_newton.cpp index 01aea66632..0d12924629 100644 --- a/src/npair_half_size_multi_newton.cpp +++ b/src/npair_half_size_multi_newton.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_multi_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" @@ -27,6 +25,7 @@ using namespace LAMMPS_NS; NPairHalfSizeMultiNewton::NPairHalfSizeMultiNewton(LAMMPS *lmp) : NPair(lmp) {} /* ---------------------------------------------------------------------- + size particles binned neighbor list construction with full Newton's 3rd law each owned atom i checks its own bin and other bins in Newton stencil multi-type stencil is itype dependent and is distance checked @@ -45,7 +44,6 @@ void NPairHalfSizeMultiNewton::build(NeighList *list) double *radius = atom->radius; int *type = atom->type; int *mask = atom->mask; - tagint *tag = atom->tag; tagint *molecule = atom->molecule; int nlocal = atom->nlocal; if (includegroup) nlocal = atom->nfirst; diff --git a/src/npair_half_size_multi_newton.h b/src/npair_half_size_multi_newton.h index 109fe78c2b..3e3d6f4180 100644 --- a/src/npair_half_size_multi_newton.h +++ b/src/npair_half_size_multi_newton.h @@ -40,4 +40,7 @@ class NPairHalfSizeMultiNewton : public NPair { /* ERROR/WARNING messages: +E: Neighbor list overflow, boost neigh_modify one + +UNDOCUMENTED */ diff --git a/src/npair_half_size_multi_newton_tri.cpp b/src/npair_half_size_multi_newton_tri.cpp index f7123a958d..64b9659c8f 100644 --- a/src/npair_half_size_multi_newton_tri.cpp +++ b/src/npair_half_size_multi_newton_tri.cpp @@ -45,7 +45,6 @@ void NPairHalfSizeMultiNewtonTri::build(NeighList *list) double *radius = atom->radius; int *type = atom->type; int *mask = atom->mask; - tagint *tag = atom->tag; tagint *molecule = atom->molecule; int nlocal = atom->nlocal; if (includegroup) nlocal = atom->nfirst; @@ -72,7 +71,9 @@ void NPairHalfSizeMultiNewtonTri::build(NeighList *list) radi = radius[i]; - // loop over all atoms in bins in stencil + // loop over all atoms in bins, including self, in stencil + // skip if i,j neighbor cutoff is less than bin distance + // bins below self are excluded from stencil // pairs for atoms j "below" i are excluded // below = lower z or (equal z and lower y) or (equal zy and lower x) // (equal zyx and j <= i) diff --git a/src/npair_half_size_multi_newton_tri.h b/src/npair_half_size_multi_newton_tri.h index 15fbaba0f7..6afe8201a7 100644 --- a/src/npair_half_size_multi_newton_tri.h +++ b/src/npair_half_size_multi_newton_tri.h @@ -40,4 +40,7 @@ class NPairHalfSizeMultiNewtonTri : public NPair { /* ERROR/WARNING messages: +E: Neighbor list overflow, boost neigh_modify one + +UNDOCUMENTED */