whitespace fixes
This commit is contained in:
@ -84,15 +84,15 @@ information is available, then also a heuristic based on that bond length
|
|||||||
is computed. It is used as communication cutoff, if there is no pair
|
is computed. It is used as communication cutoff, if there is no pair
|
||||||
style present and no *comm_modify cutoff* command used. Otherwise a
|
style present and no *comm_modify cutoff* command used. Otherwise a
|
||||||
warning is printed, if this bond based estimate is larger than the
|
warning is printed, if this bond based estimate is larger than the
|
||||||
communication cutoff used.
|
communication cutoff used.
|
||||||
|
|
||||||
The *cutoff/multi* option is equivalent to *cutoff*\ , but applies to
|
The *cutoff/multi* option is equivalent to *cutoff*\ , but applies to
|
||||||
communication mode *multi* instead. Since in this case the communication
|
communication mode *multi* instead. Since in this case the communication
|
||||||
cutoffs are determined per atom type, a type specifier is needed and
|
cutoffs are determined per atom type, a type specifier is needed and
|
||||||
cutoff for one or multiple types can be extended. Also ranges of types
|
cutoff for one or multiple types can be extended. Also ranges of types
|
||||||
using the usual asterisk notation can be given. For granular pairstyles,
|
using the usual asterisk notation can be given. For granular pairstyles,
|
||||||
the default cutoff is set to the sum of the current maximum atomic radii
|
the default cutoff is set to the sum of the current maximum atomic radii
|
||||||
for each type.
|
for each type.
|
||||||
|
|
||||||
These are simulation scenarios in which it may be useful or even
|
These are simulation scenarios in which it may be useful or even
|
||||||
necessary to set a ghost cutoff > neighbor cutoff:
|
necessary to set a ghost cutoff > neighbor cutoff:
|
||||||
|
|||||||
@ -49,7 +49,7 @@ sometimes be faster. Either style should give the same answers.
|
|||||||
|
|
||||||
The *multi* style is a modified binning algorithm that is useful for
|
The *multi* style is a modified binning algorithm that is useful for
|
||||||
systems with a wide range of cutoff distances, e.g. due to different
|
systems with a wide range of cutoff distances, e.g. due to different
|
||||||
size particles. For granular pairstyles, cutoffs are set to the
|
size particles. For granular pairstyles, cutoffs are set to the
|
||||||
sum of the maximum atomic radii for each atom type.
|
sum of the maximum atomic radii for each atom type.
|
||||||
For the *bin* style, the bin size is set to 1/2 of
|
For the *bin* style, the bin size is set to 1/2 of
|
||||||
the largest cutoff distance between any pair of atom types and a
|
the largest cutoff distance between any pair of atom types and a
|
||||||
|
|||||||
@ -924,66 +924,66 @@ int Balance::shift()
|
|||||||
i = 0;
|
i = 0;
|
||||||
while (i < np) {
|
while (i < np) {
|
||||||
if (split[i+1] - split[i] < close) {
|
if (split[i+1] - split[i] < close) {
|
||||||
j = i+1;
|
j = i+1;
|
||||||
|
|
||||||
// I,J = set of consecutive splits that are collectively too close
|
// I,J = set of consecutive splits that are collectively too close
|
||||||
// if can expand set and not become too close to splits I-1 or J+1, do it
|
// if can expand set and not become too close to splits I-1 or J+1, do it
|
||||||
// else add split I-1 or J+1 to set and try again
|
// else add split I-1 or J+1 to set and try again
|
||||||
// delta = size of expanded split set that will satisy criterion
|
// delta = size of expanded split set that will satisy criterion
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
delta = (j-i) * close;
|
delta = (j-i) * close;
|
||||||
midpt = 0.5 * (split[i]+split[j]);
|
midpt = 0.5 * (split[i]+split[j]);
|
||||||
start = midpt - 0.5*delta;
|
start = midpt - 0.5*delta;
|
||||||
stop = midpt + 0.5*delta;
|
stop = midpt + 0.5*delta;
|
||||||
|
|
||||||
if (i > 0) lbound = split[i-1] + close;
|
if (i > 0) lbound = split[i-1] + close;
|
||||||
else lbound = 0.0;
|
else lbound = 0.0;
|
||||||
if (j < np) ubound = split[j+1] - close;
|
if (j < np) ubound = split[j+1] - close;
|
||||||
else ubound = 1.0;
|
else ubound = 1.0;
|
||||||
|
|
||||||
// start/stop are within bounds, reset the splits
|
// start/stop are within bounds, reset the splits
|
||||||
|
|
||||||
if (start >= lbound && stop <= ubound) break;
|
if (start >= lbound && stop <= ubound) break;
|
||||||
|
|
||||||
// try a shift to either bound, reset the splits if delta fits
|
// try a shift to either bound, reset the splits if delta fits
|
||||||
// these tests change start/stop
|
// these tests change start/stop
|
||||||
|
|
||||||
if (start < lbound) {
|
if (start < lbound) {
|
||||||
start = lbound;
|
start = lbound;
|
||||||
stop = start + delta;
|
stop = start + delta;
|
||||||
if (stop <= ubound) break;
|
if (stop <= ubound) break;
|
||||||
} else if (stop > ubound) {
|
} else if (stop > ubound) {
|
||||||
stop = ubound;
|
stop = ubound;
|
||||||
start = stop - delta;
|
start = stop - delta;
|
||||||
if (start >= lbound) break;
|
if (start >= lbound) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delta does not fit between lbound and ubound
|
// delta does not fit between lbound and ubound
|
||||||
// exit if can't expand set, else expand set
|
// exit if can't expand set, else expand set
|
||||||
// if can expand in either direction,
|
// if can expand in either direction,
|
||||||
// pick new split closest to current midpt of set
|
// pick new split closest to current midpt of set
|
||||||
|
|
||||||
if (i == 0 && j == np) {
|
if (i == 0 && j == np) {
|
||||||
start = 0.0; stop = 1.0;
|
start = 0.0; stop = 1.0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == 0) j++;
|
if (i == 0) j++;
|
||||||
else if (j == np) i--;
|
else if (j == np) i--;
|
||||||
else if (midpt-lbound < ubound-midpt) i--;
|
else if (midpt-lbound < ubound-midpt) i--;
|
||||||
else j++;
|
else j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset all splits between I,J inclusive to be equi-spaced
|
// reset all splits between I,J inclusive to be equi-spaced
|
||||||
|
|
||||||
spacing = (stop-start) / (j-i);
|
spacing = (stop-start) / (j-i);
|
||||||
for (m = i; m <= j; m++)
|
for (m = i; m <= j; m++)
|
||||||
split[m] = start + (m-i)*spacing;
|
split[m] = start + (m-i)*spacing;
|
||||||
if (j == np) split[np] = 1.0;
|
if (j == np) split[np] = 1.0;
|
||||||
|
|
||||||
// continue testing beyond the J split
|
// continue testing beyond the J split
|
||||||
|
|
||||||
i = j+1;
|
i = j+1;
|
||||||
} else i++;
|
} else i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -93,9 +93,9 @@ void NPairHalfSizeMultiNewton::build(NeighList *list)
|
|||||||
cutdistsq = (radsum+skin) * (radsum+skin);
|
cutdistsq = (radsum+skin) * (radsum+skin);
|
||||||
|
|
||||||
if (rsq <= cutdistsq) {
|
if (rsq <= cutdistsq) {
|
||||||
if (history && rsq < radsum*radsum)
|
if (history && rsq < radsum*radsum)
|
||||||
neighptr[n++] = j ^ mask_history;
|
neighptr[n++] = j ^ mask_history;
|
||||||
else
|
else
|
||||||
neighptr[n++] = j;
|
neighptr[n++] = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ void NPairHalfSizeMultiNewton::build(NeighList *list)
|
|||||||
cutdistsq = (radsum+skin) * (radsum+skin);
|
cutdistsq = (radsum+skin) * (radsum+skin);
|
||||||
|
|
||||||
if (rsq <= cutdistsq) {
|
if (rsq <= cutdistsq) {
|
||||||
if (history && rsq < radsum*radsum)
|
if (history && rsq < radsum*radsum)
|
||||||
neighptr[n++] = j ^ mask_history;
|
neighptr[n++] = j ^ mask_history;
|
||||||
else
|
else
|
||||||
neighptr[n++] = j;
|
neighptr[n++] = j;
|
||||||
|
|||||||
@ -105,7 +105,7 @@ void NPairHalfSizeMultiNewtonTri::build(NeighList *list)
|
|||||||
cutdistsq = (radsum+skin) * (radsum+skin);
|
cutdistsq = (radsum+skin) * (radsum+skin);
|
||||||
|
|
||||||
if (rsq <= cutdistsq) {
|
if (rsq <= cutdistsq) {
|
||||||
if (history && rsq < radsum*radsum)
|
if (history && rsq < radsum*radsum)
|
||||||
neighptr[n++] = j ^ mask_history;
|
neighptr[n++] = j ^ mask_history;
|
||||||
else
|
else
|
||||||
neighptr[n++] = j;
|
neighptr[n++] = j;
|
||||||
|
|||||||
Reference in New Issue
Block a user