whitespace fixes

This commit is contained in:
Axel Kohlmeyer
2020-12-18 22:43:12 -05:00
parent 9f206b471e
commit 2022dc0aa9
5 changed files with 54 additions and 54 deletions

View File

@ -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
style present and no *comm_modify cutoff* command used. Otherwise a
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
communication mode *multi* instead. Since in this case the communication
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
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
for each type.
for each type.
These are simulation scenarios in which it may be useful or even
necessary to set a ghost cutoff > neighbor cutoff:

View File

@ -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
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.
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

View File

@ -924,66 +924,66 @@ int Balance::shift()
i = 0;
while (i < np) {
if (split[i+1] - split[i] < close) {
j = i+1;
j = i+1;
// 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
// else add split I-1 or J+1 to set and try again
// delta = size of expanded split set that will satisy criterion
// 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
// else add split I-1 or J+1 to set and try again
// delta = size of expanded split set that will satisy criterion
while (1) {
delta = (j-i) * close;
midpt = 0.5 * (split[i]+split[j]);
start = midpt - 0.5*delta;
stop = midpt + 0.5*delta;
while (1) {
delta = (j-i) * close;
midpt = 0.5 * (split[i]+split[j]);
start = midpt - 0.5*delta;
stop = midpt + 0.5*delta;
if (i > 0) lbound = split[i-1] + close;
else lbound = 0.0;
if (j < np) ubound = split[j+1] - close;
else ubound = 1.0;
if (i > 0) lbound = split[i-1] + close;
else lbound = 0.0;
if (j < np) ubound = split[j+1] - close;
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
// these tests change start/stop
// try a shift to either bound, reset the splits if delta fits
// these tests change start/stop
if (start < lbound) {
start = lbound;
stop = start + delta;
if (stop <= ubound) break;
} else if (stop > ubound) {
stop = ubound;
start = stop - delta;
if (start >= lbound) break;
}
if (start < lbound) {
start = lbound;
stop = start + delta;
if (stop <= ubound) break;
} else if (stop > ubound) {
stop = ubound;
start = stop - delta;
if (start >= lbound) break;
}
// delta does not fit between lbound and ubound
// exit if can't expand set, else expand set
// if can expand in either direction,
// pick new split closest to current midpt of set
// delta does not fit between lbound and ubound
// exit if can't expand set, else expand set
// if can expand in either direction,
// pick new split closest to current midpt of set
if (i == 0 && j == np) {
start = 0.0; stop = 1.0;
break;
}
if (i == 0) j++;
else if (j == np) i--;
else if (midpt-lbound < ubound-midpt) i--;
else j++;
}
if (i == 0 && j == np) {
start = 0.0; stop = 1.0;
break;
}
if (i == 0) j++;
else if (j == np) i--;
else if (midpt-lbound < ubound-midpt) i--;
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);
for (m = i; m <= j; m++)
split[m] = start + (m-i)*spacing;
spacing = (stop-start) / (j-i);
for (m = i; m <= j; m++)
split[m] = start + (m-i)*spacing;
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++;
}

View File

@ -93,9 +93,9 @@ void NPairHalfSizeMultiNewton::build(NeighList *list)
cutdistsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutdistsq) {
if (history && rsq < radsum*radsum)
if (history && rsq < radsum*radsum)
neighptr[n++] = j ^ mask_history;
else
else
neighptr[n++] = j;
}
}
@ -123,7 +123,7 @@ void NPairHalfSizeMultiNewton::build(NeighList *list)
cutdistsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutdistsq) {
if (history && rsq < radsum*radsum)
if (history && rsq < radsum*radsum)
neighptr[n++] = j ^ mask_history;
else
neighptr[n++] = j;

View File

@ -105,7 +105,7 @@ void NPairHalfSizeMultiNewtonTri::build(NeighList *list)
cutdistsq = (radsum+skin) * (radsum+skin);
if (rsq <= cutdistsq) {
if (history && rsq < radsum*radsum)
if (history && rsq < radsum*radsum)
neighptr[n++] = j ^ mask_history;
else
neighptr[n++] = j;