From 2d2ad386a68133c053dccf20b7b55b06b7383c0c Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 6 Jun 2012 17:45:18 +0100 Subject: [PATCH] Updated support for clang-3.1 --- .../solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H | 6 +++--- .../dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C | 2 +- .../solidDisplacementFoam/readMechanicalProperties.H | 6 +++--- .../tractionDisplacementCorrectionFvPatchVectorField.C | 6 +++--- etc/config/settings.csh | 4 ++-- etc/config/settings.sh | 4 ++-- .../cylindricalInletVelocityFvPatchVectorField.C | 2 +- .../variableHeightFlowRateFvPatchField.C | 2 +- .../variableHeightFlowRateInletVelocityFvPatchVectorField.C | 2 +- .../fields/fvPatchFields/fvPatchField/fvPatchField.C | 2 +- .../extendedLeastSquaresGrad/extendedLeastSquaresVectors.C | 4 ++-- .../finiteVolume/gradSchemes/fourthGrad/fourthGrad.C | 2 +- .../gradSchemes/leastSquaresGrad/leastSquaresVectors.C | 4 ++-- .../limitedSchemes/LimitedScheme/LimitedScheme.C | 2 +- .../schemes/linearUpwind/linearUpwind.C | 2 +- .../schemes/skewCorrected/skewCorrectionVectors.C | 2 +- .../surfaceInterpolation/surfaceInterpolation.C | 2 +- .../htcConv/htcConvFvPatchScalarField.C | 2 +- .../totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C | 2 +- wmake/rules/linux64Clang/c++ | 2 +- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index 11f3d4ddb5..bf8fd458aa 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -13,8 +13,8 @@ volScalarField rAU1(1.0/U1Eqn.A()); volScalarField rAU2(1.0/U2Eqn.A()); - surfaceScalarField rAlphaAU1f = fvc::interpolate(alpha1*rAU1); - surfaceScalarField rAlphaAU2f = fvc::interpolate(alpha2*rAU2); + surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1)); + surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rAU2)); volVectorField HbyA1("HbyA1", U1); HbyA1 = rAU1*U1Eqn.H(); @@ -104,7 +104,7 @@ if (pimple.finalNonOrthogonalIter()) { - surfaceScalarField mSfGradp = pEqnIncomp.flux()/Dp; + surfaceScalarField mSfGradp(pEqnIncomp.flux()/Dp); phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1); phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C index 9c4c04d579..cc4c7f9656 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C @@ -71,7 +71,7 @@ Foam::tmp Foam::dragModels::GidaspowErgunWenYu::K ) const { volScalarField alpha2(max(phase2_, scalar(1.0e-6))); - volScalarField d = phase1_.d(); + volScalarField d(phase1_.d()); volScalarField bp(pow(alpha2, -2.65)); volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3))); diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H index 9010f8a3f1..97891ad639 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H @@ -189,9 +189,9 @@ Info<< "Calculating Lame's coefficients\n" << endl; - volScalarField mu = E/(2.0*(1.0 + nu)); - volScalarField lambda = nu*E/((1.0 + nu)*(1.0 - 2.0*nu)); - volScalarField threeK = E/(1.0 - 2.0*nu); + volScalarField mu(E/(2.0*(1.0 + nu))); + volScalarField lambda(nu*E/((1.0 + nu)*(1.0 - 2.0*nu))); + volScalarField threeK(E/(1.0 - 2.0*nu)); Switch planeStress(mechanicalProperties.lookup("planeStress")); diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C index 47a2005992..c716d1c22d 100644 --- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C +++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C @@ -159,9 +159,9 @@ void tractionDisplacementCorrectionFvPatchVectorField::updateCoeffs() const fvPatchField& nu = patch().lookupPatchField("nu"); - scalarField E = rhoE/rho; - scalarField mu = E/(2.0*(1.0 + nu)); - scalarField lambda = nu*E/((1.0 + nu)*(1.0 - 2.0*nu)); + scalarField E(rhoE/rho); + scalarField mu(E/(2.0*(1.0 + nu))); + scalarField lambda(nu*E/((1.0 + nu)*(1.0 - 2.0*nu))); Switch planeStress(mechanicalProperties.lookup("planeStress")); diff --git a/etc/config/settings.csh b/etc/config/settings.csh index ea1a3740c2..0896420bcc 100644 --- a/etc/config/settings.csh +++ b/etc/config/settings.csh @@ -242,8 +242,8 @@ case ThirdParty: # using clang - not gcc setenv WM_CC 'clang' setenv WM_CXX 'clang++' - #set clang_version=llvm-2.9 - set clang_version=llvm-svn + set clang_version=llvm-3.1 + #set clang_version=llvm-svn breaksw default: echo diff --git a/etc/config/settings.sh b/etc/config/settings.sh index 0b12e4e453..1ece2c9cff 100644 --- a/etc/config/settings.sh +++ b/etc/config/settings.sh @@ -264,8 +264,8 @@ OpenFOAM | ThirdParty) # using clang - not gcc export WM_CC='clang' export WM_CXX='clang++' - #clang_version=llvm-2.9 - clang_version=llvm-svn + clang_version=llvm-3.1 + #clang_version=llvm-svn ;; *) echo diff --git a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C index d41c428e74..28b01cac24 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/cylindricalInletVelocity/cylindricalInletVelocityFvPatchVectorField.C @@ -132,7 +132,7 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::updateCoeffs() vector hatAxis = axis_/mag(axis_); const vectorField r(patch().Cf() - centre_); - const vectorField d = r - (hatAxis & r)*hatAxis; + const vectorField d(r - (hatAxis & r)*hatAxis); tmp tangVel ( diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C index 8c293d4a99..84dd2a40d2 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C @@ -136,7 +136,7 @@ void Foam::variableHeightFlowRateFvPatchScalarField::updateCoeffs() const fvsPatchField& phip = patch().lookupPatchField(phiName_); - scalarField alphap = this->patchInternalField(); + scalarField alphap(this->patchInternalField()); forAll(phip, i) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C index d0911a4910..b33bbc65f1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C @@ -113,7 +113,7 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField // a simpler way of doing this would be nice scalar avgU = -flowRate_/gSum(patch().magSf()*alphap); - vectorField n = patch().nf(); + vectorField n(patch().nf()); operator==(n*avgU*alphap); diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index 9266ab2749..975e11ff2b 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -27,7 +27,7 @@ License #include "dictionary.H" #include "fvMesh.H" #include "fvPatchFieldMapper.H" -//#include "fvMatrices.H" +#include "volMesh.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/finiteVolume/gradSchemes/extendedLeastSquaresGrad/extendedLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/extendedLeastSquaresGrad/extendedLeastSquaresVectors.C index ebec7bb7d5..ef2457299a 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/extendedLeastSquaresGrad/extendedLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/extendedLeastSquaresGrad/extendedLeastSquaresVectors.C @@ -138,7 +138,7 @@ void Foam::extendedLeastSquaresVectors::makeLeastSquaresVectors() const const labelUList& faceCells = p.faceCells(); // Build the d-vectors - vectorField pd = p.delta(); + vectorField pd(p.delta()); forAll(pd, patchFaceI) { @@ -252,7 +252,7 @@ void Foam::extendedLeastSquaresVectors::makeLeastSquaresVectors() const const labelUList& faceCells = p.faceCells(); // Build the d-vectors - vectorField pd = p.delta(); + vectorField pd(p.delta()); forAll(p, patchFaceI) { diff --git a/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C index ead1ed0c2b..77916be358 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C @@ -126,7 +126,7 @@ Foam::fv::fourthGrad::calcGrad const labelUList& faceCells = p.faceCells(); // Build the d-vectors - vectorField pd = p.delta(); + vectorField pd(p.delta()); const Field neighbourSecondfGrad ( diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C index 86b4bc0ad3..e2bb449139 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C @@ -132,7 +132,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const const labelUList& faceCells = p.patch().faceCells(); // Build the d-vectors - vectorField pd = p.delta(); + vectorField pd(p.delta()); if (pw.coupled()) { @@ -185,7 +185,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const const labelUList& faceCells = p.faceCells(); // Build the d-vectors - vectorField pd = p.delta(); + vectorField pd(p.delta()); if (pw.coupled()) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C index a7ea3a3374..22a15ee0c3 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C @@ -122,7 +122,7 @@ Foam::LimitedScheme::limiter ); // Build the d-vectors - vectorField pd = CDweights.boundaryField()[patchi].patch().delta(); + vectorField pd(CDweights.boundaryField()[patchi].patch().delta()); forAll(pLim, face) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C index b513c50e4a..fb5938c0e9 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwind.C @@ -111,7 +111,7 @@ Foam::linearUpwind::correction ); // Build the d-vectors - vectorField pd = Cf.boundaryField()[patchi].patch().delta(); + vectorField pd(Cf.boundaryField()[patchi].patch().delta()); forAll(pOwner, facei) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C index 9feff9adaa..82fbe9a41a 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C @@ -111,7 +111,7 @@ void Foam::skewCorrectionVectors::makeSkewCorrectionVectors() const const labelUList& faceCells = p.faceCells(); const vectorField& patchFaceCentres = Cf.boundaryField()[patchI]; const vectorField& patchSf = Sf.boundaryField()[patchI]; - const vectorField patchD = p.delta(); + const vectorField patchD(p.delta()); forAll(p, patchFaceI) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C index 165b8c4d55..b2c643f7a7 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C @@ -294,7 +294,7 @@ void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const forAll(nonOrthDeltaCoeffs.boundaryField(), patchi) { - vectorField delta = mesh_.boundary()[patchi].delta(); + vectorField delta(mesh_.boundary()[patchi].delta()); nonOrthDeltaCoeffs.boundaryField()[patchi] = 1.0/max(mesh_.boundary()[patchi].nf() & delta, 0.05*mag(delta)); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C index 0d88cdcc3e..0a427a3f1a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C @@ -108,7 +108,7 @@ void htcConvFvPatchScalarField::updateCoeffs() const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField alphaEffw = rasModel.alphaEff(patchI); + const scalarField alphaEffw(rasModel.alphaEff(patchI)); const scalarField& muw = rasModel.mu().boundaryField()[patchI]; const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; const vectorField& Uc = rasModel.U(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C index edfb17a26c..9d9134f950 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C @@ -158,7 +158,7 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs() const fvsPatchField& phip = patch().lookupPatchField(phiName_); - const scalarField alphap = turbulence.alphaEff(patchI); + const scalarField alphap(turbulence.alphaEff(patchI)); refValue() = 1.0; refGrad() = 0.0; diff --git a/wmake/rules/linux64Clang/c++ b/wmake/rules/linux64Clang/c++ index 0acf5ff38f..1f78395afb 100644 --- a/wmake/rules/linux64Clang/c++ +++ b/wmake/rules/linux64Clang/c++ @@ -1,7 +1,7 @@ .SUFFIXES: .C .cxx .cc .cpp # -Woverloaded-virtual may produce spurious warnings, disable for now -c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual +c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison CC = clang++ -m64