Skip to content

Commit

Permalink
add const2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bumseok Lee committed Sep 9, 2024
1 parent 96f235c commit a282952
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/node_kernels/SDRSSTBLTM2015NodeKernel.C
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ SDRSSTBLTM2015NodeKernel::execute(
const DblType dVol = dualNodalVolume_.get(node, 0);
const DblType fOneBlend = fOneBlend_.get(node, 0);

DblType Pk = 0.0;
DblType crossDiff = 0.0;

DblType sijMag = 0.0;
Expand All @@ -111,7 +110,7 @@ SDRSSTBLTM2015NodeKernel::execute(
vortMag = stk::math::sqrt(2.0 * vortMag);

// Pk based on Kato-Launder formulation
Pk = tvisc * sijMag * vortMag;
const DblType Pk = tvisc * sijMag * vortMag;

// Blend constants for SDR
const DblType omf1 = (1.0 - fOneBlend);
Expand Down
10 changes: 4 additions & 6 deletions src/node_kernels/TKESSTBLTM2015NodeKernel.C
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ TKESSTBLTM2015NodeKernel::execute(
const DblType CSEP = 1.0;
const DblType Retclim = 1100.0;

DblType Pklim = 0.0;
DblType sijMag = 1.0e-16;
DblType vortMag = 1.0e-16;

DblType Pk = 0.0;
for (int i = 0; i < nDim_; ++i) {
// const int offset = nDim_ * i;
for (int j = 0; j < nDim_; ++j) {
Expand All @@ -105,13 +103,13 @@ TKESSTBLTM2015NodeKernel::execute(
sijMag = stk::math::sqrt(2.0 * sijMag);
vortMag = stk::math::sqrt(2.0 * vortMag);

DblType Rev = density * dw * dw * sijMag / visc;
DblType Fonlim =
const DblType Rev = density * dw * dw * sijMag / visc;
const DblType Fonlim =
stk::math::min(stk::math::max(Rev / 2.2 / Retclim - 1.0, 0.0), 3.0);

// Pk based on Kato-Launder formulation
Pk = gamint * tvisc * sijMag * vortMag;
Pklim = 5.0 * Ck_BLT * stk::math::max(gamint - 0.2, 0.0) * (1.0 - gamint) *
const DblType Pk = gamint * tvisc * sijMag * vortMag;
const DblType Pklim = 5.0 * Ck_BLT * stk::math::max(gamint - 0.2, 0.0) * (1.0 - gamint) *
Fonlim * stk::math::max(3.0 * CSEP * visc - tvisc, 0.0) * sijMag *
vortMag;
const DblType Dk =
Expand Down

0 comments on commit a282952

Please sign in to comment.