Minor updates and documentation

This commit is contained in:
Joel Clemmer
2020-10-09 11:38:18 -06:00
parent bc1c16d1a6
commit dc86c37e23
7 changed files with 19 additions and 11 deletions

View File

@ -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 is computed. It is used as communication cutoff, if there is no pair
style present and no *comm_modify cutoff* command used. Otherwise a style present and no *comm_modify cutoff* command used. Otherwise a
warning is printed, if this bond based estimate is larger than the 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 The *cutoff/multi* option is equivalent to *cutoff*\ , but applies to
communication mode *multi* instead. Since in this case the communication communication mode *multi* instead. Since in this case the communication
cutoffs are determined per atom type, a type specifier is needed and 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 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 These are simulation scenarios in which it may be useful or even
necessary to set a ghost cutoff > neighbor cutoff: necessary to set a ghost cutoff > neighbor cutoff:

View File

@ -11,9 +11,7 @@
See the README file in the top-level LAMMPS directory. See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include <string.h>
#include "npair_half_size_multi_newtoff.h" #include "npair_half_size_multi_newtoff.h"
#include "neighbor.h"
#include "neigh_list.h" #include "neigh_list.h"
#include "atom.h" #include "atom.h"
#include "atom_vec.h" #include "atom_vec.h"
@ -27,6 +25,7 @@ using namespace LAMMPS_NS;
NPairHalfSizeMultiNewtoff::NPairHalfSizeMultiNewtoff(LAMMPS *lmp) : NPair(lmp) {} NPairHalfSizeMultiNewtoff::NPairHalfSizeMultiNewtoff(LAMMPS *lmp) : NPair(lmp) {}
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
size particles
binned neighbor list construction with partial Newton's 3rd law binned neighbor list construction with partial Newton's 3rd law
each owned atom i checks own bin and other bins in stencil each owned atom i checks own bin and other bins in stencil
multi-type stencil is itype dependent and is distance checked multi-type stencil is itype dependent and is distance checked
@ -46,7 +45,6 @@ void NPairHalfSizeMultiNewtoff::build(NeighList *list)
double *radius = atom->radius; double *radius = atom->radius;
int *type = atom->type; int *type = atom->type;
int *mask = atom->mask; int *mask = atom->mask;
tagint *tag = atom->tag;
tagint *molecule = atom->molecule; tagint *molecule = atom->molecule;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (includegroup) nlocal = atom->nfirst; if (includegroup) nlocal = atom->nfirst;
@ -99,7 +97,7 @@ void NPairHalfSizeMultiNewtoff::build(NeighList *list)
cutdistsq = (radsum+skin) * (radsum+skin); cutdistsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutdistsq) { if (rsq <= cutdistsq) {
if (history && rsq < radsum*radsum) if (history && rsq < radsum*radsum)
neighptr[n++] = j ^ mask_history; neighptr[n++] = j ^ mask_history;
else else
neighptr[n++] = j; neighptr[n++] = j;

View File

@ -40,4 +40,7 @@ class NPairHalfSizeMultiNewtoff : public NPair {
/* ERROR/WARNING messages: /* ERROR/WARNING messages:
E: Neighbor list overflow, boost neigh_modify one
UNDOCUMENTED
*/ */

View File

@ -11,9 +11,7 @@
See the README file in the top-level LAMMPS directory. See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include <string.h>
#include "npair_half_size_multi_newton.h" #include "npair_half_size_multi_newton.h"
#include "neighbor.h"
#include "neigh_list.h" #include "neigh_list.h"
#include "atom.h" #include "atom.h"
#include "atom_vec.h" #include "atom_vec.h"
@ -27,6 +25,7 @@ using namespace LAMMPS_NS;
NPairHalfSizeMultiNewton::NPairHalfSizeMultiNewton(LAMMPS *lmp) : NPair(lmp) {} NPairHalfSizeMultiNewton::NPairHalfSizeMultiNewton(LAMMPS *lmp) : NPair(lmp) {}
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
size particles
binned neighbor list construction with full Newton's 3rd law binned neighbor list construction with full Newton's 3rd law
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
multi-type stencil is itype dependent and is distance checked multi-type stencil is itype dependent and is distance checked
@ -45,7 +44,6 @@ void NPairHalfSizeMultiNewton::build(NeighList *list)
double *radius = atom->radius; double *radius = atom->radius;
int *type = atom->type; int *type = atom->type;
int *mask = atom->mask; int *mask = atom->mask;
tagint *tag = atom->tag;
tagint *molecule = atom->molecule; tagint *molecule = atom->molecule;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (includegroup) nlocal = atom->nfirst; if (includegroup) nlocal = atom->nfirst;

View File

@ -40,4 +40,7 @@ class NPairHalfSizeMultiNewton : public NPair {
/* ERROR/WARNING messages: /* ERROR/WARNING messages:
E: Neighbor list overflow, boost neigh_modify one
UNDOCUMENTED
*/ */

View File

@ -45,7 +45,6 @@ void NPairHalfSizeMultiNewtonTri::build(NeighList *list)
double *radius = atom->radius; double *radius = atom->radius;
int *type = atom->type; int *type = atom->type;
int *mask = atom->mask; int *mask = atom->mask;
tagint *tag = atom->tag;
tagint *molecule = atom->molecule; tagint *molecule = atom->molecule;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (includegroup) nlocal = atom->nfirst; if (includegroup) nlocal = atom->nfirst;
@ -72,7 +71,9 @@ void NPairHalfSizeMultiNewtonTri::build(NeighList *list)
radi = radius[i]; 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 // pairs for atoms j "below" i are excluded
// below = lower z or (equal z and lower y) or (equal zy and lower x) // below = lower z or (equal z and lower y) or (equal zy and lower x)
// (equal zyx and j <= i) // (equal zyx and j <= i)

View File

@ -40,4 +40,7 @@ class NPairHalfSizeMultiNewtonTri : public NPair {
/* ERROR/WARNING messages: /* ERROR/WARNING messages:
E: Neighbor list overflow, boost neigh_modify one
UNDOCUMENTED
*/ */