OpenFOAM libraries: Updated to use the new const-safe tmp

This commit is contained in:
Henry Weller
2016-02-26 08:13:59 +00:00
parent e1405f2260
commit f4ba71ddd0
163 changed files with 346 additions and 346 deletions

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \

View File

@ -83,7 +83,7 @@ Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::getFieldValues
(
new Field<Type>(faces.size(), pTraits<Type>::zero)
);
Field<Type>& avg = tavg();
Field<Type>& avg = tavg.ref();
forAll(faces, faceI)
{
@ -355,7 +355,7 @@ Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::filterField
) const
{
tmp<Field<Type>> tvalues(new Field<Type>(faceId_.size()));
Field<Type>& values = tvalues();
Field<Type>& values = tvalues.ref();
forAll(values, i)
{
@ -396,7 +396,7 @@ Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::filterField
) const
{
tmp<Field<Type>> tvalues(new Field<Type>(faceId_.size()));
Field<Type>& values = tvalues();
Field<Type>& values = tvalues.ref();
forAll(values, i)
{

View File

@ -216,7 +216,7 @@ Foam::tmp<Foam::scalarField> Foam::regionSizeDistribution::divide
)
{
tmp<scalarField> tresult(new scalarField(num.size()));
scalarField& result = tresult();
scalarField& result = tresult.ref();
forAll(denom, i)
{

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/DSMC/lnInclude \
-I$(LIB_SRC)/transportModels \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -148,7 +148,7 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::pDyn
{
const volVectorField& U = obr_.lookupObject<volVectorField>(UName_);
tpDyn() == rho(p)*0.5*magSqr(U);
tpDyn.ref() == rho(p)*0.5*magSqr(U);
}
return tpDyn;
@ -164,13 +164,13 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::convertToCoeff
if (calcCoeff_)
{
tCoeff() -= dimensionedScalar("pInf", dimPressure, pInf_);
tCoeff.ref() -= dimensionedScalar("pInf", dimPressure, pInf_);
const dimensionedScalar p0("p0", dimPressure, SMALL);
const dimensionedVector U("U", dimVelocity, UInf_);
const dimensionedScalar rho("rho", dimDensity, rhoInf_);
tCoeff() /= 0.5*rho*magSqr(U) + p0;
tCoeff.ref() /= 0.5*rho*magSqr(U) + p0;
}
return tCoeff;