Fixing typo in pair gran, fixing bugs in communication and neighbor
This commit is contained in:
@ -1831,9 +1831,9 @@ double PairGranular::atom2cut(int i)
|
||||
|
||||
cut = atom->radius[i]*2;
|
||||
if(beyond_contact) {
|
||||
int itype = atom->type[i]
|
||||
int itype = atom->type[i];
|
||||
if(normal_model[itype][itype] == JKR) {
|
||||
cut += pulloffdistance(cut, cut, itype, itype);
|
||||
cut += pulloff_distance(cut, cut, itype, itype);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1856,7 +1856,7 @@ double PairGranular::radii2cut(double r1, double r2)
|
||||
for(int i = 0; i < n; i++){
|
||||
for(int j = 0; j < n; j++){
|
||||
if(normal_model[i][j] == JKR) {
|
||||
temp = pulloffdistance(r1, r2, i, j);
|
||||
temp = pulloff_distance(r1, r2, i, j);
|
||||
if(temp > cut) cut = temp;
|
||||
}
|
||||
}
|
||||
|
||||
@ -735,6 +735,13 @@ double Comm::get_comm_cutoff()
|
||||
maxcommcutoff));
|
||||
}
|
||||
|
||||
// Check maximum interval size for neighbor multi
|
||||
if(neighbor->interval_collection_flag){
|
||||
for(int i = 0; i < neighbor->ncollections; i++){
|
||||
maxcommcutoff = MAX(maxcommcutoff, neighbor->collection2cut[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return maxcommcutoff;
|
||||
}
|
||||
|
||||
|
||||
@ -2655,7 +2655,7 @@ void Neighbor::build_collection(int istart)
|
||||
collection[i] = -1;
|
||||
|
||||
for(icollection = 0; icollection < ncollections; icollection++){
|
||||
if(collection2cut[icollection] > cut) {
|
||||
if(collection2cut[icollection] >= cut) {
|
||||
collection[i] = icollection;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -354,6 +354,7 @@ void NStencil::create_setup()
|
||||
if (sy*binsizey_multi[bin_collection] < stencil_range) sy++;
|
||||
sz = static_cast<int> (stencil_range*bininvz_multi[bin_collection]);
|
||||
if (sz*binsizez_multi[bin_collection] < stencil_range) sz++;
|
||||
if (dimension == 2) sz = 0;
|
||||
|
||||
stencil_sx_multi[i][j] = sx;
|
||||
stencil_sy_multi[i][j] = sy;
|
||||
|
||||
Reference in New Issue
Block a user