Commit a494ec35 authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: avoid ambiguous construct from tmp - finiteVolume, thermophysicalModels, turbulenceModels

- missed on these on the first sweep
parent 7901ce1c
......@@ -34,8 +34,10 @@ scalar meanMeshCoNum = 0.0;
if (mesh.nInternalFaces())
{
scalarField sumPhi =
fvc::surfaceSum(mag(mesh.phi()))().internalField();
scalarField sumPhi
(
fvc::surfaceSum(mag(mesh.phi()))().internalField()
);
meshCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
......
......@@ -34,9 +34,11 @@ scalar meanCoNum = 0.0;
if (mesh.nInternalFaces())
{
scalarField sumPhi =
scalarField sumPhi
(
fvc::surfaceSum(mag(phi))().internalField()
/rho.internalField();
/ rho.internalField()
);
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
......
......@@ -137,7 +137,7 @@ void Foam::SRFVelocityFvPatchVectorField::updateCoeffs()
db().lookupObject<SRF::SRFModel>("SRFProperties");
// Determine patch velocity due to SRF
const vectorField SRFVelocity = srf.velocity(patch().Cf());
const vectorField SRFVelocity(srf.velocity(patch().Cf()));
operator==(-SRFVelocity + inletValue_);
}
......
......@@ -34,8 +34,10 @@ scalar meanCoNum = 0.0;
if (mesh.nInternalFaces())
{
scalarField sumPhi =
fvc::surfaceSum(mag(phi))().internalField();
scalarField sumPhi
(
fvc::surfaceSum(mag(phi))().internalField()
);
CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
......
......@@ -30,7 +30,7 @@ Description
\*---------------------------------------------------------------------------*/
{
volScalarField contErr = fvc::div(phi);
volScalarField contErr(fvc::div(phi));
scalar sumLocalContErr = runTime.deltaTValue()*
mag(contErr)().weightedAverage(mesh.V()).value();
......
......@@ -120,8 +120,10 @@ void Foam::movingWallVelocityFvPatchVectorField::updateCoeffs()
const vectorField Up((pp.faceCentres() - oldFc)/mesh.time().deltaTValue());
const volVectorField& U = db().lookupObject<volVectorField>(UName_);
scalarField phip =
p.patchField<surfaceScalarField, scalar>(fvc::meshPhi(U));
scalarField phip
(
p.patchField<surfaceScalarField, scalar>(fvc::meshPhi(U))
);
const vectorField n(p.nf());
const scalarField& magSf = p.magSf();
......
......@@ -382,7 +382,7 @@ CoEulerDdtScheme<Type>::fvmDdt
fvMatrix<Type>& fvm = tfvm();
scalarField rDeltaT = CorDeltaT()().internalField();
scalarField rDeltaT(CorDeltaT()().internalField());
fvm.diag() = rDeltaT*mesh().V();
......@@ -417,7 +417,7 @@ CoEulerDdtScheme<Type>::fvmDdt
);
fvMatrix<Type>& fvm = tfvm();
scalarField rDeltaT = CorDeltaT()().internalField();
scalarField rDeltaT(CorDeltaT()().internalField());
fvm.diag() = rDeltaT*rho.value()*mesh().V();
......@@ -454,7 +454,7 @@ CoEulerDdtScheme<Type>::fvmDdt
);
fvMatrix<Type>& fvm = tfvm();
scalarField rDeltaT = CorDeltaT()().internalField();
scalarField rDeltaT(CorDeltaT()().internalField());
fvm.diag() = rDeltaT*rho.internalField()*mesh().V();
......
......@@ -385,7 +385,7 @@ SLTSDdtScheme<Type>::fvmDdt
fvMatrix<Type>& fvm = tfvm();
scalarField rDeltaT = SLrDeltaT()().internalField();
scalarField rDeltaT(SLrDeltaT()().internalField());
Info<< "max/min rDeltaT " << max(rDeltaT) << " " << min(rDeltaT) << endl;
......@@ -422,7 +422,7 @@ SLTSDdtScheme<Type>::fvmDdt
);
fvMatrix<Type>& fvm = tfvm();
scalarField rDeltaT = SLrDeltaT()().internalField();
scalarField rDeltaT(SLrDeltaT()().internalField());
fvm.diag() = rDeltaT*rho.value()*mesh().V();
......@@ -459,7 +459,7 @@ SLTSDdtScheme<Type>::fvmDdt
);
fvMatrix<Type>& fvm = tfvm();
scalarField rDeltaT = SLrDeltaT()().internalField();
scalarField rDeltaT(SLrDeltaT()().internalField());
fvm.diag() = rDeltaT*rho.internalField()*mesh().V();
......
......@@ -71,9 +71,9 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve
psi.name()
);
scalarField saveDiag = diag();
scalarField saveDiag(diag());
Field<Type> source = source_;
Field<Type> source(source_);
// At this point include the boundary source from the coupled boundaries.
// This is corrected for the implict part by updateMatrixInterfaces within
......@@ -227,7 +227,7 @@ Foam::tmp<Foam::Field<Type> > Foam::fvMatrix<Type>::residual() const
// Loop over field components
for (direction cmpt=0; cmpt<Type::nComponents; cmpt++)
{
scalarField psiCmpt = psi_.internalField().component(cmpt);
scalarField psiCmpt(psi_.internalField().component(cmpt));
scalarField boundaryDiagCmpt(psi_.size(), 0.0);
addBoundaryDiag(boundaryDiagCmpt, cmpt);
......
......@@ -66,7 +66,7 @@ Foam::fvMatrix<Foam::scalar>::solver
<< endl;
}
scalarField saveDiag = diag();
scalarField saveDiag(diag());
addBoundaryDiag(diag(), 0);
autoPtr<fvMatrix<scalar>::fvSolver> solverPtr
......@@ -102,10 +102,10 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Foam::scalar>::fvSolver::solve
const_cast<GeometricField<scalar, fvPatchField, volMesh>&>
(fvMat_.psi());
scalarField saveDiag = fvMat_.diag();
scalarField saveDiag(fvMat_.diag());
fvMat_.addBoundaryDiag(fvMat_.diag(), 0);
scalarField totalSource = fvMat_.source();
scalarField totalSource(fvMat_.source());
fvMat_.addBoundarySource(totalSource, false);
// assign new solver controls
......@@ -145,10 +145,10 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Foam::scalar>::solve
GeometricField<scalar, fvPatchField, volMesh>& psi =
const_cast<GeometricField<scalar, fvPatchField, volMesh>&>(psi_);
scalarField saveDiag = diag();
scalarField saveDiag(diag());
addBoundaryDiag(diag(), 0);
scalarField totalSource = source_;
scalarField totalSource(source_);
addBoundarySource(totalSource, false);
// Solver call
......
......@@ -169,8 +169,10 @@ updateCoeffs()
ray.Qr().boundaryField()[patchI] += Iw*(n & ray.dAve());
const scalarField Eb =
dom.blackBody().bLambda(lambdaId).boundaryField()[patchI];
const scalarField Eb
(
dom.blackBody().bLambda(lambdaId).boundaryField()[patchI]
);
forAll(Iw, faceI)
{
......
......@@ -75,7 +75,7 @@ Smagorinsky2::Smagorinsky2
tmp<volSymmTensorField> Smagorinsky2::B() const
{
volSymmTensorField D = dev(symm(fvc::grad(U())));
volSymmTensorField D(dev(symm(fvc::grad(U()))));
return (((2.0/3.0)*I)*k() - 2.0*nuSgs_*D - (2.0*cD2_)*delta()*(D&D));
}
......@@ -86,7 +86,7 @@ tmp<fvVectorMatrix> Smagorinsky2::divDevBeff
volVectorField& U
) const
{
volTensorField gradU = fvc::grad(U);
volTensorField gradU(fvc::grad(U));
volSymmTensorField aniNuEff
(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment