forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4355 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
04104a32d5
commit
d71b088457
|
@ -667,14 +667,19 @@ void PairEAM::file2array()
|
|||
// set of z2r arrays only fill lower triangular Nelement matrix
|
||||
// value = n = sum over rows of lower-triangular matrix until reach irow,icol
|
||||
// swap indices when irow < icol to stay lower triangular
|
||||
// OK if map = -1 (non-EAM atom in pair hybrid) b/c type2z2r not used
|
||||
// if map = -1 (non-EAM atom in pair hybrid):
|
||||
// type2z2r is not used by non-opt
|
||||
// but set type2z2r to 0 since accessed by opt
|
||||
|
||||
int irow,icol;
|
||||
for (i = 1; i <= ntypes; i++) {
|
||||
for (j = 1; j <= ntypes; j++) {
|
||||
irow = map[i];
|
||||
icol = map[j];
|
||||
if (irow == -1 || icol == -1) continue;
|
||||
if (irow == -1 || icol == -1) {
|
||||
type2z2r[i][j] = 0;
|
||||
continue;
|
||||
}
|
||||
if (irow < icol) {
|
||||
irow = map[j];
|
||||
icol = map[i];
|
||||
|
|
|
@ -298,14 +298,19 @@ void PairEAMAlloy::file2array()
|
|||
// set of z2r arrays only fill lower triangular Nelement matrix
|
||||
// value = n = sum over rows of lower-triangular matrix until reach irow,icol
|
||||
// swap indices when irow < icol to stay lower triangular
|
||||
// OK if map = -1 (non-EAM atom in pair hybrid) b/c type2z2r not used
|
||||
// if map = -1 (non-EAM atom in pair hybrid):
|
||||
// type2z2r is not used by non-opt
|
||||
// but set type2z2r to 0 since accessed by opt
|
||||
|
||||
int irow,icol;
|
||||
for (i = 1; i <= ntypes; i++) {
|
||||
for (j = 1; j <= ntypes; j++) {
|
||||
irow = map[i];
|
||||
icol = map[j];
|
||||
if (irow == -1 || icol == -1) continue;
|
||||
if (irow == -1 || icol == -1) {
|
||||
type2z2r[i][j] = 0;
|
||||
continue;
|
||||
}
|
||||
if (irow < icol) {
|
||||
irow = map[j];
|
||||
icol = map[i];
|
||||
|
|
|
@ -305,14 +305,19 @@ void PairEAMFS::file2array()
|
|||
// set of z2r arrays only fill lower triangular Nelement matrix
|
||||
// value = n = sum over rows of lower-triangular matrix until reach irow,icol
|
||||
// swap indices when irow < icol to stay lower triangular
|
||||
// OK if map = -1 (non-EAM atom in pair hybrid) b/c type2z2r not used
|
||||
// if map = -1 (non-EAM atom in pair hybrid):
|
||||
// type2z2r is not used by non-opt
|
||||
// but set type2z2r to 0 since accessed by opt
|
||||
|
||||
int irow,icol;
|
||||
for (i = 1; i <= ntypes; i++) {
|
||||
for (j = 1; j <= ntypes; j++) {
|
||||
irow = map[i];
|
||||
icol = map[j];
|
||||
if (irow == -1 || icol == -1) continue;
|
||||
if (irow == -1 || icol == -1) {
|
||||
type2z2r[i][j] = 0;
|
||||
continue;
|
||||
}
|
||||
if (irow < icol) {
|
||||
irow = map[j];
|
||||
icol = map[i];
|
||||
|
|
|
@ -414,8 +414,9 @@ void Finish::end(int flag)
|
|||
int inum = neighbor->lists[m]->inum;
|
||||
int *ilist = neighbor->lists[m]->ilist;
|
||||
int *numneigh = neighbor->lists[m]->numneigh;
|
||||
for (int ii = 0; ii < inum; ii++)
|
||||
nneigh += numneigh[ilist[ii]];
|
||||
if (numneigh)
|
||||
for (i = 0; i < inum; i++)
|
||||
nneigh += numneigh[ilist[i]];
|
||||
}
|
||||
|
||||
tmp = nneigh;
|
||||
|
@ -443,9 +444,13 @@ void Finish::end(int flag)
|
|||
|
||||
if (m < neighbor->old_nrequest) {
|
||||
nneigh = 0;
|
||||
for (i = 0; i < atom->nlocal; i++)
|
||||
nneigh += neighbor->lists[m]->numneigh[i];
|
||||
|
||||
int inum = neighbor->lists[m]->inum;
|
||||
int *ilist = neighbor->lists[m]->ilist;
|
||||
int *numneigh = neighbor->lists[m]->numneigh;
|
||||
if (numneigh)
|
||||
for (i = 0; i < inum; i++)
|
||||
nneigh += numneigh[ilist[i]];
|
||||
|
||||
tmp = nneigh;
|
||||
stats(1,&tmp,&ave,&max,&min,10,histo);
|
||||
if (me == 0) {
|
||||
|
|
|
@ -32,6 +32,7 @@ NeighList::NeighList(LAMMPS *lmp, int size) : Pointers(lmp)
|
|||
maxlocal = 0;
|
||||
pgsize = size;
|
||||
|
||||
inum = 0;
|
||||
ilist = NULL;
|
||||
numneigh = NULL;
|
||||
firstneigh = NULL;
|
||||
|
|
Loading…
Reference in New Issue