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 2666f87663
commit 49c54e9070
163 changed files with 346 additions and 346 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,6 +39,7 @@ Description
#include "mapPolyMesh.H"
#include "polyTopoChange.H"
#include "fvcDiv.H"
#include "zeroGradientFvPatchFields.H"
#include "Random.H"
using namespace Foam;

View File

@ -609,7 +609,7 @@ template<class Type>
Foam::tmp<Foam::Field<Type>> Foam::Field<Type>::T() const
{
tmp<Field<Type>> transpose(new Field<Type>(this->size()));
::Foam::T(transpose(), *this);
::Foam::T(transpose.ref(), *this);
return transpose;
}

View File

@ -92,7 +92,7 @@ Foam::tmp<GeoField> Foam::uniformInterpolate
// Interpolate
tmp<GeoField> tfld(new GeoField(fieldIO, weights[0]*field0));
GeoField& fld = tfld();
GeoField& fld = tfld.ref();
for (label i = 1; i < times.size(); ++i)
{

View File

@ -192,7 +192,7 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate
)
);
Field<Type>& result = tresult();
Field<Type>& result = tresult.ref();
const labelListList& pointFaces = patch_.pointFaces();
const scalarListList& weights = faceToPointWeights();
@ -249,7 +249,7 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate
)
);
Field<Type>& result = tresult();
Field<Type>& result = tresult.ref();
const List<typename Patch::FaceType>& localFaces = patch_.localFaces();
@ -303,7 +303,7 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate
new Field<Type>(patch_.nEdges(), pTraits<Type>::zero)
);
Field<Type>& result = tresult();
Field<Type>& result = tresult.ref();
const edgeList& edges = patch_.edges();
const labelListList& edgeFaces = patch_.edgeFaces();

View File

@ -159,7 +159,7 @@ Foam::PatchTools::pointNormals
// to avoid them being stored)
tmp<pointField> textrudeN(new pointField(p.nPoints(), vector::zero));
pointField& extrudeN = textrudeN();
pointField& extrudeN = textrudeN.ref();
{
const faceList& localFaces = p.localFaces();
const vectorField& faceNormals = p.faceNormals();
@ -213,7 +213,7 @@ Foam::PatchTools::edgeNormals
// 1. Start off with local normals
tmp<pointField> tedgeNormals(new pointField(p.nEdges(), vector::zero));
pointField& edgeNormals = tedgeNormals();
pointField& edgeNormals = tedgeNormals.ref();
{
const labelListList& edgeFaces = p.edgeFaces();
const vectorField& faceNormals = p.faceNormals();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -161,7 +161,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
)
);
volScalarField& pc = tPc();
volScalarField& pc = tPc.ref();
tmp<volScalarField> tomegaFuel
(
@ -185,7 +185,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
)
);
volScalarField& omegaFuelBar = tomegaFuel();
volScalarField& omegaFuelBar = tomegaFuel.ref();
// Calculation of the mixture fraction variance (ftVar)
const compressible::LESModel& lesModel =
@ -311,7 +311,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
)
);
volScalarField& products = tproducts();
volScalarField& products = tproducts.ref();
forAll(productsIndex, j)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -102,7 +102,7 @@ Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma
)
);
volScalarField& omega0 = tomega0();
volScalarField& omega0 = tomega0.ref();
volScalarField::InternalField& iomega0 = omega0.internalField();

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \

View File

@ -119,7 +119,7 @@ Foam::combustionModels::laminar<Type>::R(volScalarField& Y) const
{
tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
fvScalarMatrix& Su = tSu();
fvScalarMatrix& Su = tSu.ref();
if (this->active())
{
@ -157,7 +157,7 @@ Foam::combustionModels::laminar<Type>::dQ() const
if (this->active())
{
tdQ() = this->chemistryPtr_->dQ();
tdQ.ref() = this->chemistryPtr_->dQ();
}
return tdQ;
@ -188,7 +188,7 @@ Foam::combustionModels::laminar<Type>::Sh() const
if (this->active())
{
tSh() = this->chemistryPtr_->Sh();
tSh.ref() = this->chemistryPtr_->Sh();
}
return tSh;

View File

@ -160,7 +160,7 @@ singleStepCombustion<CombThermoType, ThermoType>::dQ() const
if (this->active())
{
volScalarField& dQ = tdQ();
volScalarField& dQ = tdQ.ref();
dQ.dimensionedInternalField() = this->mesh().V()*Sh()();
}
return tdQ;

View File

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

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \

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)/triSurface/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ Foam::tmp<Foam::vectorField> Foam::layerAdditionRemoval::extrusionDir() const
const labelList& mp = masterFaceLayer.meshPoints();
tmp<vectorField> textrusionDir(new vectorField(mp.size()));
vectorField& extrusionDir = textrusionDir();
vectorField& extrusionDir = textrusionDir.ref();
if (setLayerPairing())
{

View File

@ -119,7 +119,7 @@ Foam::tmp<Foam::scalarField> Foam::motionSmootherAlgo::calcEdgeWeights
const edgeList& edges = mesh_.edges();
tmp<scalarField> twght(new scalarField(edges.size()));
scalarField& wght = twght();
scalarField& wght = twght.ref();
forAll(edges, edgeI)
{
@ -815,7 +815,7 @@ Foam::tmp<Foam::pointField> Foam::motionSmootherAlgo::curPoints() const
tmp<pointField> tnewPoints(oldPoints_ + totalDisplacement.internalField());
// Correct for 2-D motion
modifyMotionPoints(tnewPoints());
modifyMotionPoints(tnewPoints.ref());
return tnewPoints;
}

View File

@ -159,7 +159,7 @@ Foam::motionSmootherAlgo::avg
dimensioned<Type>("zero", fld.dimensions(), pTraits<Type>::zero)
)
);
GeometricField<Type, pointPatchField, pointMesh>& res = tres();
GeometricField<Type, pointPatchField, pointMesh>& res = tres.ref();
const polyMesh& mesh = fld.mesh()();

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)/dynamicMesh/lnInclude \

