initializing comm distances, temporarily sorting nlit dumps

This commit is contained in:
Joel Clemmer
2020-11-26 14:57:48 -07:00
parent d7047245f4
commit 9b9e5022d6
3 changed files with 49 additions and 16 deletions

View File

@ -180,14 +180,19 @@ void CommBrick::setup()
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];
} else {
cutghostmulti[i][0] = 0.0;
cutghostmulti[i][1] = 0.0;
cutghostmulti[i][2] = 0.0;
}
for (j = 1; j <= ntypes; j++){
if(cuttypesq[j] > cuttypesq[i]) continue;
if(cutneighsq[j][j] > cutneighsq[i][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]));
@ -226,14 +231,19 @@ void CommBrick::setup()
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];
} else {
cutghostmulti[i][0] = 0.0;
cutghostmulti[i][1] = 0.0;
cutghostmulti[i][2] = 0.0;
}
for (j = 1; j <= ntypes; j++){
if(cuttypesq[j] > cuttypesq[i]) continue;
if(cutneighsq[j][j] > cutneighsq[i][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]));

View File

@ -182,14 +182,19 @@ void CommTiled::setup()
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];
} else {
cutghostmulti[i][0] = 0.0;
cutghostmulti[i][1] = 0.0;
cutghostmulti[i][2] = 0.0;
}
for (j = 1; j <= ntypes; j++){
if(cuttypesq[j] > cuttypesq[i]) continue;
if(cutneighsq[j][j] > cutneighsq[i][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]));

View File

@ -665,12 +665,16 @@ double ComputePropertyLocal::memory_usage()
void ComputePropertyLocal::pack_patom1(int n)
{
int i;
int i,j;
tagint *tag = atom->tag;
for (int m = 0; m < ncount; m++) {
i = indices[m][0];
j = indices[m][1];
if(tag[i] < tag[j])
buf[n] = tag[i];
else
buf[n] = tag[j];
n += nvalues;
}
}
@ -679,12 +683,16 @@ void ComputePropertyLocal::pack_patom1(int n)
void ComputePropertyLocal::pack_patom2(int n)
{
int i;
int i,j;
tagint *tag = atom->tag;
for (int m = 0; m < ncount; m++) {
i = indices[m][1];
i = indices[m][0];
j = indices[m][1];
if(tag[i] > tag[j])
buf[n] = tag[i];
else
buf[n] = tag[j];
n += nvalues;
}
}
@ -693,12 +701,17 @@ void ComputePropertyLocal::pack_patom2(int n)
void ComputePropertyLocal::pack_ptype1(int n)
{
int i;
int i,j;
int *type = atom->type;
tagint *tag = atom->tag;
for (int m = 0; m < ncount; m++) {
i = indices[m][0];
j = indices[m][1];
if(tag[i] < tag[j])
buf[n] = type[i];
else
buf[n] = type[j];
n += nvalues;
}
}
@ -707,12 +720,17 @@ void ComputePropertyLocal::pack_ptype1(int n)
void ComputePropertyLocal::pack_ptype2(int n)
{
int i;
int i,j;
int *type = atom->type;
tagint *tag = atom->tag;
for (int m = 0; m < ncount; m++) {
i = indices[m][1];
i = indices[m][0];
j = indices[m][1];
if(tag[i] > tag[j])
buf[n] = type[i];
else
buf[n] = type[j];
n += nvalues;
}
}