From 53959e7e4587cddd3866e2b77993f037e3ff99d6 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 13 Jun 2018 12:46:15 +0200 Subject: [PATCH] COMP: ambiguous construction from tmp (clang) STYLE: more consistent use of dimensioned Zero --- .../stabilityBlendingFactor.C | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C index 4e99cb99e5..fd28ac81f8 100644 --- a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C +++ b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C @@ -70,7 +70,6 @@ bool Foam::functionObjects::stabilityBlendingFactor::calc() bool Foam::functionObjects::stabilityBlendingFactor::init(bool first) { - const IOField* residualPtr = mesh_.lookupObjectPtr>(residualName_); @@ -100,7 +99,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first) oldErrorIntegral_ = errorIntegral_; error_ = mag(meanRes - mag(*residualPtr)); errorIntegral_ = oldErrorIntegral_ + 0.5*(error_ + oldError_); - const scalarField errorDifferential = error_ - oldError_; + const scalarField errorDifferential(error_ - oldError_); const scalarField factorList ( @@ -229,7 +228,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, Zero), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) ); @@ -248,7 +247,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchScalarField::typeName ); cci = mesh_.C().component(i); @@ -298,7 +297,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, Zero), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) ); @@ -360,7 +359,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), nonOrthogonality_(dict.lookupOrDefault("switchNonOrtho", false)), @@ -434,7 +433,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); store(resultName_, faceBlendedPtr);