View File

@ -70,7 +70,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce
)
);
volFieldType& result = tresult();
volFieldType& result = tresult.ref();
const labelUList& own = mesh.owner();
const labelUList& nbr = mesh.neighbour();
@ -103,6 +103,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce
tvf(cellReduce(cop, tssf));
tssf.clear();
return tvf;
}

View File

@ -56,7 +56,7 @@ curl
tmp<GeometricField<Type, fvPatchField, volMesh>> tcurlVf =
2.0*(*skew(fvc::grad(vf, nameCurlVf)));
tcurlVf().rename(nameCurlVf);
tcurlVf.ref().rename(nameCurlVf);
return tcurlVf;
}

View File

@ -78,7 +78,7 @@ reconstruct
)
);
treconField().correctBoundaryConditions();
treconField.ref().correctBoundaryConditions();
return treconField;
}

View File

@ -693,7 +693,7 @@ template<class Type>
Foam::tmp<Foam::scalarField> Foam::fvMatrix<Type>::D() const
{
tmp<scalarField> tdiag(new scalarField(diag()));
addCmptAvBoundaryDiag(tdiag());
addCmptAvBoundaryDiag(tdiag.ref());
return tdiag;
}
@ -713,7 +713,7 @@ Foam::tmp<Foam::Field<Type>> Foam::fvMatrix<Type>::DD() const
(
lduAddr().patchAddr(patchI),
internalCoeffs_[patchI],
tdiag()
tdiag.ref()
);
}
}

View File

@ -100,7 +100,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate
patchFields
)
);
GeometricField<Type, fvPatchField, volMesh>& resF = tresF();
GeometricField<Type, fvPatchField, volMesh>& resF = tresF.ref();
// 2. Change the fvPatchFields to the correct type using a mapper
@ -243,7 +243,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate
patchFields
)
);
GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF();
GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF.ref();
// 2. Change the fvsPatchFields to the correct type using a mapper

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)/OpenFOAM/lnInclude

View File

@ -440,7 +440,7 @@ Foam::tmp<Foam::labelField> Foam::pairPatchAgglomeration::agglomerateOneLevel
const label nFineFaces = patch.size();
tmp<labelField> tcoarseCellMap(new labelField(nFineFaces, -1));
labelField& coarseCellMap = tcoarseCellMap();
labelField& coarseCellMap = tcoarseCellMap.ref();
const labelListList& faceFaces = patch.faceFaces();

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -188,8 +188,9 @@ Foam::displacementComponentLaplacianFvMotionSolver::curPoints() const
else
{
tmp<pointField> tcurPoints(new pointField(fvMesh_.points()));
pointField& curPoints = tcurPoints.ref();
tcurPoints().replace
curPoints.replace
(
cmpt_,
points0_ + pointDisplacement_.internalField()
@ -204,11 +205,11 @@ Foam::displacementComponentLaplacianFvMotionSolver::curPoints() const
{
label pointI = pz[i];
tcurPoints()[pointI][cmpt_] = points0_[pointI];
curPoints[pointI][cmpt_] = points0_[pointI];
}
}
twoDCorrectPoints(tcurPoints());
twoDCorrectPoints(curPoints);
return tcurPoints;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -101,14 +101,14 @@ Foam::velocityComponentLaplacianFvMotionSolver::curPoints() const
tmp<pointField> tcurPoints(new pointField(fvMesh_.points()));
tcurPoints().replace
tcurPoints.ref().replace
(
cmpt_,
tcurPoints().component(cmpt_)
+ fvMesh_.time().deltaTValue()*pointMotionU_.internalField()
);
twoDCorrectPoints(tcurPoints());
twoDCorrectPoints(tcurPoints.ref());
return tcurPoints;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,7 +108,7 @@ Foam::displacementSBRStressFvMotionSolver::curPoints() const
points0() + pointDisplacement().internalField()
);
twoDCorrectPoints(tcurPoints());
twoDCorrectPoints(tcurPoints.ref());
return tcurPoints;
}

View File

@ -313,7 +313,7 @@ Foam::displacementInterpolationMotionSolver::curPoints() const
}
tmp<pointField> tcurPoints(new pointField(points0()));
pointField& curPoints = tcurPoints();
pointField& curPoints = tcurPoints.ref();
// Interpolate the displacement of the face zones.
vectorField zoneDisp(displacements_.size(), vector::zero);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -200,6 +200,7 @@ Foam::displacementLaplacianFvMotionSolver::curPoints() const
(
points0() + pointDisplacement_.internalField()
);
pointField& curPoints = tcurPoints.ref();
// Implement frozen points
if (frozenPointsZone_ != -1)
@ -208,11 +209,11 @@ Foam::displacementLaplacianFvMotionSolver::curPoints() const
forAll(pz, i)
{
tcurPoints()[pz[i]] = points0()[pz[i]];
curPoints[pz[i]] = points0()[pz[i]];
}
}
twoDCorrectPoints(tcurPoints());
twoDCorrectPoints(curPoints);
return tcurPoints;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -223,7 +223,7 @@ Foam::displacementLayeredMotionMotionSolver::faceZoneEvaluate
) const
{
tmp<vectorField> tfld(new vectorField(meshPoints.size()));
vectorField& fld = tfld();
vectorField& fld = tfld.ref();
const word type(dict.lookup("type"));

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -103,7 +103,7 @@ Foam::velocityLaplacianFvMotionSolver::curPoints() const
+ fvMesh_.time().deltaTValue()*pointMotionU_.internalField()
);
twoDCorrectPoints(tcurPoints());
twoDCorrectPoints(tcurPoints.ref());
return tcurPoints;
}

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)/sampling/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -186,7 +186,7 @@ void Foam::fv::rotorDiskSource::writeField
)
);
Field<Type>& field = tfield().internalField();
Field<Type>& field = tfield.ref().internalField();
if (cells_.size() != values.size())
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -260,7 +260,7 @@ Foam::tmp<Foam::scalarField> Foam::targetCoeffTrim::thetag() const
const List<vector>& x = rotor_.x();
tmp<scalarField> ttheta(new scalarField(x.size()));
scalarField& t = ttheta();
scalarField& t = ttheta.ref();
forAll(t, i)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -194,7 +194,7 @@ void Foam::fv::interRegionHeatTransferModel::addSup
)
);
volScalarField& Tmapped = tTmapped();
volScalarField& Tmapped = tTmapped.ref();
const fvMesh& nbrMesh = mesh_.time().lookupObject<fvMesh>(nbrRegionName_);

View File

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

View File

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

View File

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

View File

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

View File

