Fixing typos

This commit is contained in:
Joel Clemmer
2020-11-22 20:01:14 -07:00
parent af11a54a27
commit 00a74558ff
9 changed files with 63 additions and 29 deletions

View File

@ -177,15 +177,24 @@ void CommTiled::setup()
if (mode == Comm::MULTI) {
double cut;
if (multi2) {
// If using multi2 binlists, use the itype-itype interaction distance for communication
double **cutneighsq = neighbor->cutneighsq;
for (i = 1; i <= ntypes; i++) {
cut = 0.0;
if (cutusermulti) cut = cutusermulti[i];
cutghostmulti[i][0] = MAX(cut,sqrt(cutneighsq[i][i]));
cutghostmulti[i][1] = MAX(cut,sqrt(cutneighsq[i][i]));
cutghostmulti[i][2] = MAX(cut,sqrt(cutneighsq[i][i]));
}
// If using multi2 binlists, communicate itype particles a distance
// equal to the max of itype-jtype interaction given smaller jtype particles
double **cutneighsq = neighbor->cutneighsq;
double *cuttypesq = neighbor->cuttypesq;
for (i = 1; i <= ntypes; i++) {
cut = 0.0;
if (cutusermulti) {
cutghostmulti[i][0] = cutusermulti[i];
cutghostmulti[i][1] = cutusermulti[i];
cutghostmulti[i][2] = cutusermulti[i];
}
for (j = 1; j <= ntypes; j++){
if(cuttypesq[j] > cuttypesq[i]) continue;
cutghostmulti[i][0] = MAX(cutghostmulti[i][0],sqrt(cutneighsq[i][j]));
cutghostmulti[i][1] = MAX(cutghostmulti[i][1],sqrt(cutneighsq[i][j]));
cutghostmulti[i][2] = MAX(cutghostmulti[i][2],sqrt(cutneighsq[i][j]));
}
}
} else {
// If using a single binlist, use the max itype-jtype interaction distance for communication
double *cuttype = neighbor->cuttype;