correct indexing when filling lmp_firstneigh array
This commit is contained in:
@ -185,7 +185,6 @@ void MLIAPData::generate_neighdata(NeighList *list_in, int eflag_in, int vflag_i
|
||||
int jtype = type[j];
|
||||
const int jelem = map[jtype];
|
||||
|
||||
lmp_firstneigh[ii][jj] = firstneigh[i][jj];
|
||||
if (rsq < descriptor->cutsq[ielem][jelem]) {
|
||||
pair_i[ij] = i;
|
||||
jatoms[ij] = j;
|
||||
@ -193,6 +192,7 @@ void MLIAPData::generate_neighdata(NeighList *list_in, int eflag_in, int vflag_i
|
||||
rij[ij][0] = delx;
|
||||
rij[ij][1] = dely;
|
||||
rij[ij][2] = delz;
|
||||
lmp_firstneigh[ii][ninside] = firstneigh[i][jj];
|
||||
ij++;
|
||||
ninside++;
|
||||
}
|
||||
@ -228,6 +228,7 @@ void MLIAPData::grow_neigharrays()
|
||||
memory->grow(ielems, natomneigh, "MLIAPData:ielems");
|
||||
memory->grow(itypes, natomneigh, "MLIAPData:itypes");
|
||||
memory->grow(numneighs, natomneigh, "MLIAPData:numneighs");
|
||||
memory->grow(lmp_firstneigh, natomneigh, nneigh_max, "MLIAPData:lmp_firstneigh");
|
||||
natomneigh_max = natomneigh;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user