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

COMP: avoid ambiguous construct from tmp - lagrangian

parent cc8ad42a
......@@ -120,14 +120,17 @@ inline Foam::pointField Foam::vectorTensorTransform::transform
const pointField& pts
) const
{
tmp<pointField> tfld;
if (hasR_)
{
return t() + (R() & pts);
tfld = t() + (R() & pts);
}
else
{
return t() + pts;
tfld = t() + pts;
}
return tfld();
}
......@@ -152,14 +155,17 @@ inline Foam::pointField Foam::vectorTensorTransform::invTransform
const pointField& pts
) const
{
tmp<pointField> tfld;
if (hasR_)
{
return (R().T() & (pts - t()));
tfld = (R().T() & (pts - t()));
}
else
{
return pts - t();
tfld = pts - t();
}
return tfld();
}
......
......@@ -103,9 +103,9 @@ if ((xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL))
pMax().U() = (momMax + (1.0-newMinMass/mMin)*momMin)/newMaxMass;
// update the liquid molar fractions
scalarField Ymin = spray_.fuels().Y(pMin().X());
scalarField Ymax = spray_.fuels().Y(pMax().X());
scalarField Ynew = mMax*Ymax + (mMin - newMinMass)*Ymin;
scalarField Ymin(spray_.fuels().Y(pMin().X()));
scalarField Ymax(spray_.fuels().Y(pMax().X()));
scalarField Ynew(mMax*Ymax + (mMin - newMinMass)*Ymin);
scalar Wlinv = 0.0;
forAll(Ynew, i)
{
......
......@@ -139,9 +139,9 @@ if (vAlign > 0)
(momMax + (1.0-newMinMass/mMin)*momMin)/newMaxMass;
// update the liquid molar fractions
scalarField Ymin = spray_.fuels().Y(pMin().X());
scalarField Ymax = spray_.fuels().Y(pMax().X());
scalarField Ynew = mMax*Ymax + (mMin - newMinMass)*Ymin;
scalarField Ymin(spray_.fuels().Y(pMin().X()));
scalarField Ymax(spray_.fuels().Y(pMax().X()));
scalarField Ynew(mMax*Ymax + (mMin - newMinMass)*Ymin);
scalar Wlinv = 0.0;
forAll(Ynew, i)
{
......
......@@ -70,7 +70,7 @@ void Foam::gradientDispersionRAS::disperseParcels() const
scalar dt = spray_.runTime().deltaTValue();
const volScalarField& k = turbulence().k();
volVectorField gradk = fvc::grad(k);
const volVectorField gradk(fvc::grad(k));
const volScalarField& epsilon = turbulence().epsilon();
const volVectorField& U = spray_.U();
......
......@@ -71,7 +71,7 @@ void Foam::stochasticDispersionRAS::disperseParcels() const
scalar dt = spray_.runTime().deltaTValue();
const volScalarField& k = turbulence().k();
//volVectorField gradk = fvc::grad(k);
// volVectorField gradk(fvc::grad(k));
const volScalarField& epsilon = turbulence().epsilon();
const volVectorField& U = spray_.U();
......
......@@ -352,8 +352,9 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed
scalar mass
) const
{
return
tmp<scalarField> tfld =
2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(pi*mass));
return tfld();
}
......@@ -375,7 +376,9 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed
scalar mass
) const
{
return sqrt(3.0*physicoChemical::k.value()*temperature/mass);
tmp<scalarField> tfld =
sqrt(3.0*physicoChemical::k.value()*temperature/mass);
return tfld();
}
......@@ -399,7 +402,9 @@ Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed
scalar mass
) const
{
return sqrt(2.0*physicoChemical::k.value()*temperature/mass);
tmp<scalarField> tfld =
sqrt(2.0*physicoChemical::k.value()*temperature/mass);
return tfld();
}
......
......@@ -188,9 +188,11 @@ void Foam::FreeStream<CloudType>::inflow()
// negated), dividing by the most probable speed to form
// molecularSpeedRatio * cosTheta
scalarField sCosTheta =
scalarField sCosTheta
(
(boundaryU[patchI] & -patch.faceAreas()/mag(patch.faceAreas()))
/mostProbableSpeed;
/ mostProbableSpeed
);
// From Bird eqn 4.22
......
......@@ -137,7 +137,7 @@ Foam::ThermoCloud<ParcelType>::Sh(volScalarField& hs) const
{
if (this->solution().semiImplicit("hs"))
{
const volScalarField Cp = thermo_.thermo().Cp();
const volScalarField Cp(thermo_.thermo().Cp());
return
hsTrans()/(this->mesh().V()*this->db().time().deltaT())
......
......@@ -357,9 +357,9 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
// Update component mass fractions
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scalarField dMassGas = dMassDV + dMassSRGas;
scalarField dMassLiquid = dMassPC + dMassSRLiquid;
scalarField dMassSolid = dMassSRSolid;
scalarField dMassGas(dMassDV + dMassSRGas);
scalarField dMassLiquid(dMassPC + dMassSRLiquid);
scalarField dMassSolid(dMassSRSolid);
scalar mass1 =
updateMassFractions(mass0, dMassGas, dMassLiquid, dMassSolid);
......
......@@ -286,9 +286,9 @@ Foam::Ostream& Foam::operator<<
const ReactingMultiphaseParcel<ParcelType>& p
)
{
scalarField YGasLoc = p.YGas()*p.Y()[0];
scalarField YLiquidLoc = p.YLiquid()*p.Y()[1];
scalarField YSolidLoc = p.YSolid()*p.Y()[2];
scalarField YGasLoc(p.YGas()*p.Y()[0]);
scalarField YLiquidLoc(p.YLiquid()*p.Y()[1]);
scalarField YSolidLoc(p.YSolid()*p.Y()[2]);
if (os.format() == IOstream::ASCII)
{
os << static_cast<const ReactingParcel<ParcelType>&>(p)
......
......@@ -33,7 +33,7 @@ License
#define createKinematicParcelTypes(ParcelType) \
\
defineTemplateTypeNameAndDebug(ParcelType, 0); \
defineTypeNameAndDebug(ParcelType, 0); \
defineTemplateTypeNameAndDebug(Particle<ParcelType>, 0); \
defineTemplateTypeNameAndDebug(Cloud<ParcelType>, 0); \
\
......
......@@ -322,7 +322,8 @@ Foam::scalarField Foam::CompositionModel<CloudType>::X
}
}
return X/WInv;
tmp<scalarField> tfld = X/WInv;
return tfld();
}
......
......@@ -149,7 +149,7 @@ void Foam::LiquidEvaporation<CloudType>::calculate
) const
{
// construct carrier phase species volume fractions for cell, cellI
const scalarField Xc = calcXc(cellI);
const scalarField Xc(calcXc(cellI));
// droplet surface area
const scalar A = pi*sqr(d);
......
......@@ -72,7 +72,7 @@ protected:
scalar Sh(const scalar Re, const scalar Sc) const;
//- Calculate the carrier phase component volume fractions at cellI
scalarField calcXc(const label cellI) const;
tmp<scalarField> calcXc(const label cellI) const;
public:
......
Supports Markdown
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