From 4b31cf040759b7cfecf66111fe837b019d5a440b Mon Sep 17 00:00:00 2001
From: Henry <Henry>
Date: Tue, 29 Nov 2011 22:16:11 +0000
Subject: [PATCH] SP build: use scalar(1) rather than 1.0

---
 applications/solvers/combustion/XiFoam/bEqn.H |  7 +++++--
 .../compressibleTwoPhaseEulerFoam/alphaEqn.H  |  2 +-
 src/combustionModels/FSD/FSD.C                |  6 +++---
 .../incompressible/RAS/kkLOmega/kkLOmega.C    | 20 ++++++++-----------
 4 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H
index df37bf34c59..ff19598ba13 100644
--- a/applications/solvers/combustion/XiFoam/bEqn.H
+++ b/applications/solvers/combustion/XiFoam/bEqn.H
@@ -202,8 +202,11 @@ if (ign.ignited())
         volScalarField XiEq
         (
             scalar(1.001)
-          + (scalar(1) + (2*XiShapeCoef)*(scalar(0.5) - min(max(b, 0.0), 1.0)))
-            *(XiEqStar - scalar(1.001))
+          + (
+                scalar(1)
+              + (2*XiShapeCoef)
+               *(scalar(0.5) - min(max(b, scalar(0)), scalar(1)))
+            )*(XiEqStar - scalar(1.001))
         );
 
         volScalarField Gstar(0.28/tauEta);
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H
index 31c1023b8de..d7336401497 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H
@@ -86,7 +86,7 @@ surfaceScalarField alphaPhi2("alphaPhi2", phi2);
         alpha1Eqn.solve();
 
         //***HGW temporary boundedness-fix pending the introduction of MULES
-        alpha1 = max(min(alpha1, 1.0), 0.0);
+        alpha1 = max(min(alpha1, scalar(1)), scalar(0));
 
         #include "packingLimiter.H"
 
diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C
index f092147a1db..f5b3d4e8d24 100644
--- a/src/combustionModels/FSD/FSD.C
+++ b/src/combustionModels/FSD/FSD.C
@@ -199,7 +199,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
     );
 
     // Linear correlation between delta and flame thickness
-    volScalarField omegaF(max(deltaF*(4.0/3.0) + (2.0/3.0), 1.0));
+    volScalarField omegaF(max(deltaF*(4.0/3.0) + (2.0/3.0), scalar(1)));
 
     scalar deltaFt = 1.0/ftDim_;
 
@@ -319,9 +319,9 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
         products += Yp;
     }
 
-    volScalarField c(max(scalar(1.0) - products/max(pc, 1e-5), 0.0));
+    volScalarField c(max(scalar(1) - products/max(pc, scalar(1e-5)), scalar(0)));
 
-    pc = min(C_*c, scalar(1.0));
+    pc = min(C_*c, scalar(1));
 
     const volScalarField fres(this->singleMixture_.fres(fuelI));
 
diff --git a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C b/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C
index f1478a7db75..7dd7adb80e0 100644
--- a/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C
+++ b/src/turbulenceModels/incompressible/RAS/kkLOmega/kkLOmega.C
@@ -77,7 +77,7 @@ tmp<volScalarField> kkLOmega::Cmu(const volScalarField& S) const
 
 tmp<volScalarField> kkLOmega::BetaTS(const volScalarField& Rew) const
 {
-    return(scalar(1.0) - exp(-sqr(max(Rew - CtsCrit_, 0.0))/Ats_));
+    return(scalar(1) - exp(-sqr(max(Rew - CtsCrit_, scalar(0)))/Ats_));
 }
 
 
@@ -89,7 +89,7 @@ tmp<volScalarField> kkLOmega::fTaul
 {
     return
     (
-        scalar(1.0)
+        scalar(1)
       - exp
         (
             -CtauL_*ktL
@@ -130,7 +130,7 @@ tmp<volScalarField> kkLOmega::fOmega
 {
     return
     (
-        scalar(1.0)
+        scalar(1)
       - exp
         (
             -0.41
@@ -159,15 +159,12 @@ tmp<volScalarField> kkLOmega::gammaBP(const volScalarField& omega) const
         max
         (
             kt_/nu()
-          /
-            (
+          / (
                 omega
               + dimensionedScalar("ROTVSMALL", omega.dimensions(), ROOTVSMALL)
             )
-          -
-            CbpCrit_
-        ,
-            0.0
+          - CbpCrit_,
+            scalar(0)
         )
     );
 }
@@ -187,9 +184,8 @@ tmp<volScalarField> kkLOmega::gammaNAT
           - CnatCrit_
           / (
                 fNatCrit + dimensionedScalar("ROTVSMALL", dimless, ROOTVSMALL)
-            )
-          ,
-            0.0
+            ),
+            scalar(0)
         )
     );
 }
-- 
GitLab