@ -47,7 +47,7 @@ Foam::coalCloudList::UTrans() const
)
);
DimensionedField<vector, volMesh>& fld = tfld();
DimensionedField<vector, volMesh>& fld = tfld.ref();
forAll(*this, i)
{
@ -64,7 +64,7 @@ Foam::tmp<Foam::fvVectorMatrix> Foam::coalCloudList::SU
) const
{
tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dimForce));
fvVectorMatrix& fvm = tfvm();
fvVectorMatrix& fvm = tfvm.ref();
forAll(*this, i)
{
@ -95,7 +95,7 @@ Foam::coalCloudList::hsTrans() const
)
);
DimensionedField<scalar, volMesh>& fld = tfld();
DimensionedField<scalar, volMesh>& fld = tfld.ref();
forAll(*this, i)
{
@ -112,7 +112,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::Sh
) const
{
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(hs, dimEnergy/dimTime));
fvScalarMatrix& fvm = tfvm();
fvScalarMatrix& fvm = tfvm.ref();
forAll(*this, i)
{
@ -130,7 +130,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::SYi
) const
{
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(Yi, dimMass/dimTime));
fvScalarMatrix& fvm = tfvm();
fvScalarMatrix& fvm = tfvm.ref();
forAll(*this, i)
{
@ -161,7 +161,7 @@ Foam::coalCloudList::rhoTrans() const
)
);
DimensionedField<scalar, volMesh>& fld = tfld();
DimensionedField<scalar, volMesh>& fld = tfld.ref();
forAll(*this, i)
{
@ -197,7 +197,7 @@ Foam::coalCloudList::Srho() const
)
);
DimensionedField<scalar, volMesh>& fld = tfld();
DimensionedField<scalar, volMesh>& fld = tfld.ref();
forAll(*this, i)
{
@ -231,7 +231,7 @@ Foam::coalCloudList::Srho
)
);
DimensionedField<scalar, volMesh>& fld = tfld();
DimensionedField<scalar, volMesh>& fld = tfld.ref();
forAll(*this, j)
{
@ -248,7 +248,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::coalCloudList::Srho
) const
{
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(rho, dimMass/dimTime));
fvScalarMatrix& fvm = tfvm();
fvScalarMatrix& fvm = tfvm.ref();
forAll(*this, i)
{

View File

@ -0,0 +1 @@
EXE_INC = -DCONST_TMP

View File

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

View File

@ -439,7 +439,7 @@ Foam::KinematicCloud<CloudType>::SU(volVectorField& U) const
else
{
tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dimForce));
fvVectorMatrix& fvm = tfvm();
fvVectorMatrix& fvm = tfvm.ref();
fvm.source() = -UTrans()/(this->db().time().deltaT());
@ -474,7 +474,7 @@ Foam::KinematicCloud<CloudType>::vDotSweep() const
)
);
volScalarField& vDotSweep = tvDotSweep();
volScalarField& vDotSweep = tvDotSweep.ref();
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
{
const parcelType& p = iter();
@ -513,7 +513,7 @@ Foam::KinematicCloud<CloudType>::theta() const
)
);
volScalarField& theta = ttheta();
volScalarField& theta = ttheta.ref();
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
{
const parcelType& p = iter();
@ -551,7 +551,7 @@ Foam::KinematicCloud<CloudType>::alpha() const
)
);
scalarField& alpha = talpha().internalField();
scalarField& alpha = talpha.ref().internalField();
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
{
const parcelType& p = iter();
@ -588,7 +588,7 @@ Foam::KinematicCloud<CloudType>::rhoEff() const
)
);
scalarField& rhoEff = trhoEff().internalField();
scalarField& rhoEff = trhoEff.ref().internalField();
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
{
const parcelType& p = iter();

View File

@ -127,7 +127,7 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
)
);
volScalarField& sourceField = trhoTrans();
volScalarField& sourceField = trhoTrans.ref();
sourceField.internalField() =
rhoTrans_[i]/(this->db().time().deltaTValue()*this->mesh().V());
@ -141,7 +141,7 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
else
{
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(Yi, dimMass/dimTime));
fvScalarMatrix& fvm = tfvm();
fvScalarMatrix& fvm = tfvm.ref();
fvm.source() = -rhoTrans_[i]/this->db().time().deltaTValue();
@ -182,7 +182,7 @@ Foam::ReactingCloud<CloudType>::Srho(const label i) const
if (this->solution().coupled())
{
scalarField& rhoi = tRhoi();
scalarField& rhoi = tRhoi.ref();
rhoi = rhoTrans_[i]/(this->db().time().deltaTValue()*this->mesh().V());
}
@ -219,7 +219,7 @@ Foam::ReactingCloud<CloudType>::Srho() const
if (this->solution().coupled())
{
scalarField& sourceField = trhoTrans();
scalarField& sourceField = trhoTrans.ref();
forAll(rhoTrans_, i)
{
sourceField += rhoTrans_[i];
@ -256,7 +256,7 @@ Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const
)
);
scalarField& sourceField = trhoTrans();
scalarField& sourceField = trhoTrans.ref();
if (this->solution().semiImplicit("rho"))
{
@ -272,7 +272,7 @@ Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const
else
{
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(rho, dimMass/dimTime));
fvScalarMatrix& fvm = tfvm();
fvScalarMatrix& fvm = tfvm.ref();
forAll(rhoTrans_, i)
{

View File

@ -247,7 +247,7 @@ Foam::ThermoCloud<CloudType>::Sh(volScalarField& hs) const
else
{
tmp<fvScalarMatrix> tfvm(new fvScalarMatrix(hs, dimEnergy/dimTime));
fvScalarMatrix& fvm = tfvm();
fvScalarMatrix& fvm = tfvm.ref();
fvm.source() = -hsTrans()/(this->db().time().deltaT());
@ -282,7 +282,7 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::Ep() const
if (radiation_)
{
scalarField& Ep = tEp().internalField();
scalarField& Ep = tEp.ref().internalField();
const scalar dt = this->db().time().deltaTValue();
const scalarField& V = this->mesh().V();
const scalar epsilon = constProps_.epsilon0();
@ -318,7 +318,7 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::ap() const
if (radiation_)
{
scalarField& ap = tap().internalField();
scalarField& ap = tap.ref().internalField();
const scalar dt = this->db().time().deltaTValue();
const scalarField& V = this->mesh().V();
const scalar epsilon = constProps_.epsilon0();
@ -355,7 +355,7 @@ Foam::ThermoCloud<CloudType>::sigmap() const
if (radiation_)
{
scalarField& sigmap = tsigmap().internalField();
scalarField& sigmap = tsigmap.ref().internalField();
const scalar dt = this->db().time().deltaTValue();
const scalarField& V = this->mesh().V();
const scalar epsilon = constProps_.epsilon0();

View File

@ -267,14 +267,14 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store)
if (applyGravity_)
{
phiCorrect_() -= phiGByA();
phiCorrect_.ref() -= phiGByA();
}
forAll(phiCorrect_(), faceI)
{
// Current and correction fluxes
const scalar phiCurr = phi[faceI];
scalar& phiCorr = phiCorrect_()[faceI];
scalar& phiCorr = phiCorrect_.ref()[faceI];
// Don't limit if the correction is in the opposite direction to
// the flux. We need all the help we can get in this state.
@ -296,7 +296,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store)
if (applyGravity_)
{
phiCorrect_() += phiGByA();
phiCorrect_.ref() += phiGByA();
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,7 +95,7 @@ Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const
mesh_.objectRegistry::lookupObject<thermoCloud>(cloudNames_[i])
);
ta() += tc.ap();
ta.ref() += tc.ap();
}
return ta;
@ -155,7 +155,7 @@ Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const
mesh_.objectRegistry::lookupObject<thermoCloud>(cloudNames_[i])
);
tE() += tc.Ep();
tE.ref() += tc.Ep();
}
// Total emission is 4 times the projected emission

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,7 +95,7 @@ Foam::radiation::cloudScatter::sigmaEff() const
mesh_.objectRegistry::lookupObject<thermoCloud>(cloudNames_[i])
);
tsigma() += tc.sigmap();
tsigma.ref() += tc.sigmap();
}
return 3.0*tsigma;

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 \
@ -11,4 +11,3 @@ LIB_LIBS = \
-llagrangian \
-lpotential \
-lmolecularMeasurements

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

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

