Commit 8961e44d authored by graham's avatar graham
Browse files

COMP: clang caught ambiguous constructions from tmp.

parent 34080f13
...@@ -109,11 +109,13 @@ Foam::combustionModels::infinitelyFastChemistry::R(volScalarField& Y) const ...@@ -109,11 +109,13 @@ Foam::combustionModels::infinitelyFastChemistry::R(volScalarField& Y) const
const label fNorm = singleMixture_.specieProd()[specieI]; const label fNorm = singleMixture_.specieProd()[specieI];
const volScalarField fres = singleMixture_.fres(specieI); const volScalarField fres(singleMixture_.fres(specieI));
const volScalarField wSpecie = const volScalarField wSpecie
(
wFuelNorm_*singleMixture_.specieStoichCoeffs()[specieI] wFuelNorm_*singleMixture_.specieStoichCoeffs()[specieI]
/ max(fNorm*(Y - fres), scalar(0.001)); / max(fNorm*(Y - fres), scalar(0.001))
);
return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y); return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y);
} }
......
...@@ -134,9 +134,9 @@ void Foam::directMappedFlowRateFvPatchVectorField::updateCoeffs() ...@@ -134,9 +134,9 @@ void Foam::directMappedFlowRateFvPatchVectorField::updateCoeffs()
const surfaceScalarField& phiName = const surfaceScalarField& phiName =
db().lookupObject<surfaceScalarField>(phiName_); db().lookupObject<surfaceScalarField>(phiName_);
scalarField U = -phi/patch().magSf(); scalarField U(-phi/patch().magSf());
vectorField n = patch().nf(); vectorField n(patch().nf());
if (phiName.dimensions() == dimVelocity*dimArea) if (phiName.dimensions() == dimVelocity*dimArea)
{ {
......
...@@ -648,7 +648,7 @@ Foam::scalarField Foam::autoSnapDriver::calcSnapDistance ...@@ -648,7 +648,7 @@ Foam::scalarField Foam::autoSnapDriver::calcSnapDistance
-GREAT // null value -GREAT // null value
); );
return snapParams.snapTol()*maxEdgeLen; return scalarField(snapParams.snapTol()*maxEdgeLen);
} }
......
...@@ -773,7 +773,7 @@ void Foam::autoSnapDriver::determineAllFeatures ...@@ -773,7 +773,7 @@ void Foam::autoSnapDriver::determineAllFeatures
labelList nearPointFeat; labelList nearPointFeat;
labelList nearPointIndex; labelList nearPointIndex;
{ {
scalarField snapDistSqr = sqr(snapDist); scalarField snapDistSqr(sqr(snapDist));
features.findNearestEdge features.findNearestEdge
( (
pp.localPoints(), pp.localPoints(),
......
...@@ -133,8 +133,8 @@ void reactingOneDim::updatePhiGas() ...@@ -133,8 +133,8 @@ void reactingOneDim::updatePhiGas()
const volScalarField& HsiGas = tHsiGas(); const volScalarField& HsiGas = tHsiGas();
const volScalarField& RRiGas = tRRiGas(); const volScalarField& RRiGas = tRRiGas();
const surfaceScalarField HsiGasf = fvc::interpolate(HsiGas); const surfaceScalarField HsiGasf(fvc::interpolate(HsiGas));
const surfaceScalarField RRiGasf = fvc::interpolate(RRiGas); const surfaceScalarField RRiGasf(fvc::interpolate(RRiGas));
forAll(intCoupledPatchIDs_, i) forAll(intCoupledPatchIDs_, i)
{ {
...@@ -185,7 +185,7 @@ void reactingOneDim::updateMesh(const scalarField& mass0) ...@@ -185,7 +185,7 @@ void reactingOneDim::updateMesh(const scalarField& mass0)
return; return;
} }
const scalarField newV = mass0/rho_; const scalarField newV(mass0/rho_);
Info<< "Initial/final volumes = " << gSum(regionMesh().V()) << ", " Info<< "Initial/final volumes = " << gSum(regionMesh().V()) << ", "
<< gSum(newV) << " [m3]" << endl; << gSum(newV) << " [m3]" << endl;
...@@ -227,7 +227,7 @@ void reactingOneDim::solveSpeciesMass() ...@@ -227,7 +227,7 @@ void reactingOneDim::solveSpeciesMass()
Info<< "reactingOneDim::solveSpeciesMass()" << endl; Info<< "reactingOneDim::solveSpeciesMass()" << endl;
} }
volScalarField Yt = 0.0*Ys_[0]; volScalarField Yt(0.0*Ys_[0]);
for (label i=0; i<Ys_.size()-1; i++) for (label i=0; i<Ys_.size()-1; i++)
{ {
...@@ -242,8 +242,10 @@ void reactingOneDim::solveSpeciesMass() ...@@ -242,8 +242,10 @@ void reactingOneDim::solveSpeciesMass()
if (moveMesh_) if (moveMesh_)
{ {
surfaceScalarField phiRhoMesh = surfaceScalarField phiRhoMesh
fvc::interpolate(Yi*rho_)*regionMesh().phi(); (
fvc::interpolate(Yi*rho_)*regionMesh().phi()
);
YiEqn -= fvc::div(phiRhoMesh); YiEqn -= fvc::div(phiRhoMesh);
} }
...@@ -264,11 +266,11 @@ void reactingOneDim::solveEnergy() ...@@ -264,11 +266,11 @@ void reactingOneDim::solveEnergy()
Info<< "reactingOneDim::solveEnergy()" << endl; Info<< "reactingOneDim::solveEnergy()" << endl;
} }
const volScalarField rhoCp = rho_*solidThermo_.Cp(); const volScalarField rhoCp(rho_*solidThermo_.Cp());
const surfaceScalarField phiQr = fvc::interpolate(Qr_)*nMagSf(); const surfaceScalarField phiQr(fvc::interpolate(Qr_)*nMagSf());
const surfaceScalarField phiGas = fvc::interpolate(phiHsGas_); const surfaceScalarField phiGas(fvc::interpolate(phiHsGas_));
fvScalarMatrix TEqn fvScalarMatrix TEqn
( (
...@@ -282,8 +284,10 @@ void reactingOneDim::solveEnergy() ...@@ -282,8 +284,10 @@ void reactingOneDim::solveEnergy()
if (moveMesh_) if (moveMesh_)
{ {
surfaceScalarField phiMesh = surfaceScalarField phiMesh
fvc::interpolate(rhoCp*T_)*regionMesh().phi(); (
fvc::interpolate(rhoCp*T_)*regionMesh().phi()
);
TEqn -= fvc::div(phiMesh); TEqn -= fvc::div(phiMesh);
} }
...@@ -456,10 +460,12 @@ scalar reactingOneDim::solidRegionDiffNo() const ...@@ -456,10 +460,12 @@ scalar reactingOneDim::solidRegionDiffNo() const
scalar meanDiNum = 0.0; scalar meanDiNum = 0.0;
if (regionMesh().nInternalFaces() > 0) if (regionMesh().nInternalFaces() > 0)
{ {
surfaceScalarField KrhoCpbyDelta = surfaceScalarField KrhoCpbyDelta
(
regionMesh().surfaceInterpolation::deltaCoeffs() regionMesh().surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(K_) * fvc::interpolate(K_)
/ fvc::interpolate(Cp()*rho_); / fvc::interpolate(Cp()*rho_)
);
DiNum = max(KrhoCpbyDelta.internalField())*time_.deltaTValue(); DiNum = max(KrhoCpbyDelta.internalField())*time_.deltaTValue();
......
...@@ -199,7 +199,7 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs() ...@@ -199,7 +199,7 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs()
<< exit(FatalError); << exit(FatalError);
} }
const scalarField UAvePyr = -phiPyr/patch().magSf(); const scalarField UAvePyr(-phiPyr/patch().magSf());
const vectorField& nf = patch().nf(); const vectorField& nf = patch().nf();
forAll(deltaFilm, i) forAll(deltaFilm, i)
......
...@@ -76,7 +76,7 @@ void Foam::csvSetWriter<Type>::write ...@@ -76,7 +76,7 @@ void Foam::csvSetWriter<Type>::write
columns[i] = valueSets[i]; columns[i] = valueSets[i];
} }
writeTable(points, columns, os); this->writeTable(points, columns, os);
} }
...@@ -110,7 +110,7 @@ void Foam::csvSetWriter<Type>::write ...@@ -110,7 +110,7 @@ void Foam::csvSetWriter<Type>::write
columns[i] = &valueSets[i][trackI]; columns[i] = &valueSets[i][trackI];
} }
writeTable(points[trackI], columns, os); this->writeTable(points[trackI], columns, os);
os << nl << nl; os << nl << nl;
} }
} }
......
...@@ -230,7 +230,7 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs() ...@@ -230,7 +230,7 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
const scalarField Cpw(model.thermo().Cp(Ti, patchI)); const scalarField Cpw(model.thermo().Cp(Ti, patchI));
scalarField myh = patch().deltaCoeffs()*alphaw*Cpw; scalarField myh(patch().deltaCoeffs()*alphaw*Cpw);
scalarField alphawCp(alphaw*Cpw); scalarField alphawCp(alphaw*Cpw);
...@@ -265,15 +265,16 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs() ...@@ -265,15 +265,16 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
scalarField nbrTi(nbrField.patchInternalField()); scalarField nbrTi(nbrField.patchInternalField());
mpp.map().distribute(nbrTi); mpp.map().distribute(nbrTi);
const scalarField nbrCpw = model.thermo().Cp const scalarField nbrCpw
( (
nbrField.patchInternalField(), model.thermo().Cp(nbrField.patchInternalField(), nbrPatchI)
nbrPatchI
); );
scalarField nbrh = scalarField nbrh
(
nbrPatch.deltaCoeffs()*nbrCpw nbrPatch.deltaCoeffs()*nbrCpw
*model.alphaEff()().boundaryField()[nbrPatchI]; *model.alphaEff()().boundaryField()[nbrPatchI]
);
mpp.map().distribute(nbrh); mpp.map().distribute(nbrh);
...@@ -290,8 +291,11 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs() ...@@ -290,8 +291,11 @@ void temperatureThermoBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
KDeltaw[i] = solid_().K((Tp[i] + nbrTp[i])/2.0)/thickness_[i]; KDeltaw[i] = solid_().K((Tp[i] + nbrTp[i])/2.0)/thickness_[i];
} }
const scalarField q = const scalarField q
(Ti() - nbrTi)/(1.0/KDeltaw + 1.0/nbrh + 1.0/myh); (
(Ti() - nbrTi)/(1.0/KDeltaw + 1.0/nbrh + 1.0/myh)
);
forAll(qDot, i) forAll(qDot, i)
{ {
......
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