more consistent formatting of for/while loops and if statements

This commit is contained in:
Axel Kohlmeyer
2020-12-30 09:01:37 -05:00
parent eef28b58ab
commit 382ade15fe
345 changed files with 4259 additions and 4259 deletions

View File

@ -247,7 +247,7 @@ void ComputeEntropyAtom::compute_peratom()
// loop over list of all neighbors within force cutoff
// initialize gofr
for(int k=0;k<nbin;++k) gofr[k]=0.;
for (int k=0;k<nbin;++k) gofr[k]=0.;
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
@ -267,7 +267,7 @@ void ComputeEntropyAtom::compute_peratom()
if (minbin > (nbin-1)) minbin=nbin-1;
maxbin=bin + deltabin;
if (maxbin > (nbin-1)) maxbin=nbin-1;
for(int k=minbin;k<maxbin+1;k++) {
for (int k=minbin;k<maxbin+1;k++) {
double invNormKernel=invNormConstantBase/rbinsq[k];
double distance = r - rbin[k];
gofr[k] += invNormKernel*exp(-distance*distance/sigmasq2);
@ -276,7 +276,7 @@ void ComputeEntropyAtom::compute_peratom()
}
// Calculate integrand
for(int k=0;k<nbin;++k){
for (int k=0;k<nbin;++k) {
if (gofr[k]<1.e-10) {
integrand[k] = rbinsq[k];
} else {
@ -286,7 +286,7 @@ void ComputeEntropyAtom::compute_peratom()
// Integrate with trapezoid rule
double value = 0.;
for(int k=1;k<nbin-1;++k){
for (int k=1;k<nbin-1;++k) {
value += integrand[k];
}
value += 0.5*integrand[0];