git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14528 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-01-29 18:27:37 +00:00
parent 3d7d897fe8
commit 029faeb7f0
2 changed files with 53 additions and 4 deletions

View File

@ -104,6 +104,11 @@ Neighbor::Neighbor(LAMMPS *lmp) : Pointers(lmp)
maxbin = 0;
bins = NULL;
// SSA AIR binning
len_ssa_airnum = 0;
ssa_airnum = NULL;
// pair exclusion list info
includegroup = 0;
@ -157,6 +162,7 @@ Neighbor::Neighbor(LAMMPS *lmp) : Pointers(lmp)
improperlist = NULL;
copymode = 0;
last_binning_timestep = -1;
}
/* ---------------------------------------------------------------------- */
@ -176,6 +182,8 @@ Neighbor::~Neighbor()
memory->destroy(binhead);
memory->destroy(bins);
memory->destroy(ssa_airnum);
memory->destroy(ex1_type);
memory->destroy(ex2_type);
memory->destroy(ex_type);
@ -1019,6 +1027,7 @@ int Neighbor::request(void *requestor, int instance)
skip -> granular function if gran with granhistory,
respa function if respaouter,
skip_from function for everything else
ssa -> special case for USER-DPD pair styles
half_from_full, half, full, gran, respaouter ->
choose by newton and rq->newton and tri settings
style NSQ options = newton off, newton on
@ -1042,6 +1051,10 @@ void Neighbor::choose_build(int index, NeighRequest *rq)
else if (rq->respaouter) pb = &Neighbor::skip_from_respa;
else pb = &Neighbor::skip_from;
} else if (rq->ssa) {
if (rq->half_from_full) pb = &Neighbor::half_from_full_newton_ssa;
else pb = &Neighbor::half_bin_newton_ssa;
} else if (rq->half_from_full) {
if (rq->newton == 0) {
if (newton_pair == 0) pb = &Neighbor::half_from_full_no_newton;
@ -1286,6 +1299,7 @@ void Neighbor::choose_build(int index, NeighRequest *rq)
determine which stencil_create function each neigh list needs
based on settings of neigh request, only called if style != NSQ
skip or copy or half_from_full -> no stencil
ssa = special case for USER-DPD pair styles
half, gran, respaouter, full -> choose by newton and tri and dimension
if none of these, ptr = NULL since this list needs no stencils
use "else if" b/c skip,copy can be set in addition to half,full,etc
@ -1297,7 +1311,11 @@ void Neighbor::choose_stencil(int index, NeighRequest *rq)
if (rq->skip || rq->copy || rq->half_from_full) sc = NULL;
else if (rq->half || rq->gran || rq->respaouter) {
else if (rq->ssa) {
if (dimension == 2) sc = &Neighbor::stencil_half_bin_2d_ssa;
else if (dimension == 3) sc = &Neighbor::stencil_half_bin_3d_ssa;
} else if (rq->half || rq->gran || rq->respaouter) {
if (style == BIN) {
if (rq->newton == 0) {
if (newton_pair == 0) {
@ -1997,6 +2015,11 @@ void Neighbor::bin_atoms()
{
int i,ibin;
// NOTE: added for USER-DPD, why do we need this?
if (last_binning_timestep == update->ntimestep) return;
last_binning_timestep = update->ntimestep;
for (i = 0; i < mbins; i++) binhead[i] = -1;
// bin in reverse order so linked list will be in forward order
@ -2152,6 +2175,8 @@ bigint Neighbor::memory_usage()
bytes += memory->usage(binhead,maxhead);
}
bytes += memory->usage(ssa_airnum,len_ssa_airnum);
for (int i = 0; i < nrequest; i++)
if (lists[i]) bytes += lists[i]->memory_usage();