View File

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

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \

View File

@ -112,7 +112,7 @@ Foam::tmp<Foam::scalarField> Foam::autoLayerDriver::avgPointData
)
{
tmp<scalarField> tfaceFld(new scalarField(pp.size(), 0.0));
scalarField& faceFld = tfaceFld();
scalarField& faceFld = tfaceFld.ref();
forAll(pp.localFaces(), faceI)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -514,7 +514,7 @@ Foam::tmp<Foam::scalarField> Foam::autoSnapDriver::edgePatchDist
// Copy edge values into scalarField
tmp<scalarField> tedgeDist(new scalarField(mesh.nEdges()));
scalarField& edgeDist = tedgeDist();
scalarField& edgeDist = tedgeDist.ref();
forAll(allEdgeInfo, edgeI)
{
@ -874,7 +874,7 @@ Foam::tmp<Foam::pointField> Foam::autoSnapDriver::avgCellCentres
(
new pointField(pointFaces.size(), vector::zero)
);
pointField& avgBoundary = tavgBoundary();
pointField& avgBoundary = tavgBoundary.ref();
labelList nBoundary(pointFaces.size(), 0);
forAll(pointFaces, pointI)

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -184,7 +184,7 @@ Foam::cyclicACMIGAMGInterface::internalFieldTransfer
const labelUList& nbrFaceCells = nbr.faceCells();
tmp<labelField> tpnf(new labelField(nbrFaceCells.size()));
labelField& pnf = tpnf();
labelField& pnf = tpnf.ref();
forAll(pnf, facei)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -183,7 +183,7 @@ Foam::tmp<Foam::labelField> Foam::cyclicAMIGAMGInterface::internalFieldTransfer
const labelUList& nbrFaceCells = nbr.faceCells();
tmp<labelField> tpnf(new labelField(nbrFaceCells.size()));
labelField& pnf = tpnf();
labelField& pnf = tpnf.ref();
forAll(pnf, facei)
{

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/fileFormats/lnInclude

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,7 +47,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const
)
);
scalarField& result = tresult();
scalarField& result = tresult.ref();
scalarField sumArea(mesh_.nCells(), 0.0);
@ -108,7 +108,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const
mesh_.nCells(), 0.0
)
);
scalarField& result = tresult();
scalarField& result = tresult.ref();
scalarField sumArea(mesh_.nCells(), 0.0);
@ -187,7 +187,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const
mesh_.nFaces(), 0.0
)
);
scalarField& result = tresult();
scalarField& result = tresult.ref();
const vectorField& centres = mesh_.cellCentres();
@ -247,7 +247,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const
mesh_.nFaces(), 0.0
)
);
scalarField& result = tresult();
scalarField& result = tresult.ref();
const vectorField& cellCtrs = mesh_.cellCentres();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -128,7 +128,7 @@ transformVector
) const
{
tmp<symmTensorField> tfld(new symmTensorField(st.size()));
symmTensorField& fld = tfld();
symmTensorField& fld = tfld.ref();
forAll(fld, i)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -129,7 +129,7 @@ transformVector
) const
{
tmp<symmTensorField> tfld(new symmTensorField(st.size()));
symmTensorField& fld = tfld();
symmTensorField& fld = tfld.ref();
forAll(fld, i)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -232,7 +232,7 @@ Foam::tmp<Foam::symmTensorField> Foam::axesRotation::transformVector
) const
{
tmp<symmTensorField> tfld(new symmTensorField(st.size()));
symmTensorField& fld = tfld();
symmTensorField& fld = tfld.ref();
forAll(fld, i)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -304,7 +304,7 @@ Foam::tmp<Foam::tensorField> Foam::cylindrical::transformTensor
const tensorField& R = Rptr_();
const tensorField Rtr(R.T());
tmp<tensorField> tt(new tensorField(cellMap.size()));
tensorField& t = tt();
tensorField& t = tt.ref();
forAll(cellMap, i)
{
const label cellI = cellMap[i];
@ -328,7 +328,7 @@ Foam::tmp<Foam::symmTensorField> Foam::cylindrical::transformVector
}
tmp<symmTensorField> tfld(new symmTensorField(Rptr_->size()));
symmTensorField& fld = tfld();
symmTensorField& fld = tfld.ref();
const tensorField& R = Rptr_();
forAll(fld, i)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -208,7 +208,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindricalCS::globalToLocal
);
tmp<vectorField> tresult(new vectorField(lc.size()));
vectorField& result = tresult();
vectorField& result = tresult.ref();
result.replace
(

View File

@ -99,7 +99,7 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::facePoints
// Initialise to face-centre
tmp<pointField> tfacePoints(new pointField(patch_.size()));
pointField& facePoints = tfacePoints();
pointField& facePoints = tfacePoints.ref();
forAll(pp, faceI)
{
@ -867,7 +867,7 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::readListOrField
)
{
tmp<pointField> tfld(new pointField());
pointField& fld = tfld();
pointField& fld = tfld.ref();
if (size)
{
@ -1267,7 +1267,7 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::samplePoints
) const
{
tmp<pointField> tfld(new pointField(fc));
pointField& fld = tfld();
pointField& fld = tfld.ref();
switch (offsetMode_)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -306,7 +306,7 @@ Foam::tmp<Foam::tensorField> Foam::momentOfInertia::meshInertia
{
tmp<tensorField> tTf = tmp<tensorField>(new tensorField(mesh.nCells()));
tensorField& tf = tTf();
tensorField& tf = tTf.ref();
forAll(tf, cI)
{

View File

@ -223,7 +223,7 @@ const Foam::wordList& Foam::searchableBox::regions() const
Foam::tmp<Foam::pointField> Foam::searchableBox::coordinates() const
{
tmp<pointField> tCtrs = tmp<pointField>(new pointField(6));
pointField& ctrs = tCtrs();
pointField& ctrs = tCtrs.ref();
const pointField pts(treeBoundBox::points());
const faceList& fcs = treeBoundBox::faces;

View File

@ -30,10 +30,8 @@ License
namespace Foam
{
defineTypeNameAndDebug(searchableCylinder, 0);
addToRunTimeSelectionTable(searchableSurface, searchableCylinder, dict);
defineTypeNameAndDebug(searchableCylinder, 0);
addToRunTimeSelectionTable(searchableSurface, searchableCylinder, dict);
}
@ -67,7 +65,7 @@ void Foam::searchableCylinder::boundingSpheres
Foam::tmp<Foam::pointField> Foam::searchableCylinder::points() const
{
tmp<pointField> tPts(new pointField(2));
pointField& pts = tPts();
pointField& pts = tPts.ref();
pts[0] = point1_;
pts[1] = point2_;

View File

@ -298,7 +298,7 @@ void Foam::searchablePlate::boundingSpheres
Foam::tmp<Foam::pointField> Foam::searchablePlate::points() const
{
tmp<pointField> tPts(new pointField(4));
pointField& pts = tPts();
pointField& pts = tPts.ref();
pts[0] = origin_;
pts[2] = origin_ + span_;

View File

@ -325,7 +325,7 @@ Foam::tmp<Foam::pointField>
Foam::searchableSurfaceCollection::coordinates() const
{
tmp<pointField> tCtrs = tmp<pointField>(new pointField(size()));
pointField& ctrs = tCtrs();
pointField& ctrs = tCtrs.ref();
// Append individual coordinates
label coordI = 0;
@ -400,7 +400,7 @@ Foam::searchableSurfaceCollection::points() const
}
tmp<pointField> tPts(new pointField(nPoints));
pointField& pts = tPts();
pointField& pts = tPts.ref();
// Append individual coordinates
nPoints = 0;

View File

@ -382,7 +382,7 @@ void Foam::triSurfaceMesh::clearOut()
Foam::tmp<Foam::pointField> Foam::triSurfaceMesh::coordinates() const
{
tmp<pointField> tPts(new pointField(8));
pointField& pt = tPts();
pointField& pt = tPts.ref();
// Use copy to calculate face centres so they don't get stored
pt = PrimitivePatch<triSurface::FaceType, SubList, const pointField&>

View File

@ -197,7 +197,7 @@ void Foam::pointToPointPlanarInterpolation::calcWeights
(
referenceCS_.localPosition(sourcePoints)
);
vectorField& localVertices = tlocalVertices();
vectorField& localVertices = tlocalVertices.ref();
const boundBox bb(localVertices, true);
const point bbMid(bb.midpoint());

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;

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -191,7 +191,7 @@ tmp<complexField> fft::forwardTransform
{
tmp<complexField> tfftField(new complexField(tfield));
transform(tfftField(), nn, FORWARD_TRANSFORM);
transform(tfftField.ref(), nn, FORWARD_TRANSFORM);
tfield.clear();
@ -207,7 +207,7 @@ tmp<complexField> fft::reverseTransform
{
tmp<complexField> tifftField(new complexField(tfield));
transform(tifftField(), nn, REVERSE_TRANSFORM);
transform(tifftField.ref(), nn, REVERSE_TRANSFORM);
tfield.clear();
@ -231,7 +231,7 @@ tmp<complexVectorField> fft::forwardTransform
for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
{
tfftVectorField().replace
tfftVectorField.ref().replace
(
cmpt,
forwardTransform(tfield().component(cmpt), nn)
@ -260,7 +260,7 @@ tmp<complexVectorField> fft::reverseTransform
for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
{
tifftVectorField().replace
tifftVectorField.ref().replace
(
cmpt,
reverseTransform(tfield().component(cmpt), nn)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -140,7 +140,7 @@ Foam::tmp<Foam::scalarField> Foam::noiseFFT::window
}
tmp<scalarField> tpw(new scalarField(N));
scalarField& pw = tpw();
scalarField& pw = tpw.ref();
label offset = ni*windowOffset;
@ -193,7 +193,7 @@ Foam::tmp<Foam::scalarField> Foam::noiseFFT::Pf
scalarField::subField(tPn2(), tPn2().size()/2)
)
);
scalarField& Pn = tPn();
scalarField& Pn = tPn.ref();
Pn *= 2.0/sqrt(scalar(tPn2().size()));
Pn[0] /= 2.0;

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \

View File

@ -190,7 +190,7 @@ weights() const
const scalarField nbrAlphaDelta(nbrAlpha/nbrDeltas);
tmp<scalarField> tw(new scalarField(deltas.size()));
scalarField& w = tw();
scalarField& w = tw.ref();
forAll(alphaDelta, faceI)
{

View File

@ -196,7 +196,6 @@ void reactingOneDim::updatePhiGas()
}
}
}
tHsiGas().clear();
}
}

View File

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

View File

@ -183,7 +183,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh
)
{
tmp<labelField> tcellMoveMap(new labelField(regionMesh().nCells(), 0));
labelField& cellMoveMap = tcellMoveMap();
labelField& cellMoveMap = tcellMoveMap.ref();
if (!moveMesh_)
{

View File

@ -1,4 +1,4 @@
EXE_INC = \
EXE_INC = -DCONST_TMP \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau
) const
{
tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0));
scalarField& uTau = tuTau();
scalarField& uTau = tuTau.ref();
typedef regionModels::surfaceFilmModels::surfaceFilmModel modelType;

View File

@ -299,13 +299,13 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum
+ fvm::div(phi_, U_)
==
- USp_
// - fvm::SuSp(rhoSp_, U_)
// - fvm::SuSp(rhoSp_, U_)
- rhoSp_*U_
+ forces_.correct(U_)
+ turbulence_->Su(U_)
);
fvVectorMatrix& UEqn = tUEqn();
fvVectorMatrix& UEqn = tUEqn.ref();
UEqn.relax();

View File

@ -249,7 +249,7 @@ inline tmp<volScalarField> kinematicSingleLayer::gNormClipped() const
)
);
volScalarField& gNormClipped = tgNormClipped();
volScalarField& gNormClipped = tgNormClipped.ref();
gNormClipped.min(0.0);
return tgNormClipped;

View File

@ -275,8 +275,8 @@ tmp<volScalarField> constantFilmThermo::rho() const
)
);
trho().internalField() = this->rho(0, 0);
trho().correctBoundaryConditions();
trho.ref().internalField() = this->rho(0, 0);
trho.ref().correctBoundaryConditions();
return trho;
}
@ -302,8 +302,8 @@ tmp<volScalarField> constantFilmThermo::mu() const
)
);
tmu().internalField() = this->mu(0, 0);
tmu().correctBoundaryConditions();
tmu.ref().internalField() = this->mu(0, 0);
tmu.ref().correctBoundaryConditions();
return tmu;
}
@ -329,8 +329,8 @@ tmp<volScalarField> constantFilmThermo::sigma() const
)
);
tsigma().internalField() = this->sigma(0, 0);
tsigma().correctBoundaryConditions();
tsigma.ref().internalField() = this->sigma(0, 0);
tsigma.ref().correctBoundaryConditions();
return tsigma;
}
@ -356,8 +356,8 @@ tmp<volScalarField> constantFilmThermo::Cp() const
)
);
tCp().internalField() = this->Cp(0, 0);
tCp().correctBoundaryConditions();
tCp.ref().internalField() = this->Cp(0, 0);
tCp.ref().correctBoundaryConditions();
return tCp;
}
@ -383,8 +383,8 @@ tmp<volScalarField> constantFilmThermo::kappa() const
)
);
tkappa().internalField() = this->kappa(0, 0);
tkappa().correctBoundaryConditions();
tkappa.ref().internalField() = this->kappa(0, 0);
tkappa.ref().correctBoundaryConditions();
return tkappa;
}

