From 43ec00e50c3a5f639b356d241872b934cf6a2e97 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Tue, 21 Dec 2010 09:46:55 +0100
Subject: [PATCH] COMP: avoid ambiguous construct from tmp - test/ utils/

- missed these on the first sweep
---
 applications/test/ODE/Test-ODE.C                      |  6 +++---
 applications/test/fvc/Test-fvc.C                      | 11 +++++------
 applications/test/graphXi/Test-graphXi.C              |  8 ++++----
 applications/test/lduMatrix/Test-lduMatrix3.C         |  2 +-
 .../miscellaneous/postChannel/calculateFields.H       |  8 ++++----
 .../velocityField/streamFunction/streamFunction.C     |  2 +-
 .../utilities/surface/surfaceCheck/surfaceCheck.C     |  2 +-
 7 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/applications/test/ODE/Test-ODE.C b/applications/test/ODE/Test-ODE.C
index 2a3b8357b96..95af263718e 100644
--- a/applications/test/ODE/Test-ODE.C
+++ b/applications/test/ODE/Test-ODE.C
@@ -129,8 +129,8 @@ int main(int argc, char *argv[])
         scalar eps = ::Foam::exp(-scalar(i + 1));
 
         scalar x = xStart;
-        scalarField y = yStart;
-        scalarField dydx = dyStart;
+        scalarField y(yStart);
+        scalarField dydx(dyStart);
 
         scalarField yScale(ode.nEqns(), 1.0);
         scalar hEst = 0.6;
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
 
     scalar x = xStart;
     scalar xEnd = x + 1.0;
-    scalarField y = yStart;
+    scalarField y(yStart);
 
     scalarField yEnd(ode.nEqns());
     yEnd[0] = ::Foam::j0(xEnd);
diff --git a/applications/test/fvc/Test-fvc.C b/applications/test/fvc/Test-fvc.C
index 70d03a692a4..133884c7de3 100644
--- a/applications/test/fvc/Test-fvc.C
+++ b/applications/test/fvc/Test-fvc.C
@@ -41,18 +41,17 @@ int main(int argc, char *argv[])
 #   include "createTime.H"
 #   include "createMesh.H"
 
-    volScalarField fx = pow(mesh.C().component(vector::X), 2);
+    volScalarField fx(pow(mesh.C().component(vector::X), 2));
     fx.write();
-    volScalarField gradx4 = fvc::grad(fx)().component(vector::X);
+    volScalarField gradx4(fvc::grad(fx)().component(vector::X));
     gradx4.write();
 
-    //volVectorField curlC = fvc::curl(1.0*mesh.C());
-
+    //volVectorField curlC(fvc::curl(1.0*mesh.C()));
     //curlC.write();
 
     /*
-    surfaceScalarField xf = mesh.Cf().component(vector::X);
-    surfaceScalarField xf4 = pow(xf, 4);
+    surfaceScalarField xf(mesh.Cf().component(vector::X));
+    surfaceScalarField xf4(pow(xf, 4));
 
     for (int i=1; i<xf4.size()-1; i++)
     {
diff --git a/applications/test/graphXi/Test-graphXi.C b/applications/test/graphXi/Test-graphXi.C
index 2ef64f79bdd..7a852513d92 100644
--- a/applications/test/graphXi/Test-graphXi.C
+++ b/applications/test/graphXi/Test-graphXi.C
@@ -47,10 +47,10 @@ int main()
         x[i] = -3 + 0.06*i;
     }
 
-    scalarField b = 0.5*(1.0 + erf(x));
-    scalarField c = 1.0 - b;
-    scalarField gradb = (1/::sqrt(constant::mathematical::pi))*exp(-sqr(x));
-    scalarField lapb = -2*x*gradb;
+    scalarField b(0.5*(1.0 + erf(x)));
+    scalarField c(1.0 - b);
+    scalarField gradb((1/::sqrt(constant::mathematical::pi))*exp(-sqr(x)));
+    scalarField lapb(-2*x*gradb);
 
     r = lapb*b*c/(gradb*gradb);
 
diff --git a/applications/test/lduMatrix/Test-lduMatrix3.C b/applications/test/lduMatrix/Test-lduMatrix3.C
index 175cf949e9b..7874c57c39b 100644
--- a/applications/test/lduMatrix/Test-lduMatrix3.C
+++ b/applications/test/lduMatrix/Test-lduMatrix3.C
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
 
         for (int corr=0; corr<nCorr; corr++)
         {
-            volScalarField rAU = 1.0/UEqn.A();
+            volScalarField rAU(1.0/UEqn.A());
 
             U = rAU*UEqn.H();
             phi = (fvc::interpolate(U) & mesh.Sf())
diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/calculateFields.H b/applications/utilities/postProcessing/miscellaneous/postChannel/calculateFields.H
index 6c7cffcf0ad..026861d8751 100644
--- a/applications/utilities/postProcessing/miscellaneous/postChannel/calculateFields.H
+++ b/applications/utilities/postProcessing/miscellaneous/postChannel/calculateFields.H
@@ -1,9 +1,9 @@
         /*
-        volTensorField gradU = fvc::grad(U);
-        volSymmTensorField D = symm(fvc::grad(U));
-        volTensorField Dprim = symm(fvc::grad(U - UMean));
+        volTensorField gradU(fvc::grad(U));
+        volSymmTensorField D(symm(fvc::grad(U)));
+        volTensorField Dprim(symm(fvc::grad(U - UMean)));
 
-        volScalarField prod = -((U - UMean)*(U - UMean)) && D;
+        volScalarField prod(-((U - UMean)*(U - UMean)) && D);
         */
 
         /*
diff --git a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C
index 28359cddc62..6b1d4a52fe5 100644
--- a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C
+++ b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
 
             label nInternalFaces = mesh.nInternalFaces();
 
-            vectorField unitAreas = mesh.faceAreas();
+            vectorField unitAreas(mesh.faceAreas());
             unitAreas /= mag(unitAreas);
 
             const polyPatchList& patches = mesh.boundaryMesh();
diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C
index a5e8429cb9b..426ce917cdd 100644
--- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C
+++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C
@@ -209,7 +209,7 @@ int main(int argc, char *argv[])
     // write bounding box corners
     if (args.optionFound("blockMesh"))
     {
-        pointField cornerPts = boundBox(surf.points()).corners();
+        pointField cornerPts(boundBox(surf.points()).corners());
 
         Info<<"// blockMeshDict info" << nl;
 
-- 
GitLab