Fixing comm and renaming bytype

This commit is contained in:
Joel Clemmer
2020-11-09 16:32:11 -07:00
parent 557ef57526
commit 12288630f5
30 changed files with 98 additions and 63 deletions

View File

@ -175,20 +175,27 @@ void CommTiled::setup()
// check that cutoff < any periodic box length
if (mode == Comm::MULTI) {
double *cuttype = neighbor->cuttype;
double cut;
for (i = 1; i <= ntypes; i++) {
cut = 0.0;
if (cutusermulti) cut = cutusermulti[i];
cutghostmulti[i][0] = MAX(cut,cuttype[i]);
cutghostmulti[i][1] = MAX(cut,cuttype[i]);
cutghostmulti[i][2] = MAX(cut,cuttype[i]);
if (multi_bytype == 1) {
// Set the BYTYPE cutoff
cutghostmulti[i][0] = sqrt(neighbor->cutneighsq[i][i]);
cutghostmulti[i][1] = sqrt(neighbor->cutneighsq[i][i]);
cutghostmulti[i][2] = sqrt(neighbor->cutneighsq[i][i]);
}
if (multi_tiered) {
// If using tiered 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]));
}
} else {
// If using a single binlist, use the max itype-jtype interaction distance for communication
double *cuttype = neighbor->cuttype;
for (i = 1; i <= ntypes; i++) {
cut = 0.0;
if (cutusermulti) cut = cutusermulti[i];
cutghostmulti[i][0] = MAX(cut,cuttype[i]);
cutghostmulti[i][1] = MAX(cut,cuttype[i]);
cutghostmulti[i][2] = MAX(cut,cuttype[i]);
}
}
}