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

This commit is contained in:
sjplimp 2008-10-22 15:51:31 +00:00
parent 0859793443
commit 18fa9f45a5
8 changed files with 43 additions and 44 deletions

View File

@ -37,9 +37,9 @@ void Neighbor::full_nsq(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) {
if (includegroup) {
nlocal = atom->nfirst;
bitmask = group->bitmask[include_group];
bitmask = group->bitmask[includegroup];
}
int *ilist = list->ilist;
@ -71,7 +71,7 @@ void Neighbor::full_nsq(NeighList *list)
// skip i = j
for (j = 0; j < nall; j++) {
if (include_group && !(mask[j] & bitmask)) continue;
if (includegroup && !(mask[j] & bitmask)) continue;
if (i == j) continue;
jtype = type[j];
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
@ -123,7 +123,7 @@ void Neighbor::full_bin(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
@ -215,7 +215,7 @@ void Neighbor::full_multi(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;

View File

@ -52,9 +52,9 @@ void Neighbor::granular_nsq_no_newton(NeighList *list)
int *molecule = atom->molecule;
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
if (include_group) {
if (includegroup) {
nlocal = atom->nfirst;
bitmask = group->bitmask[include_group];
bitmask = group->bitmask[includegroup];
}
int *ilist = list->ilist;
@ -108,7 +108,7 @@ void Neighbor::granular_nsq_no_newton(NeighList *list)
// loop over remaining atoms, owned and ghost
for (j = i+1; j < nall; j++) {
if (include_group && !(mask[j] & bitmask)) continue;
if (includegroup && !(mask[j] & bitmask)) continue;
if (exclude && exclusion(i,j,type[i],type[j],mask,molecule)) continue;
delx = xtmp - x[j][0];
@ -187,9 +187,9 @@ void Neighbor::granular_nsq_newton(NeighList *list)
int *molecule = atom->molecule;
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
if (include_group) {
if (includegroup) {
nlocal = atom->nfirst;
bitmask = group->bitmask[include_group];
bitmask = group->bitmask[includegroup];
}
int *ilist = list->ilist;
@ -221,7 +221,7 @@ void Neighbor::granular_nsq_newton(NeighList *list)
// loop over remaining atoms, owned and ghost
for (j = i+1; j < nall; j++) {
if (include_group && !(mask[j] & bitmask)) continue;
if (includegroup && !(mask[j] & bitmask)) continue;
if (j >= nlocal) {
jtag = tag[j];
@ -298,7 +298,7 @@ void Neighbor::granular_bin_no_newton(NeighList *list)
int *mask = atom->mask;
int *molecule = atom->molecule;
int nlocal = atom->nlocal;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
@ -441,7 +441,7 @@ void Neighbor::granular_bin_newton(NeighList *list)
int *mask = atom->mask;
int *molecule = atom->molecule;
int nlocal = atom->nlocal;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
@ -548,7 +548,7 @@ void Neighbor::granular_bin_newton_tri(NeighList *list)
int *mask = atom->mask;
int *molecule = atom->molecule;
int nlocal = atom->nlocal;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;

View File

@ -43,7 +43,7 @@ void Neighbor::half_bin_no_newton(NeighList *list)
int *molecule = atom->molecule;
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int molecular = atom->molecular;
int *ilist = list->ilist;
@ -137,7 +137,7 @@ void Neighbor::half_bin_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
@ -251,7 +251,7 @@ void Neighbor::half_bin_newton_tri(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;

View File

@ -46,7 +46,7 @@ void Neighbor::half_multi_no_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
@ -147,7 +147,7 @@ void Neighbor::half_multi_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
@ -271,7 +271,7 @@ void Neighbor::half_multi_newton_tri(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;

View File

@ -38,9 +38,9 @@ void Neighbor::half_nsq_no_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) {
if (includegroup) {
nlocal = atom->nfirst;
bitmask = group->bitmask[include_group];
bitmask = group->bitmask[includegroup];
}
int *ilist = list->ilist;
@ -71,7 +71,7 @@ void Neighbor::half_nsq_no_newton(NeighList *list)
// loop over remaining atoms, owned and ghost
for (j = i+1; j < nall; j++) {
if (include_group && !(mask[j] & bitmask)) continue;
if (includegroup && !(mask[j] & bitmask)) continue;
jtype = type[j];
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
@ -119,9 +119,9 @@ void Neighbor::half_nsq_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) {
if (includegroup) {
nlocal = atom->nfirst;
bitmask = group->bitmask[include_group];
bitmask = group->bitmask[includegroup];
}
int *ilist = list->ilist;
@ -154,7 +154,7 @@ void Neighbor::half_nsq_newton(NeighList *list)
// itag = jtag is possible for long cutoffs that include images of self
for (j = i+1; j < nall; j++) {
if (include_group && !(mask[j] & bitmask)) continue;
if (includegroup && !(mask[j] & bitmask)) continue;
if (j >= nlocal) {
jtag = tag[j];

View File

@ -39,9 +39,9 @@ void Neighbor::respa_nsq_no_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) {
if (includegroup) {
nlocal = atom->nfirst;
bitmask = group->bitmask[include_group];
bitmask = group->bitmask[includegroup];
}
int *ilist = list->ilist;
@ -110,7 +110,7 @@ void Neighbor::respa_nsq_no_newton(NeighList *list)
// loop over remaining atoms, owned and ghost
for (j = i+1; j < nall; j++) {
if (include_group && !(mask[j] & bitmask)) continue;
if (includegroup && !(mask[j] & bitmask)) continue;
jtype = type[j];
if (exclude && exclusion(i,j,itype,jtype,mask,molecule)) continue;
@ -184,9 +184,9 @@ void Neighbor::respa_nsq_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) {
if (includegroup) {
nlocal = atom->nfirst;
bitmask = group->bitmask[include_group];
bitmask = group->bitmask[includegroup];
}
int *ilist = list->ilist;
@ -256,7 +256,7 @@ void Neighbor::respa_nsq_newton(NeighList *list)
// loop over remaining atoms, owned and ghost
for (j = i+1; j < nall; j++) {
if (include_group && !(mask[j] & bitmask)) continue;
if (includegroup && !(mask[j] & bitmask)) continue;
if (j >= nlocal) {
jtag = tag[j];
@ -351,7 +351,7 @@ void Neighbor::respa_bin_no_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
@ -507,7 +507,7 @@ void Neighbor::respa_bin_newton(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;
@ -696,7 +696,7 @@ void Neighbor::respa_bin_newton_tri(NeighList *list)
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
int molecular = atom->molecular;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int *ilist = list->ilist;
int *numneigh = list->numneigh;

View File

@ -90,7 +90,7 @@ Neighbor::Neighbor(LAMMPS *lmp) : Pointers(lmp)
// pair exclusion list info
include_group = 0;
includegroup = 0;
nex_type = maxex_type = 0;
ex1_type = ex2_type = NULL;
@ -918,7 +918,7 @@ int Neighbor::check_distance()
double **x = atom->x;
int nlocal = atom->nlocal;
if (include_group) nlocal = atom->nfirst;
if (includegroup) nlocal = atom->nfirst;
int flag = 0;
for (int i = 0; i < nlocal; i++) {
@ -1289,10 +1289,10 @@ void Neighbor::modify_params(int narg, char **arg)
iarg += 2;
} else if (strcmp(arg[iarg],"include") == 0) {
if (iarg+2 > narg) error->all("Illegal neigh_modify command");
include_group = group->find(arg[iarg+1]);
if (include_group < 0)
includegroup = group->find(arg[iarg+1]);
if (includegroup < 0)
error->all("Invalid group ID in neigh_modify command");
if (include_group && (atom->firstgroupname == NULL ||
if (includegroup && (atom->firstgroupname == NULL ||
strcmp(arg[iarg+1],atom->firstgroupname) != 0))
error->all("Neigh_modify include group != atom_modify first group");
iarg += 2;
@ -1414,8 +1414,8 @@ void Neighbor::bin_atoms()
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
if (include_group) {
int bitmask = group->bitmask[include_group];
if (includegroup) {
int bitmask = group->bitmask[includegroup];
for (i = nall-1; i >= nlocal; i--) {
if (mask[i] & bitmask) {
ibin = coord2bin(x[i]);

View File

@ -27,6 +27,7 @@ class Neighbor : protected Pointers {
int ago; // how many steps ago neighboring occurred
int pgsize; // size of neighbor page
int oneatom; // max # of neighbors for one atom
int includegroup; // only build pairwise lists for this group
double skin; // skin distance
double cutneighmin; // min neighbor cutoff for all type pairs
@ -122,8 +123,6 @@ class Neighbor : protected Pointers {
int special_flag[4]; // flags for 1-2, 1-3, 1-4 neighbors
int include_group; // only build pairwise lists for this group
int exclude; // 0 if no type/group exclusions, 1 if yes
int nex_type; // # of entries in type exclusion list