View File

@ -255,7 +255,7 @@ tmp<volScalarField> liquidFilmThermo::rho() const
)
);
scalarField& rho = trho().internalField();
scalarField& rho = trho.ref().internalField();
if (useReferenceValues_)
{
@ -277,7 +277,7 @@ tmp<volScalarField> liquidFilmThermo::rho() const
}
}
trho().correctBoundaryConditions();
trho.ref().correctBoundaryConditions();
return trho;
}
@ -303,7 +303,7 @@ tmp<volScalarField> liquidFilmThermo::mu() const
)
);
scalarField& mu = tmu().internalField();
scalarField& mu = tmu.ref().internalField();
if (useReferenceValues_)
{
@ -325,7 +325,7 @@ tmp<volScalarField> liquidFilmThermo::mu() const
}
}
tmu().correctBoundaryConditions();
tmu.ref().correctBoundaryConditions();
return tmu;
}
@ -351,7 +351,7 @@ tmp<volScalarField> liquidFilmThermo::sigma() const
)
);
scalarField& sigma = tsigma().internalField();
scalarField& sigma = tsigma.ref().internalField();
if (useReferenceValues_)
{
@ -373,7 +373,7 @@ tmp<volScalarField> liquidFilmThermo::sigma() const
}
}
tsigma().correctBoundaryConditions();
tsigma.ref().correctBoundaryConditions();
return tsigma;
}
@ -399,7 +399,7 @@ tmp<volScalarField> liquidFilmThermo::Cp() const
)
);
scalarField& Cp = tCp().internalField();
scalarField& Cp = tCp.ref().internalField();
if (useReferenceValues_)
{
@ -421,7 +421,7 @@ tmp<volScalarField> liquidFilmThermo::Cp() const
}
}
tCp().correctBoundaryConditions();
tCp.ref().correctBoundaryConditions();
return tCp;
}
@ -447,7 +447,7 @@ tmp<volScalarField> liquidFilmThermo::kappa() const
)
);
scalarField& kappa = tkappa().internalField();
scalarField& kappa = tkappa.ref().internalField();
if (useReferenceValues_)
{
@ -469,7 +469,7 @@ tmp<volScalarField> liquidFilmThermo::kappa() const
}
}
tkappa().correctBoundaryConditions();
tkappa.ref().correctBoundaryConditions();
return tkappa;
}

