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