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

This commit is contained in:
sjplimp
2014-09-30 23:20:03 +00:00
parent 8a517e353c
commit 2516600403
22 changed files with 35 additions and 30 deletions

View File

@ -374,7 +374,7 @@ void FixBondCreate::post_integrate()
int *mask = atom->mask;
int *type = atom->type;
neighbor->build_one(list->index,1);
neighbor->build_one(list,1);
inum = list->inum;
ilist = list->ilist;
numneigh = list->numneigh;

View File

@ -231,7 +231,7 @@ void FixBondSwap::post_integrate()
type = atom->type;
x = atom->x;
neighbor->build_one(list->index,1);
neighbor->build_one(list,1);
inum = list->inum;
ilist = list->ilist;
numneigh = list->numneigh;

View File

@ -179,7 +179,7 @@ void FixPeriNeigh::setup(int vflag)
// build full neighbor list, will copy or build as necessary
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -268,7 +268,7 @@ void FixQEq::init_list(int id, NeighList *ptr)
void FixQEq::setup_pre_force(int vflag)
{
neighbor->build_one(list->index);
neighbor->build_one(list);
deallocate_storage();
allocate_storage();

View File

@ -192,7 +192,7 @@ void ComputeSNAAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
const int inum = list->inum;
const int* const ilist = list->ilist;

View File

@ -196,7 +196,7 @@ void ComputeSNADAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
const int inum = list->inum;
const int* const ilist = list->ilist;

View File

@ -199,7 +199,7 @@ void ComputeSNAVAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
const int inum = list->inum;
const int* const ilist = list->ilist;

View File

@ -114,7 +114,7 @@ void ComputeAcklandAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -118,7 +118,7 @@ void ComputeBasalAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -408,7 +408,7 @@ void FixQEqReax::init_taper()
void FixQEqReax::setup_pre_force(int vflag)
{
neighbor->build_one(list->index);
neighbor->build_one(list);
deallocate_storage();
allocate_storage();

View File

@ -116,7 +116,7 @@ void ComputeCentroAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -113,7 +113,7 @@ void ComputeClusterAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -137,7 +137,7 @@ void ComputeCNAAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -108,7 +108,7 @@ void ComputeContactAtom::compute_peratom()
// invoke neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -141,7 +141,7 @@ void ComputeCoordAtom::compute_peratom()
// invoke full neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -211,7 +211,7 @@ void ComputeGroupGroup::pair_contribution()
// invoke half neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -155,7 +155,7 @@ int ComputePairLocal::compute_pairs(int flag)
// invoke half neighbor list (will copy or build if necessary)
if (flag == 0) neighbor->build_one(list->index);
if (flag == 0) neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -346,7 +346,7 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
// invoke half neighbor list (will copy or build if necessary)
if (allflag == 0) neighbor->build_one(list->index);
if (allflag == 0) neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -186,7 +186,7 @@ void ComputeRDF::compute_array()
// invoke half neighbor list (will copy or build if necessary)
neighbor->build_one(list->index);
neighbor->build_one(list);
inum = list->inum;
ilist = list->ilist;

View File

@ -287,7 +287,7 @@ void DeleteAtoms::delete_overlap(int narg, char **arg)
// build neighbor list this command needs based on earlier request
NeighList *list = neighbor->lists[irequest];
neighbor->build_one(irequest);
neighbor->build_one(list);
// allocate and initialize deletion list
// must be after exchange potentially changes nlocal

View File

@ -1491,31 +1491,36 @@ void Neighbor::build_topology()
called by other classes
------------------------------------------------------------------------- */
void Neighbor::build_one(int i, int preflag)
void Neighbor::build_one(class NeighList *mylist, int preflag)
{
// check if list structure is initialized
if (mylist == NULL)
error->all(FLERR,"Trying to build an occasional neighbor list "
"before initialization is completed.");
// no need to build if already built since last re-neighbor
// preflag is set by fix bond/create and fix bond/swap
// b/c they invoke build_one() on same step neigh list is re-built,
// but before re-build, so need to use ">" instead of ">="
if (preflag) {
if (lists[i]->last_build > lastcall) return;
if (mylist->last_build > lastcall) return;
} else {
if (lists[i]->last_build >= lastcall) return;
if (mylist->last_build >= lastcall) return;
}
lists[i]->last_build = update->ntimestep;
mylist->last_build = update->ntimestep;
// update stencils and grow atom arrays as needed
// only for relevant settings of stencilflag and growflag
// grow atom array for this list to current size of perpetual lists
if (lists[i]->stencilflag) {
lists[i]->stencil_allocate(smax,style);
(this->*stencil_create[i])(lists[i],sx,sy,sz);
if (mylist->stencilflag) {
mylist->stencil_allocate(smax,style);
(this->*stencil_create[mylist->index])(mylist,sx,sy,sz);
}
if (lists[i]->growflag) lists[i]->grow(maxatom);
if (mylist->growflag) mylist->grow(maxatom);
// build list I, turning off atom binning
// binning results from last re-neighbor should be used instead
@ -1523,7 +1528,7 @@ void Neighbor::build_one(int i, int preflag)
// leading to errors or even a crash
binatomflag = 0;
(this->*pair_build[i])(lists[i]);
(this->*pair_build[mylist->index])(mylist);
binatomflag = 1;
}

View File

@ -78,7 +78,7 @@ class Neighbor : protected Pointers {
void setup_bins(); // setup bins based on box and cutoff
virtual void build(int topoflag=1); // create all neighbor lists (pair,bond)
virtual void build_topology(); // create all topology neighbor lists
void build_one(int, int preflag=0); // create a single neighbor list
void build_one(class NeighList *list, int preflag=0); // create a single neighbor list
void set(int, char **); // set neighbor style and skin distance
void modify_params(int, char**); // modify parameters that control builds
bigint memory_usage();