Converted tabs to blanks

This commit is contained in:
Aidan Thompson
2025-01-11 13:19:54 -07:00
parent a2f8e730a2
commit 283adb288b

View File

@ -80,20 +80,20 @@ void PairHybridScaled::compute(int eflag, int vflag)
// for equal-style, compute variable, set variable index to -1
if (input->variable->equalstyle(m)) {
vals[k] = input->variable->compute_equal(m);
vars[k] = -1;
vals[k] = input->variable->compute_equal(m);
vars[k] = -1;
// for atom-style, store variable index, set variable to 0.0, set atomscaleflag
} else if (input->variable->atomstyle(m)) {
vals[k] = 0.0;
vars[k] = m;
atomscaleflag = 1;
vals[k] = 0.0;
vars[k] = m;
atomscaleflag = 1;
} else
error->all(FLERR, "Variable '{}' has incompatible style", scalevars[k]);
error->all(FLERR, "Variable '{}' has incompatible style", scalevars[k]);
}
for (int k = 0; k < nstyles; ++k) {
if (scaleidx[k] >= 0) {
scaleval[k] = vals[scaleidx[k]];
atomvar[k] = vars[scaleidx[k]];
scaleval[k] = vals[scaleidx[k]];
atomvar[k] = vars[scaleidx[k]];
}
}
delete[] vals;
@ -187,28 +187,28 @@ void PairHybridScaled::compute(int eflag, int vflag)
const double scale = scaleval[m];
if (atomvar[m] == -1) {
for (i = 0; i < nall; ++i) {
fsum[i][0] += scale * f[i][0];
fsum[i][1] += scale * f[i][1];
fsum[i][2] += scale * f[i][2];
if (atom->torque_flag) {
tsum[i][0] += scale * t[i][0];
tsum[i][1] += scale * t[i][1];
tsum[i][2] += scale * t[i][2];
}
fsum[i][0] += scale * f[i][0];
fsum[i][1] += scale * f[i][1];
fsum[i][2] += scale * f[i][2];
if (atom->torque_flag) {
tsum[i][0] += scale * t[i][0];
tsum[i][1] += scale * t[i][1];
tsum[i][2] += scale * t[i][2];
}
}
} else {
int igroupall = 0;
input->variable->compute_atom(atomvar[m],igroupall,atomscale,1,0);
for (i = 0; i < nall; ++i) {
const double ascale = atomscale[i];
fsum[i][0] += ascale * f[i][0];
fsum[i][1] += ascale * f[i][1];
fsum[i][2] += ascale * f[i][2];
if (atom->torque_flag) {
tsum[i][0] += ascale * t[i][0];
tsum[i][1] += ascale * t[i][1];
tsum[i][2] += ascale * t[i][2];
}
const double ascale = atomscale[i];
fsum[i][0] += ascale * f[i][0];
fsum[i][1] += ascale * f[i][1];
fsum[i][2] += ascale * f[i][2];
if (atom->torque_flag) {
tsum[i][0] += ascale * t[i][0];
tsum[i][1] += ascale * t[i][1];
tsum[i][2] += ascale * t[i][2];
}
}
}
@ -236,7 +236,7 @@ void PairHybridScaled::compute(int eflag, int vflag)
if (force->newton_pair) n += atom->nghost;
double **vatom_substyle = styles[m]->vatom;
for (i = 0; i < n; i++)
for (j = 0; j < 6; j++) vatom[i][j] += scale * vatom_substyle[i][j];
for (j = 0; j < 6; j++) vatom[i][j] += scale * vatom_substyle[i][j];
}
// substyles may be CENTROID_SAME or CENTROID_AVAIL
@ -245,15 +245,15 @@ void PairHybridScaled::compute(int eflag, int vflag)
n = atom->nlocal;
if (force->newton_pair) n += atom->nghost;
if (styles[m]->centroidstressflag == CENTROID_AVAIL) {
double **cvatom_substyle = styles[m]->cvatom;
for (i = 0; i < n; i++)
for (j = 0; j < 9; j++) cvatom[i][j] += scale * cvatom_substyle[i][j];
double **cvatom_substyle = styles[m]->cvatom;
for (i = 0; i < n; i++)
for (j = 0; j < 9; j++) cvatom[i][j] += scale * cvatom_substyle[i][j];
} else {
double **vatom_substyle = styles[m]->vatom;
for (i = 0; i < n; i++) {
for (j = 0; j < 6; j++) { cvatom[i][j] += scale * vatom_substyle[i][j]; }
for (j = 6; j < 9; j++) { cvatom[i][j] += scale * vatom_substyle[i][j - 3]; }
}
double **vatom_substyle = styles[m]->vatom;
for (i = 0; i < n; i++) {
for (j = 0; j < 6; j++) { cvatom[i][j] += scale * vatom_substyle[i][j]; }
for (j = 6; j < 9; j++) { cvatom[i][j] += scale * vatom_substyle[i][j - 3]; }
}
}
}
}
@ -349,7 +349,7 @@ void PairHybridScaled::settings(int narg, char **arg)
// first process scale factor or variable
// idx < 0 indicates constant value otherwise index in variable name list
// initialize atomvar[k] = -1 indicates atom-style variable
// initialize atomvar[k] = -1 indicates atom-style variable
double val = 0.0;
int idx = -1;