View File

@ -89,8 +89,8 @@ tmp<volVectorField> laminar::Us() const
);
// apply quadratic profile
tUs() = Foam::sqrt(2.0)*owner_.U();
tUs().correctBoundaryConditions();
tUs.ref() = Foam::sqrt(2.0)*owner_.U();
tUs.ref().correctBoundaryConditions();
return tUs;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -153,7 +153,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
)
);
vectorField& force = tForce().internalField();
vectorField& force = tForce.ref().internalField();
const labelUList& own = owner_.regionMesh().owner();
const labelUList& nbr = owner_.regionMesh().neighbour();
@ -229,7 +229,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
tmp<fvVectorMatrix>
tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
tfvm() += tForce;
tfvm.ref() += tForce;
return tfvm;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,7 +81,7 @@ tmp<fvVectorMatrix> forceList::correct(volVectorField& U)
(
new fvVectorMatrix(U, dimForce/dimArea*dimVolume)
);
fvVectorMatrix& result = tResult();
fvVectorMatrix& result = tResult.ref();
forAll(*this, i)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,7 +68,7 @@ tmp<fvVectorMatrix> thermocapillaryForce::correct(volVectorField& U)
tmp<fvVectorMatrix>
tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume));
tfvm() += fvc::grad(sigma);
tfvm.ref() += fvc::grad(sigma);
return tfvm;
}

View File

@ -78,7 +78,7 @@ tmp<volScalarField> curvatureSeparation::calcInvR1
);
scalarField& invR1 = tinvR1().internalField();
scalarField& invR1 = tinvR1.ref().internalField();
// apply defined patch radii
const scalar rMin = 1e-6;

View File

@ -124,7 +124,7 @@ tmp<volScalarField> constantRadiation::Shs()
if ((time >= timeStart_) && (time <= timeStart_ + duration_))
{
scalarField& Shs = tShs();
scalarField& Shs = tShs.ref();
const scalarField& Qr = QrConst_.internalField();
const scalarField& alpha = owner_.alpha().internalField();

Some files were not shown because too many files have changed in this diff Show More