From cd852be3da95f867689570ee8b04ff48a50659c7 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 26 Feb 2016 17:31:28 +0000 Subject: [PATCH] OpenFOAM: Updated all libraries, solvers and utilities to use the new const-safe tmp The deprecated non-const tmp functionality is now on the compiler switch NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC in the Make/options file. However, it is recommended to upgrade all code to the new safer tmp by using the '.ref()' member function rather than the non-const '()' dereference operator when non-const access to the temporary object is required. Please report any problems on Mantis. Henry G. Weller CFD Direct. --- .../XiGModels/basicXiSubG/basicXiSubG.C | 2 +- .../PDRModels/dragModels/basic/basic.C | 4 +- .../turbulence/PDRkEpsilon/PDRkEpsilon.C | 6 +-- .../XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C | 4 +- .../XiModels/XiEqModels/XiEqModel/XiEqModel.C | 2 +- .../SCOPE/SCOPELaminarFlameSpeed.C | 8 +-- .../solvers/combustion/reactingFoam/UEqn.H | 9 ++-- .../solvers/combustion/reactingFoam/pEqn.H | 6 +-- .../solvers/combustion/reactingFoam/pcEqn.H | 8 +-- .../reactingFoam/rhoReactingFoam/pEqn.H | 4 +- .../combustion/reactingFoam/setRDeltaT.H | 4 +- .../rhoCentralFoam/directionInterpolate.H | 2 +- .../compressible/rhoCentralFoam/setRDeltaT.H | 2 +- .../solvers/compressible/rhoPimpleFoam/UEqn.H | 9 ++-- .../solvers/compressible/rhoPimpleFoam/pEqn.H | 6 +-- .../compressible/rhoPimpleFoam/pcEqn.H | 8 +-- .../rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H | 6 +-- .../compressible/rhoPimpleFoam/setRDeltaT.H | 2 +- .../solvers/compressible/rhoSimpleFoam/UEqn.H | 9 ++-- .../solvers/compressible/rhoSimpleFoam/pEqn.H | 6 +-- .../compressible/rhoSimpleFoam/pcEqn.H | 8 +-- .../rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H | 25 ++++----- .../rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H | 16 +++--- .../buoyantBoussinesqSimpleFoam/UEqn.H | 9 ++-- .../buoyantBoussinesqSimpleFoam/pEqn.H | 6 +-- .../heatTransfer/buoyantSimpleFoam/UEqn.H | 9 ++-- .../heatTransfer/buoyantSimpleFoam/pEqn.H | 6 +-- .../chtMultiRegionSimpleFoam/fluid/UEqn.H | 9 ++-- .../chtMultiRegionSimpleFoam/fluid/pEqn.H | 6 +-- .../chtMultiRegionFoam/fluid/UEqn.H | 9 ++-- .../chtMultiRegionFoam/fluid/pEqn.H | 4 +- .../chtMultiRegionFoam/solid/solveSolid.H | 8 +-- .../adjointShapeOptimizationFoam.C | 30 ++++++----- .../pimpleFoam/SRFPimpleFoam/UrelEqn.H | 9 ++-- .../pimpleFoam/SRFPimpleFoam/pEqn.H | 8 +-- .../solvers/incompressible/pimpleFoam/UEqn.H | 9 ++-- .../solvers/incompressible/pimpleFoam/pEqn.H | 8 +-- .../pimpleFoam/pimpleDyMFoam/pEqn.H | 8 +-- .../simpleFoam/SRFSimpleFoam/UrelEqn.H | 9 ++-- .../simpleFoam/SRFSimpleFoam/pEqn.H | 8 +-- .../solvers/incompressible/simpleFoam/UEqn.H | 9 ++-- .../solvers/incompressible/simpleFoam/pEqn.H | 8 +-- .../simpleFoam/porousSimpleFoam/UEqn.H | 25 ++++----- .../simpleFoam/porousSimpleFoam/pEqn.H | 16 +++--- .../DPMFoam/DPMTurbulenceModels/Make/options | 2 +- .../lagrangian/coalChemistryFoam/setRDeltaT.H | 4 +- .../reactingParcelFoam/setRDeltaT.H | 4 +- .../simpleReactingParcelFoam/UEqn.H | 9 ++-- .../simpleReactingParcelFoam/pEqn.H | 6 +-- .../solvers/lagrangian/sprayFoam/UEqn.H | 9 ++-- .../solvers/lagrangian/sprayFoam/pEqn.H | 6 +-- .../lagrangian/sprayFoam/sprayDyMFoam/pEqn.H | 6 +-- .../compressibleInterDyMFoam/pEqn.H | 8 +-- .../multiphase/compressibleInterFoam/pEqn.H | 8 +-- .../multiphaseMixtureThermo.C | 54 ++++++++++--------- .../compressibleMultiphaseInterFoam/pEqn.H | 2 +- .../multiphase/driftFluxFoam/alphaEqn.H | 4 +- .../solvers/multiphase/interFoam/alphaEqn.H | 7 +-- .../solvers/multiphase/interFoam/setRDeltaT.H | 2 +- .../interPhaseChangeFoam/alphaEqn.H | 10 ++-- .../multiphaseSystem/multiphaseSystem.C | 30 ++++++----- .../multiphaseMixture/multiphaseMixture.C | 21 +++++--- .../potentialFreeSurfaceFoam/UEqn.H | 9 ++-- .../potentialFreeSurfaceFoam/pEqn.H | 6 +-- .../potentialFreeSurfaceDyMFoam/pEqn.H | 6 +-- .../InterfaceCompositionModel.C | 6 +-- .../saturationModels/polynomial/polynomial.C | 4 +- .../wallLubricationModel.C | 2 +- .../BlendedInterfacialModel.C | 48 ++++++++--------- .../HeatAndMassTransferPhaseSystem.C | 2 +- .../AnisothermalPhaseModel.C | 6 +-- .../phaseSystems/phaseSystem/phaseSystem.C | 8 +-- .../reactingMultiphaseEulerFoam/EEqns.H | 2 +- .../Make/options | 2 +- .../multiphaseSystem/multiphaseSystem.C | 6 +-- .../reactingMultiphaseEulerFoam/pU/pEqn.H | 2 +- .../reactingMultiphaseEulerFoam/setRDeltaT.H | 2 +- .../reactingTwoPhaseEulerFoam/EEqns.H | 4 +- .../reactingTwoPhaseEulerFoam/pU/pEqn.H | 12 ++--- .../reactingTwoPhaseEulerFoam/pUf/pEqn.H | 12 ++--- .../reactingTwoPhaseEulerFoam/setRDeltaT.H | 2 +- .../Make/options | 2 +- ...allBoilingWallFunctionFvPatchScalarField.C | 4 +- .../twoPhaseSystem/twoPhaseSystem.C | 4 +- .../multiphase/twoPhaseEulerFoam/pU/pEqn.H | 8 +-- .../multiphase/twoPhaseEulerFoam/pUf/pEqn.H | 8 +-- .../Make/options | 2 +- .../BlendedInterfacialModel.C | 40 +++++++------- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 2 +- .../DelaunayMeshToolsTemplates.C | 4 +- .../cellShapeControlMesh.C | 4 +- .../smoothAlignmentSolver.C | 4 +- .../automatic/automatic.C | 4 +- .../fieldFromFile/fieldFromFile.C | 4 +- .../searchableBoxFeatures.C | 4 +- .../manipulation/renumberMesh/renumberMesh.C | 4 +- .../splitMeshRegions/splitMeshRegions.C | 4 +- .../foamToEnsight/ensightField.C | 6 +-- .../foamToVTK/surfaceMeshWriterTemplates.C | 2 +- .../dataConversion/foamToVTK/vtkMesh.H | 4 +- .../applyBoundaryLayer/applyBoundaryLayer.C | 8 +-- .../surfaceLambdaMuSmooth.C | 4 +- src/OpenFOAM/Make/options | 2 +- .../DimensionedFieldFunctions.C | 20 +++---- src/OpenFOAM/memory/tmp/tmp.H | 2 +- src/OpenFOAM/memory/tmp/tmpI.H | 2 +- .../compressible/Make/options | 2 +- .../incompressible/Make/options | 2 +- .../turbulenceModels/Make/options | 2 +- src/combustionModels/Make/options | 2 +- src/conversion/Make/options | 2 +- src/dynamicFvMesh/Make/options | 2 +- src/dynamicMesh/Make/options | 2 +- src/engine/Make/options | 2 +- src/finiteVolume/Make/options | 2 +- src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C | 6 +-- .../fvMatrices/fvMatrix/fvMatrix.C | 2 +- .../fvMeshSubset/fvMeshSubsetInterpolate.C | 2 +- .../singleCellFvMeshInterpolate.C | 2 +- .../pairPatchAgglomeration/Make/options | 2 +- src/fvMotionSolver/Make/options | 2 +- src/fvOptions/Make/options | 2 +- src/genericPatchFields/Make/options | 2 +- src/lagrangian/DSMC/Make/options | 2 +- src/lagrangian/basic/Make/options | 2 +- src/lagrangian/coalCombustion/Make/options | 2 +- .../distributionModels/Make/options | 2 +- src/lagrangian/intermediate/Make/options | 2 +- .../molecularDynamics/molecule/Make/options | 2 +- src/lagrangian/solidParticle/Make/options | 2 +- src/lagrangian/spray/Make/options | 2 +- src/lagrangian/turbulence/Make/options | 2 +- src/mesh/autoMesh/Make/options | 2 +- src/mesh/blockMesh/Make/options | 2 +- src/mesh/extrudeModel/Make/options | 2 +- src/meshTools/Make/options | 2 +- .../fvFieldDecomposerDecomposeFields.C | 4 +- .../reconstruct/reconstructLagrangianFields.C | 4 +- .../functionObjects/field/Make/options | 2 +- .../functionObjects/utilities/Make/options | 2 +- src/randomProcesses/Make/options | 2 +- src/regionCoupled/Make/options | 2 +- src/regionModels/regionModel/Make/options | 2 +- .../surfaceFilmModels/Make/options | 2 +- src/sampling/Make/options | 2 +- src/sixDoFRigidBodyMotion/Make/options | 2 +- src/surfMesh/Make/options | 2 +- .../SLGThermo/Make/options | 2 +- .../Make/options | 2 +- src/thermophysicalModels/basic/Make/options | 2 +- .../chemistryModel/Make/options | 2 +- .../laminarFlameSpeed/Make/options | 2 +- .../liquidMixtureProperties/Make/options | 2 +- .../properties/liquidProperties/Make/options | 2 +- .../solidMixtureProperties/Make/options | 2 +- .../properties/solidProperties/Make/options | 2 +- .../radiation/Make/options | 2 +- .../reactionThermo/Make/options | 2 +- .../solidChemistryModel/Make/options | 2 +- .../solidSpecie/Make/options | 2 +- .../solidThermo/Make/options | 2 +- src/topoChangerFvMesh/Make/options | 2 +- src/transportModels/compressible/Make/options | 2 +- .../Make/options | 2 +- .../incompressible/Make/options | 2 +- .../interfaceProperties/Make/options | 2 +- .../twoPhaseMixture/Make/options | 2 +- .../twoPhaseProperties/Make/options | 2 +- src/triSurface/Make/options | 2 +- 169 files changed, 511 insertions(+), 477 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index fe96d0bfe7..45050a171b 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C @@ -70,7 +70,7 @@ Foam::tmp Foam::XiGModels::basicSubGrid::G() const const volScalarField& Lobs = db.lookupObject("Lobs"); tmp tGtot = XiGModel_->G(); - volScalarField& Gtot = tGtot(); + volScalarField& Gtot = tGtot.ref(); const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0); scalarField N(Nv.internalField()*Cw); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 7454b2f7ee..0de82a82e4 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -113,7 +113,7 @@ Foam::tmp Foam::PDRDragModels::basic::Dcu() const ) ); - volSymmTensorField& DragDcu = tDragDcu(); + volSymmTensorField& DragDcu = tDragDcu.ref(); if (on_) { @@ -147,7 +147,7 @@ Foam::tmp Foam::PDRDragModels::basic::Gk() const ) ); - volScalarField& Gk = tGk(); + volScalarField& Gk = tGk.ref(); if (on_) { diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index ebc92684a4..afe97f7f7f 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -161,9 +161,9 @@ void PDRkEpsilon::correct() - fvm::Sp(C2_*betav*rho_*epsilon_/k_, epsilon_) ); - epsEqn().relax(); + epsEqn.ref().relax(); - epsEqn().boundaryManipulate(epsilon_.boundaryField()); + epsEqn.ref().boundaryManipulate(epsilon_.boundaryField()); solve(epsEqn); bound(epsilon_, epsilonMin_); @@ -182,7 +182,7 @@ void PDRkEpsilon::correct() - fvm::Sp(betav*rho_*epsilon_/k_, k_) ); - kEqn().relax(); + kEqn.ref().relax(); solve(kEqn); bound(k_, kMin_); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index ad8452f5a4..0208818ee0 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -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::tmp Foam::XiEqModels::SCOPEXiEq::XiEq() const dimensionedScalar("XiEq", dimless, 0.0) ) ); - volScalarField& xieq = tXiEq(); + volScalarField& xieq = tXiEq.ref(); forAll(xieq, celli) { diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 59f5c81bd3..a84aca3210 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -113,7 +113,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const dimensionedScalar("zero", Nv.dimensions(), 0.0) ) ); - volScalarField& N = tN(); + volScalarField& N = tN.ref(); N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0); volSymmTensorField ns diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index d4d7782287..fd07b0b3cb 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -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 @@ -259,7 +259,7 @@ Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi ) ); - volScalarField& Su0 = tSu0(); + volScalarField& Su0 = tSu0.ref(); forAll(Su0, celli) { @@ -306,7 +306,7 @@ Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi ) ); - volScalarField& Su0 = tSu0(); + volScalarField& Su0 = tSu0.ref(); forAll(Su0, celli) { @@ -358,7 +358,7 @@ Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Ma ) ); - volScalarField& ma = tMa(); + volScalarField& ma = tMa.ref(); forAll(ma, celli) { diff --git a/applications/solvers/combustion/reactingFoam/UEqn.H b/applications/solvers/combustion/reactingFoam/UEqn.H index 907c9934e2..e4caa1cea4 100644 --- a/applications/solvers/combustion/reactingFoam/UEqn.H +++ b/applications/solvers/combustion/reactingFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); -tmp UEqn +tmp tUEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + MRF.DDt(rho, U) @@ -10,14 +10,15 @@ tmp UEqn == fvOptions(rho, U) ); +fvVectorMatrix& UEqn = tUEqn.ref(); -UEqn().relax(); +UEqn.relax(); -fvOptions.constrain(UEqn()); +fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { - solve(UEqn() == -fvc::grad(p)); + solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); K = 0.5*magSqr(U); diff --git a/applications/solvers/combustion/reactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/pEqn.H index ae5478c5b6..f5b7141224 100644 --- a/applications/solvers/combustion/reactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/pEqn.H @@ -3,13 +3,13 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rAU(1.0/UEqn().A()); +volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } if (pimple.transonic()) diff --git a/applications/solvers/combustion/reactingFoam/pcEqn.H b/applications/solvers/combustion/reactingFoam/pcEqn.H index 8bef07a5bb..bf8eb899af 100644 --- a/applications/solvers/combustion/reactingFoam/pcEqn.H +++ b/applications/solvers/combustion/reactingFoam/pcEqn.H @@ -3,13 +3,13 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rAU(1.0/UEqn().A()); -volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volScalarField rAU(1.0/UEqn.A()); +volScalarField rAtU(1.0/(1.0/rAU - UEqn.H1())); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } if (pimple.transonic()) diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H index cd19153462..3d02c63381 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H @@ -5,9 +5,9 @@ // pressure solution - done in 2 parts. Part 1: thermo.rho() -= psi*p; - volScalarField rAU(1.0/UEqn().A()); + volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); if (pimple.transonic()) { diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H index b84be5a66d..12bdceb7e5 100644 --- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H +++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H @@ -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 @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ { - volScalarField& rDeltaT = trDeltaT(); + volScalarField& rDeltaT = trDeltaT.ref(); const dictionary& pimpleDict = pimple.dict(); diff --git a/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H b/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H index 7d361ac9f8..bc94840d1f 100644 --- a/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H +++ b/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H @@ -22,7 +22,7 @@ tmp> interpolate ) ); - GeometricField& sf = tsf(); + GeometricField& sf = tsf.ref(); sf.rename(vf.name() + '_' + dir.name()); diff --git a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H index e469bafa34..806ddd3832 100644 --- a/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H @@ -1,5 +1,5 @@ { - volScalarField& rDeltaT = trDeltaT(); + volScalarField& rDeltaT = trDeltaT.ref(); scalar rDeltaTSmoothingCoeff ( diff --git a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H index 907c9934e2..e4caa1cea4 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); -tmp UEqn +tmp tUEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + MRF.DDt(rho, U) @@ -10,14 +10,15 @@ tmp UEqn == fvOptions(rho, U) ); +fvVectorMatrix& UEqn = tUEqn.ref(); -UEqn().relax(); +UEqn.relax(); -fvOptions.constrain(UEqn()); +fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { - solve(UEqn() == -fvc::grad(p)); + solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); K = 0.5*magSqr(U); diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H index ae5478c5b6..f5b7141224 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H @@ -3,13 +3,13 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rAU(1.0/UEqn().A()); +volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } if (pimple.transonic()) diff --git a/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H index 8bef07a5bb..bf8eb899af 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pcEqn.H @@ -3,13 +3,13 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rAU(1.0/UEqn().A()); -volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volScalarField rAU(1.0/UEqn.A()); +volScalarField rAtU(1.0/(1.0/rAU - UEqn.H1())); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } if (pimple.transonic()) diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H index 615682db12..4abc5cd4aa 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H @@ -3,13 +3,13 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rAU(1.0/UEqn().A()); +volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } if (pimple.transonic()) diff --git a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H index 30a3908b05..ba2db0d04a 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H @@ -1,5 +1,5 @@ { - volScalarField& rDeltaT = trDeltaT(); + volScalarField& rDeltaT = trDeltaT.ref(); const dictionary& pimpleDict = pimple.dict(); diff --git a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H index 396b923494..a6f410250b 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + MRF.DDt(rho, U) @@ -10,11 +10,12 @@ == fvOptions(rho, U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); - solve(UEqn() == -fvc::grad(p)); + solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index 4c6276711c..b085a2b9d1 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -1,8 +1,8 @@ { - volScalarField rAU(1.0/UEqn().A()); + volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); - UEqn.clear(); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); + tUEqn.clear(); bool closedVolume = false; diff --git a/applications/solvers/compressible/rhoSimpleFoam/pcEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pcEqn.H index 7b77048a99..51b3865165 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pcEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pcEqn.H @@ -1,7 +1,7 @@ -volScalarField rAU(1.0/UEqn().A()); -volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); -UEqn.clear(); +volScalarField rAU(1.0/UEqn.A()); +volScalarField rAtU(1.0/(1.0/rAU - UEqn.H1())); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); +tUEqn.clear(); bool closedVolume = false; diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H index fcb8f713d6..3ec153c567 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + MRF.DDt(rho, U) @@ -10,8 +10,9 @@ == fvOptions(rho, U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); // Include the porous media resistance and solve the momentum equation // either implicit in the tensorial resistance or transport using by @@ -22,18 +23,18 @@ if (pressureImplicitPorosity) { - tmp tTU = tensor(I)*UEqn().A(); - pZones.addResistance(UEqn(), tTU()); + tmp tTU = tensor(I)*UEqn.A(); + pZones.addResistance(UEqn, tTU.ref()); trTU = inv(tTU()); - trTU().rename("rAU"); + trTU.ref().rename("rAU"); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); volVectorField gradp(fvc::grad(p)); for (int UCorr=0; UCorr tHbyA; if (pressureImplicitPorosity) { - tHbyA = constrainHbyA(trTU()&UEqn().H(), U, p); + tHbyA = constrainHbyA(trTU()&UEqn.H(), U, p); } else { - tHbyA = constrainHbyA(trAU()*UEqn().H(), U, p); + tHbyA = constrainHbyA(trAU()*UEqn.H(), U, p); } - volVectorField& HbyA = tHbyA(); + volVectorField& HbyA = tHbyA.ref(); - UEqn.clear(); + tUEqn.clear(); bool closedVolume = false; @@ -51,13 +51,15 @@ ); } - tpEqn().setReference(pRefCell, pRefValue); + fvScalarMatrix& pEqn = tpEqn.ref(); - tpEqn().solve(); + pEqn.setReference(pRefCell, pRefValue); + + pEqn.solve(); if (simple.finalNonOrthogonalIter()) { - phi = phiHbyA - tpEqn().flux(); + phi = phiHbyA - pEqn.flux(); } } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H index 72bf78c7fb..d8a347f87d 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + MRF.DDt(U) @@ -10,16 +10,17 @@ == fvOptions(U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); if (simple.momentumPredictor()) { solve ( - UEqn() + UEqn == fvc::reconstruct ( diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H index 13200035d8..7df0ac46d2 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H @@ -1,9 +1,9 @@ { - volScalarField rAU("rAU", 1.0/UEqn().A()); + volScalarField rAU("rAU", 1.0/UEqn.A()); surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p_rgh)); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh)); - UEqn.clear(); + tUEqn.clear(); surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf()); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H index 04796b4754..1a47d06a8e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + MRF.DDt(rho, U) @@ -10,16 +10,17 @@ == fvOptions(rho, U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); if (simple.momentumPredictor()) { solve ( - UEqn() + UEqn == fvc::reconstruct ( diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 132e440bcd..a744b9d19f 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -2,10 +2,10 @@ rho = thermo.rho(); rho.relax(); - volScalarField rAU("rAU", 1.0/UEqn().A()); + volScalarField rAU("rAU", 1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p_rgh)); - UEqn.clear(); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh)); + tUEqn.clear(); surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H index b65ef6bfdb..ed0402c2d0 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + MRF.DDt(rho, U) @@ -10,14 +10,15 @@ == fvOptions(rho, U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); solve ( - UEqn() + UEqn == fvc::reconstruct ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H index 341de6b13e..3fdadc042a 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H @@ -4,10 +4,10 @@ rho = min(rho, rhoMax[i]); rho.relax(); - volScalarField rAU("rAU", 1.0/UEqn().A()); + volScalarField rAU("rAU", 1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p_rgh)); - UEqn.clear(); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh)); + tUEqn.clear(); surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H index 563ad65eba..a12d0e8146 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + MRF.DDt(rho, U) @@ -10,16 +10,17 @@ == fvOptions(rho, U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); if (momentumPredictor) { solve ( - UEqn() + UEqn == fvc::reconstruct ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H index 0b82c44068..358535efe9 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H @@ -5,9 +5,9 @@ rho = thermo.rho(); - volScalarField rAU("rAU", 1.0/UEqn().A()); + volScalarField rAU("rAU", 1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p_rgh)); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh)); surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H index 49fd39e45b..30a670768f 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H @@ -6,7 +6,7 @@ if (finalIter) { for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - tmp hEqn + fvScalarMatrix hEqn ( fvm::ddt(betav*rho, h) - ( @@ -18,11 +18,11 @@ if (finalIter) fvOptions(rho, h) ); - hEqn().relax(); + hEqn.relax(); - fvOptions.constrain(hEqn()); + fvOptions.constrain(hEqn); - hEqn().solve(mesh.solver(h.select(finalIter))); + hEqn.solve(mesh.solver(h.select(finalIter))); fvOptions.correct(h); } diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C index fbd8e5f150..cdc1616e2b 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) { // Momentum predictor - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + turbulence->divDevReff(U) @@ -115,18 +115,19 @@ int main(int argc, char *argv[]) == fvOptions(U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); - solve(UEqn() == -fvc::grad(p)); + solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); - volScalarField rAU(1.0/UEqn().A()); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); - UEqn.clear(); + volScalarField rAU(1.0/UEqn.A()); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); + tUEqn.clear(); surfaceScalarField phiHbyA ( "phiHbyA", @@ -180,7 +181,7 @@ int main(int argc, char *argv[]) zeroCells(adjointTransposeConvection, inletCells); - tmp UaEqn + tmp tUaEqn ( fvm::div(-phi, Ua) - adjointTransposeConvection @@ -189,19 +190,20 @@ int main(int argc, char *argv[]) == fvOptions(Ua) ); + fvVectorMatrix& UaEqn = tUaEqn.ref(); - UaEqn().relax(); + UaEqn.relax(); - fvOptions.constrain(UaEqn()); + fvOptions.constrain(UaEqn); - solve(UaEqn() == -fvc::grad(pa)); + solve(UaEqn == -fvc::grad(pa)); fvOptions.correct(Ua); - volScalarField rAUa(1.0/UaEqn().A()); + volScalarField rAUa(1.0/UaEqn.A()); volVectorField HbyAa("HbyAa", Ua); - HbyAa = rAUa*UaEqn().H(); - UaEqn.clear(); + HbyAa = rAUa*UaEqn.H(); + tUaEqn.clear(); surfaceScalarField phiHbyAa ( "phiHbyAa", diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H index 5aa6cef0b1..0d55edd5a0 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H @@ -1,5 +1,5 @@ // Relative momentum predictor - tmp UrelEqn + tmp tUrelEqn ( fvm::ddt(Urel) + fvm::div(phi, Urel) @@ -8,11 +8,12 @@ == fvOptions(Urel) ); + fvVectorMatrix& UrelEqn = tUrelEqn.ref(); - UrelEqn().relax(); + UrelEqn.relax(); - fvOptions.constrain(UrelEqn()); + fvOptions.constrain(UrelEqn); - solve(UrelEqn() == -fvc::grad(p)); + solve(UrelEqn == -fvc::grad(p)); fvOptions.correct(Urel); diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H index 0e3936bc5d..aaeb12ae06 100644 --- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H @@ -1,6 +1,6 @@ -volScalarField rAUrel(1.0/UrelEqn().A()); +volScalarField rAUrel(1.0/UrelEqn.A()); volVectorField HbyA("HbyA", Urel); -HbyA = rAUrel*UrelEqn().H(); +HbyA = rAUrel*UrelEqn.H(); surfaceScalarField phiHbyA ( @@ -15,7 +15,7 @@ tmp rAtUrel(rAUrel); if (pimple.consistent()) { - rAtUrel = 1.0/max(1.0/rAUrel - UrelEqn().H1(), 0.1/rAUrel); + rAtUrel = 1.0/max(1.0/rAUrel - UrelEqn.H1(), 0.1/rAUrel); phiHbyA += fvc::interpolate(rAtUrel() - rAUrel)*fvc::snGrad(p)*mesh.magSf(); HbyA -= (rAUrel - rAtUrel())*fvc::grad(p); @@ -23,7 +23,7 @@ if (pimple.consistent()) if (pimple.nCorrPISO() <= 1) { - UrelEqn.clear(); + tUrelEqn.clear(); } // Update the pressure BCs to ensure flux consistency diff --git a/applications/solvers/incompressible/pimpleFoam/UEqn.H b/applications/solvers/incompressible/pimpleFoam/UEqn.H index 880c0066e3..1a6b404885 100644 --- a/applications/solvers/incompressible/pimpleFoam/UEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); -tmp UEqn +tmp tUEqn ( fvm::ddt(U) + fvm::div(phi, U) + MRF.DDt(U) @@ -10,14 +10,15 @@ tmp UEqn == fvOptions(U) ); +fvVectorMatrix& UEqn = tUEqn.ref(); -UEqn().relax(); +UEqn.relax(); -fvOptions.constrain(UEqn()); +fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { - solve(UEqn() == -fvc::grad(p)); + solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); } diff --git a/applications/solvers/incompressible/pimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pEqn.H index 6d4eb90334..ffce137326 100644 --- a/applications/solvers/incompressible/pimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pEqn.H @@ -1,5 +1,5 @@ -volScalarField rAU(1.0/UEqn().A()); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volScalarField rAU(1.0/UEqn.A()); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); surfaceScalarField phiHbyA ( "phiHbyA", @@ -15,7 +15,7 @@ tmp rAtU(rAU); if (pimple.consistent()) { - rAtU = 1.0/max(1.0/rAU - UEqn().H1(), 0.1/rAU); + rAtU = 1.0/max(1.0/rAU - UEqn.H1(), 0.1/rAU); phiHbyA += fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf(); HbyA -= (rAU - rAtU())*fvc::grad(p); @@ -23,7 +23,7 @@ if (pimple.consistent()) if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } // Update the pressure BCs to ensure flux consistency diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H index f4106997c6..452f13fb1f 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H @@ -1,5 +1,5 @@ -volScalarField rAU(1.0/UEqn().A()); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volScalarField rAU(1.0/UEqn.A()); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); surfaceScalarField phiHbyA ( "phiHbyA", @@ -20,7 +20,7 @@ tmp rAtU(rAU); if (pimple.consistent()) { - rAtU = 1.0/max(1.0/rAU - UEqn().H1(), 0.1/rAU); + rAtU = 1.0/max(1.0/rAU - UEqn.H1(), 0.1/rAU); phiHbyA += fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf(); HbyA -= (rAU - rAtU())*fvc::grad(p); @@ -28,7 +28,7 @@ if (pimple.consistent()) if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } // Update the pressure BCs to ensure flux consistency diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H index 75df41d00b..6a2070eb4e 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/UrelEqn.H @@ -1,6 +1,6 @@ // Relative momentum predictor - tmp UrelEqn + tmp tUrelEqn ( fvm::div(phi, Urel) + turbulence->divDevReff(Urel) @@ -8,11 +8,12 @@ == fvOptions(Urel) ); + fvVectorMatrix& UrelEqn = tUrelEqn.ref(); - UrelEqn().relax(); + UrelEqn.relax(); - fvOptions.constrain(UrelEqn()); + fvOptions.constrain(UrelEqn); - solve(UrelEqn() == -fvc::grad(p)); + solve(UrelEqn == -fvc::grad(p)); fvOptions.correct(Urel); diff --git a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H index 636a4c571d..9982ddf546 100644 --- a/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/SRFSimpleFoam/pEqn.H @@ -1,7 +1,7 @@ { - volScalarField rAUrel(1.0/UrelEqn().A()); + volScalarField rAUrel(1.0/UrelEqn.A()); volVectorField HbyA("HbyA", Urel); - HbyA = rAUrel*UrelEqn().H(); + HbyA = rAUrel*UrelEqn.H(); surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf()); adjustPhi(phiHbyA, Urel, p); @@ -10,13 +10,13 @@ if (simple.consistent()) { - rAtUrel = 1.0/(1.0/rAUrel - UrelEqn().H1()); + rAtUrel = 1.0/(1.0/rAUrel - UrelEqn.H1()); phiHbyA += fvc::interpolate(rAtUrel() - rAUrel)*fvc::snGrad(p)*mesh.magSf(); HbyA -= (rAUrel - rAtUrel())*fvc::grad(p); } - UrelEqn.clear(); + tUrelEqn.clear(); // Update the pressure BCs to ensure flux consistency constrainPressure(p, Urel, phiHbyA, rAtUrel()); diff --git a/applications/solvers/incompressible/simpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/UEqn.H index 12b5621636..31c081792c 100644 --- a/applications/solvers/incompressible/simpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + MRF.DDt(U) @@ -10,11 +10,12 @@ == fvOptions(U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); - solve(UEqn() == -fvc::grad(p)); + solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); diff --git a/applications/solvers/incompressible/simpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/pEqn.H index b506bf43cf..5d5dde848c 100644 --- a/applications/solvers/incompressible/simpleFoam/pEqn.H +++ b/applications/solvers/incompressible/simpleFoam/pEqn.H @@ -1,6 +1,6 @@ { - volScalarField rAU(1.0/UEqn().A()); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); + volScalarField rAU(1.0/UEqn.A()); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf()); MRF.makeRelative(phiHbyA); adjustPhi(phiHbyA, U, p); @@ -9,13 +9,13 @@ if (simple.consistent()) { - rAtU = 1.0/(1.0/rAU - UEqn().H1()); + rAtU = 1.0/(1.0/rAU - UEqn.H1()); phiHbyA += fvc::interpolate(rAtU() - rAU)*fvc::snGrad(p)*mesh.magSf(); HbyA -= (rAU - rAtU())*fvc::grad(p); } - UEqn.clear(); + tUEqn.clear(); // Update the pressure BCs to ensure flux consistency constrainPressure(p, U, phiHbyA, rAtU(), MRF); diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H index 035b83ebd1..e2c9917d5a 100644 --- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H +++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + MRF.DDt(U) @@ -10,8 +10,9 @@ == fvOptions(U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); // Include the porous media resistance and solve the momentum equation // either implicit in the tensorial resistance or transport using by @@ -22,18 +23,18 @@ if (pressureImplicitPorosity) { - tmp tTU = tensor(I)*UEqn().A(); - pZones.addResistance(UEqn(), tTU()); + tmp tTU = tensor(I)*UEqn.A(); + pZones.addResistance(UEqn, tTU.ref()); trTU = inv(tTU()); - trTU().rename("rAU"); + trTU.ref().rename("rAU"); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); volVectorField gradp(fvc::grad(p)); for (int UCorr=0; UCorr tHbyA; if (pressureImplicitPorosity) { - tHbyA = constrainHbyA(trTU()&UEqn().H(), U, p); + tHbyA = constrainHbyA(trTU()&UEqn.H(), U, p); } else { - tHbyA = constrainHbyA(trAU()*UEqn().H(), U, p); + tHbyA = constrainHbyA(trAU()*UEqn.H(), U, p); } -volVectorField& HbyA = tHbyA(); +volVectorField& HbyA = tHbyA.ref(); -UEqn.clear(); +tUEqn.clear(); surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(HbyA) & mesh.Sf()); MRF.makeRelative(phiHbyA); @@ -29,13 +29,15 @@ while (simple.correctNonOrthogonal()) tpEqn = (fvm::laplacian(trAU(), p) == fvc::div(phiHbyA)); } - tpEqn().setReference(pRefCell, pRefValue); + fvScalarMatrix pEqn = tpEqn.ref(); - tpEqn().solve(); + pEqn.setReference(pRefCell, pRefValue); + + pEqn.solve(); if (simple.finalNonOrthogonalIter()) { - phi = phiHbyA - tpEqn().flux(); + phi = phiHbyA - pEqn.flux(); } } diff --git a/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options b/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options index bd9cbcb613..902afe59e4 100644 --- a/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options +++ b/applications/solvers/lagrangian/DPMFoam/DPMTurbulenceModels/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/transportModels \ diff --git a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H index 1c7d7cb5e2..65b0388e12 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H @@ -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 @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ { - volScalarField& rDeltaT = trDeltaT(); + volScalarField& rDeltaT = trDeltaT.ref(); const dictionary& pimpleDict = pimple.dict(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H index d599d491f8..f51eeb49bf 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H @@ -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 @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ { - volScalarField& rDeltaT = trDeltaT(); + volScalarField& rDeltaT = trDeltaT.ref(); const dictionary& pimpleDict = pimple.dict(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H index 2f5a74d45b..86cf5362f8 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/UEqn.H @@ -1,6 +1,6 @@ MRF.correctBoundaryVelocity(U); - tmp UEqn + tmp tUEqn ( fvm::div(phi, U) + MRF.DDt(rho, U) @@ -10,11 +10,12 @@ + parcels.SU(U) + fvOptions(rho, U) ); + fvVectorMatrix& UEqn = tUEqn.ref(); - UEqn().relax(); + UEqn.relax(); - fvOptions.constrain(UEqn()); + fvOptions.constrain(UEqn); - solve(UEqn() == -fvc::grad(p)); + solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H index aa775bc0d0..9b48bb939d 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/pEqn.H @@ -3,10 +3,10 @@ // pressure solution - done in 2 parts. Part 1: thermo.rho() -= psi*p; - volScalarField rAU(1.0/UEqn().A()); + volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); - UEqn.clear(); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); + tUEqn.clear(); surfaceScalarField phiHbyA ( "phiHbyA", diff --git a/applications/solvers/lagrangian/sprayFoam/UEqn.H b/applications/solvers/lagrangian/sprayFoam/UEqn.H index c26bf1cf65..97a83f7d5b 100644 --- a/applications/solvers/lagrangian/sprayFoam/UEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/UEqn.H @@ -2,7 +2,7 @@ MRF.correctBoundaryVelocity(U); -tmp UEqn +tmp tUEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + MRF.DDt(rho, U) @@ -12,14 +12,15 @@ tmp UEqn + parcels.SU(U) + fvOptions(rho, U) ); +fvVectorMatrix& UEqn = tUEqn.ref(); -UEqn().relax(); +UEqn.relax(); -fvOptions.constrain(UEqn()); +fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { - solve(UEqn() == -fvc::grad(p)); + solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); K = 0.5*magSqr(U); diff --git a/applications/solvers/lagrangian/sprayFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/pEqn.H index 5d28412683..1447f5b6be 100644 --- a/applications/solvers/lagrangian/sprayFoam/pEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/pEqn.H @@ -3,13 +3,13 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rAU(1.0/UEqn().A()); +volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } if (pimple.transonic()) diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H index 406128feed..8522e60918 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H +++ b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/pEqn.H @@ -3,13 +3,13 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rAU(1.0/UEqn().A()); +volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p)); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } if (pimple.transonic()) diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H index e1ac128810..c326215512 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H @@ -40,8 +40,8 @@ psi1*fvm::ddt(p_rgh) + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) ); - deleteDemandDrivenData(p_rghEqnComp1().faceFluxCorrectionPtr()); - p_rghEqnComp1().relax(); + deleteDemandDrivenData(p_rghEqnComp1.ref().faceFluxCorrectionPtr()); + p_rghEqnComp1.ref().relax(); p_rghEqnComp2 = fvc::ddt(rho2) + fvc::div(phi, rho2) - fvc::Sp(fvc::div(phi), rho2) @@ -50,8 +50,8 @@ psi2*fvm::ddt(p_rgh) + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) ); - deleteDemandDrivenData(p_rghEqnComp2().faceFluxCorrectionPtr()); - p_rghEqnComp2().relax(); + deleteDemandDrivenData(p_rghEqnComp2.ref().faceFluxCorrectionPtr()); + p_rghEqnComp2.ref().relax(); } else { diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index fb23042a87..a0a91c3255 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -37,8 +37,8 @@ psi1*fvm::ddt(p_rgh) + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) ); - deleteDemandDrivenData(p_rghEqnComp1().faceFluxCorrectionPtr()); - p_rghEqnComp1().relax(); + deleteDemandDrivenData(p_rghEqnComp1.ref().faceFluxCorrectionPtr()); + p_rghEqnComp1.ref().relax(); p_rghEqnComp2 = fvc::ddt(rho2) + fvc::div(phi, rho2) - fvc::Sp(fvc::div(phi), rho2) @@ -47,8 +47,8 @@ psi2*fvm::ddt(p_rgh) + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) ); - deleteDemandDrivenData(p_rghEqnComp2().faceFluxCorrectionPtr()); - p_rghEqnComp2().relax(); + deleteDemandDrivenData(p_rghEqnComp2.ref().faceFluxCorrectionPtr()); + p_rghEqnComp2.ref().relax(); } else { diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 5730273383..14bbbe8708 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -190,7 +190,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::he for (++phasei; phasei != phases_.end(); ++phasei) { - the() += phasei()*phasei().thermo().he(p, T); + the.ref() += phasei()*phasei().thermo().he(p, T); } return the; @@ -213,7 +213,8 @@ Foam::tmp Foam::multiphaseMixtureThermo::he for (++phasei; phasei != phases_.end(); ++phasei) { - the() += scalarField(phasei(), cells)*phasei().thermo().he(p, T, cells); + the.ref() += + scalarField(phasei(), cells)*phasei().thermo().he(p, T, cells); } return the; @@ -236,7 +237,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::he for (++phasei; phasei != phases_.end(); ++phasei) { - the() += + the.ref() += phasei().boundaryField()[patchi]*phasei().thermo().he(p, T, patchi); } @@ -252,7 +253,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::hc() const for (++phasei; phasei != phases_.end(); ++phasei) { - thc() += phasei()*phasei().thermo().hc(); + thc.ref() += phasei()*phasei().thermo().hc(); } return thc; @@ -293,7 +294,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::rho() const for (++phasei; phasei != phases_.end(); ++phasei) { - trho() += phasei()*phasei().thermo().rho(); + trho.ref() += phasei()*phasei().thermo().rho(); } return trho; @@ -314,7 +315,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::rho for (++phasei; phasei != phases_.end(); ++phasei) { - trho() += + trho.ref() += phasei().boundaryField()[patchi]*phasei().thermo().rho(patchi); } @@ -330,7 +331,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::Cp() const for (++phasei; phasei != phases_.end(); ++phasei) { - tCp() += phasei()*phasei().thermo().Cp(); + tCp.ref() += phasei()*phasei().thermo().Cp(); } return tCp; @@ -353,7 +354,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::Cp for (++phasei; phasei != phases_.end(); ++phasei) { - tCp() += + tCp.ref() += phasei().boundaryField()[patchi]*phasei().thermo().Cp(p, T, patchi); } @@ -369,7 +370,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::Cv() const for (++phasei; phasei != phases_.end(); ++phasei) { - tCv() += phasei()*phasei().thermo().Cv(); + tCv.ref() += phasei()*phasei().thermo().Cv(); } return tCv; @@ -392,7 +393,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::Cv for (++phasei; phasei != phases_.end(); ++phasei) { - tCv() += + tCv.ref() += phasei().boundaryField()[patchi]*phasei().thermo().Cv(p, T, patchi); } @@ -408,7 +409,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::gamma() const for (++phasei; phasei != phases_.end(); ++phasei) { - tgamma() += phasei()*phasei().thermo().gamma(); + tgamma.ref() += phasei()*phasei().thermo().gamma(); } return tgamma; @@ -431,7 +432,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::gamma for (++phasei; phasei != phases_.end(); ++phasei) { - tgamma() += + tgamma.ref() += phasei().boundaryField()[patchi] *phasei().thermo().gamma(p, T, patchi); } @@ -448,7 +449,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::Cpv() const for (++phasei; phasei != phases_.end(); ++phasei) { - tCpv() += phasei()*phasei().thermo().Cpv(); + tCpv.ref() += phasei()*phasei().thermo().Cpv(); } return tCpv; @@ -471,7 +472,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::Cpv for (++phasei; phasei != phases_.end(); ++phasei) { - tCpv() += + tCpv.ref() += phasei().boundaryField()[patchi] *phasei().thermo().Cpv(p, T, patchi); } @@ -488,7 +489,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::CpByCpv() const for (++phasei; phasei != phases_.end(); ++phasei) { - tCpByCpv() += phasei()*phasei().thermo().CpByCpv(); + tCpByCpv.ref() += phasei()*phasei().thermo().CpByCpv(); } return tCpByCpv; @@ -511,7 +512,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::CpByCpv for (++phasei; phasei != phases_.end(); ++phasei) { - tCpByCpv() += + tCpByCpv.ref() += phasei().boundaryField()[patchi] *phasei().thermo().CpByCpv(p, T, patchi); } @@ -543,7 +544,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::kappa() const for (++phasei; phasei != phases_.end(); ++phasei) { - tkappa() += phasei()*phasei().thermo().kappa(); + tkappa.ref() += phasei()*phasei().thermo().kappa(); } return tkappa; @@ -564,7 +565,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::kappa for (++phasei; phasei != phases_.end(); ++phasei) { - tkappa() += + tkappa.ref() += phasei().boundaryField()[patchi]*phasei().thermo().kappa(patchi); } @@ -583,7 +584,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::kappaEff for (++phasei; phasei != phases_.end(); ++phasei) { - tkappaEff() += phasei()*phasei().thermo().kappaEff(alphat); + tkappaEff.ref() += phasei()*phasei().thermo().kappaEff(alphat); } return tkappaEff; @@ -606,7 +607,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::kappaEff for (++phasei; phasei != phases_.end(); ++phasei) { - tkappaEff() += + tkappaEff.ref() += phasei().boundaryField()[patchi] *phasei().thermo().kappaEff(alphat, patchi); } @@ -626,7 +627,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::alphaEff for (++phasei; phasei != phases_.end(); ++phasei) { - talphaEff() += phasei()*phasei().thermo().alphaEff(alphat); + talphaEff.ref() += phasei()*phasei().thermo().alphaEff(alphat); } return talphaEff; @@ -649,7 +650,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::alphaEff for (++phasei; phasei != phases_.end(); ++phasei) { - talphaEff() += + talphaEff.ref() += phasei().boundaryField()[patchi] *phasei().thermo().alphaEff(alphat, patchi); } @@ -666,7 +667,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::rCv() const for (++phasei; phasei != phases_.end(); ++phasei) { - trCv() += phasei()/phasei().thermo().Cv(); + trCv.ref() += phasei()/phasei().thermo().Cv(); } return trCv; @@ -696,7 +697,7 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const ) ); - surfaceScalarField& stf = tstf(); + surfaceScalarField& stf = tstf.ref(); forAllConstIter(PtrDictionary, phases_, phase1) { @@ -922,7 +923,7 @@ Foam::tmp Foam::multiphaseMixtureThermo::K { tmp tnHatfv = nHatfv(alpha1, alpha2); - correctContactAngle(alpha1, alpha2, tnHatfv().boundaryField()); + correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryField()); // Simple expression for curvature return -fvc::div(tnHatfv & mesh_.Sf()); @@ -949,7 +950,8 @@ Foam::multiphaseMixtureThermo::nearInterface() const forAllConstIter(PtrDictionary, phases_, phase) { - tnearInt() = max(tnearInt(), pos(phase() - 0.01)*pos(0.99 - phase())); + tnearInt.ref() = + max(tnearInt(), pos(phase() - 0.01)*pos(0.99 - phase())); } return tnearInt; diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H index ccf4bc9794..26ffef825a 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/pEqn.H @@ -80,7 +80,7 @@ } else { - p_rghEqnComp() += hmm; + p_rghEqnComp.ref() += hmm; } phasei++; diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H b/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H index 68f027cd24..3938fde30f 100644 --- a/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H +++ b/applications/solvers/multiphase/driftFluxFoam/alphaEqn.H @@ -34,7 +34,7 @@ ( alpha1, alphaPhi, - talphaPhiCorr0(), + talphaPhiCorr0.ref(), mixture.alphaMax(), 0 ); @@ -73,7 +73,7 @@ ( alpha1, talphaPhiUn(), - talphaPhiCorr(), + talphaPhiCorr.ref(), mixture.alphaMax(), 0 ); diff --git a/applications/solvers/multiphase/interFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/alphaEqn.H index 055aac3966..9d6dd2dc18 100644 --- a/applications/solvers/multiphase/interFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interFoam/alphaEqn.H @@ -32,7 +32,8 @@ } ocCoeff = - refCast>(ddtAlpha()).ocCoeff(); + refCast>(ddtAlpha()) + .ocCoeff(); } else { @@ -104,7 +105,7 @@ if (alphaApplyPrevCorr && talphaPhiCorr0.valid()) { Info<< "Applying the previous iteration compression flux" << endl; - MULES::correct(alpha1, alphaPhi, talphaPhiCorr0(), 1, 0); + MULES::correct(alpha1, alphaPhi, talphaPhiCorr0.ref(), 1, 0); alphaPhi += talphaPhiCorr0(); } @@ -150,7 +151,7 @@ tmp talphaPhiCorr(talphaPhiUn() - alphaPhi); volScalarField alpha10("alpha10", alpha1); - MULES::correct(alpha1, talphaPhiUn(), talphaPhiCorr(), 1, 0); + MULES::correct(alpha1, talphaPhiUn(), talphaPhiCorr.ref(), 1, 0); // Under-relax the correction for all but the 1st corrector if (aCorr == 0) diff --git a/applications/solvers/multiphase/interFoam/setRDeltaT.H b/applications/solvers/multiphase/interFoam/setRDeltaT.H index 01bb8aa411..dd0e6a4da4 100644 --- a/applications/solvers/multiphase/interFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/interFoam/setRDeltaT.H @@ -1,5 +1,5 @@ { - volScalarField& rDeltaT = trDeltaT(); + volScalarField& rDeltaT = trDeltaT.ref(); const dictionary& pimpleDict = pimple.dict(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H index 9cc90a9ebe..150ccd1f78 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/alphaEqn.H @@ -62,7 +62,7 @@ if (MULESCorr) { - talphaPhiCorr() -= talphaPhi(); + talphaPhiCorr.ref() -= talphaPhi(); volScalarField alpha100("alpha100", alpha10); alpha10 = alpha1; @@ -72,7 +72,7 @@ geometricOneField(), alpha1, talphaPhi(), - talphaPhiCorr(), + talphaPhiCorr.ref(), vDotvmcAlphal, ( divU*(alpha10 - alpha100) @@ -85,12 +85,12 @@ // Under-relax the correction for all but the 1st corrector if (aCorr == 0) { - talphaPhi() += talphaPhiCorr(); + talphaPhi.ref() += talphaPhiCorr(); } else { alpha1 = 0.5*alpha1 + 0.5*alpha10; - talphaPhi() += 0.5*talphaPhiCorr(); + talphaPhi.ref() += 0.5*talphaPhiCorr(); } } else @@ -100,7 +100,7 @@ geometricOneField(), alpha1, phi, - talphaPhiCorr(), + talphaPhiCorr.ref(), vDotvmcAlphal, (divU*alpha1 + vDotcAlphal)(), 1, diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 6755e96ecb..27a5067edd 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -372,7 +372,7 @@ Foam::tmp Foam::multiphaseSystem::K { tmp tnHatfv = nHatfv(phase1, phase2); - correctContactAngle(phase1, phase2, tnHatfv().boundaryField()); + correctContactAngle(phase1, phase2, tnHatfv.ref().boundaryField()); // Simple expression for curvature return -fvc::div(tnHatfv & mesh_.Sf()); @@ -493,10 +493,11 @@ Foam::tmp Foam::multiphaseSystem::rho() const PtrDictionary::const_iterator iter = phases_.begin(); tmp trho = iter()*iter().rho(); + volScalarField& rho = trho.ref(); for (++iter; iter != phases_.end(); ++iter) { - trho() += iter()*iter().rho(); + rho += iter()*iter().rho(); } return trho; @@ -509,10 +510,11 @@ Foam::multiphaseSystem::rho(const label patchi) const PtrDictionary::const_iterator iter = phases_.begin(); tmp trho = iter().boundaryField()[patchi]*iter().rho().value(); + scalarField& rho = trho.ref(); for (++iter; iter != phases_.end(); ++iter) { - trho() += iter().boundaryField()[patchi]*iter().rho().value(); + rho += iter().boundaryField()[patchi]*iter().rho().value(); } return trho; @@ -524,10 +526,11 @@ Foam::tmp Foam::multiphaseSystem::nu() const PtrDictionary::const_iterator iter = phases_.begin(); tmp tmu = iter()*(iter().rho()*iter().nu()); + volScalarField& mu = tmu.ref(); for (++iter; iter != phases_.end(); ++iter) { - tmu() += iter()*(iter().rho()*iter().nu()); + mu += iter()*(iter().rho()*iter().nu()); } return tmu/rho(); @@ -542,10 +545,11 @@ Foam::multiphaseSystem::nu(const label patchi) const tmp tmu = iter().boundaryField()[patchi] *(iter().rho().value()*iter().nu().value()); + scalarField& mu = tmu.ref(); for (++iter; iter != phases_.end(); ++iter) { - tmu() += + mu += iter().boundaryField()[patchi] *(iter().rho().value()*iter().nu().value()); } @@ -592,7 +596,7 @@ Foam::tmp Foam::multiphaseSystem::Cvm if (Cvm != Cvms_.end()) { - tCvm() += Cvm()*phase2.rho()*phase2; + tCvm.ref() += Cvm()*phase2.rho()*phase2; } else { @@ -600,7 +604,7 @@ Foam::tmp Foam::multiphaseSystem::Cvm if (Cvm != Cvms_.end()) { - tCvm() += Cvm()*phase.rho()*phase2; + tCvm.ref() += Cvm()*phase.rho()*phase2; } } } @@ -648,7 +652,7 @@ Foam::tmp Foam::multiphaseSystem::Svm if (Cvm != Cvms_.end()) { - tSvm() += Cvm()*phase2.rho()*phase2*phase2.DDtU(); + tSvm.ref() += Cvm()*phase2.rho()*phase2*phase2.DDtU(); } else { @@ -656,7 +660,7 @@ Foam::tmp Foam::multiphaseSystem::Svm if (Cvm != Cvms_.end()) { - tSvm() += Cvm()*phase.rho()*phase2*phase2.DDtU(); + tSvm.ref() += Cvm()*phase.rho()*phase2*phase2.DDtU(); } } } @@ -673,7 +677,7 @@ Foam::tmp Foam::multiphaseSystem::Svm ) ) { - tSvm().boundaryField()[patchi] = vector::zero; + tSvm.ref().boundaryField()[patchi] = vector::zero; } } @@ -772,7 +776,7 @@ Foam::tmp Foam::multiphaseSystem::dragCoeff || &phase == &dmIter()->phase2() ) { - tdragCoeff() += *dcIter(); + tdragCoeff.ref() += *dcIter(); } } @@ -818,7 +822,7 @@ Foam::tmp Foam::multiphaseSystem::surfaceTension if (sigma != sigmas_.end()) { - tSurfaceTension() += + tSurfaceTension.ref() += dimensionedScalar("sigma", dimSigma_, sigma()) *fvc::interpolate(K(phase1, phase2))* ( @@ -853,7 +857,7 @@ Foam::multiphaseSystem::nearInterface() const forAllConstIter(PtrDictionary, phases_, iter) { - tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); + tnearInt.ref() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); } return tnearInt; diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index 27f0f51c35..ea08ba2986 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -141,10 +141,11 @@ Foam::multiphaseMixture::rho() const PtrDictionary::const_iterator iter = phases_.begin(); tmp trho = iter()*iter().rho(); + volScalarField& rho = trho.ref(); for (++iter; iter != phases_.end(); ++iter) { - trho() += iter()*iter().rho(); + rho += iter()*iter().rho(); } return trho; @@ -157,10 +158,11 @@ Foam::multiphaseMixture::rho(const label patchi) const PtrDictionary::const_iterator iter = phases_.begin(); tmp trho = iter().boundaryField()[patchi]*iter().rho().value(); + scalarField& rho = trho.ref(); for (++iter; iter != phases_.end(); ++iter) { - trho() += iter().boundaryField()[patchi]*iter().rho().value(); + rho += iter().boundaryField()[patchi]*iter().rho().value(); } return trho; @@ -173,10 +175,11 @@ Foam::multiphaseMixture::mu() const PtrDictionary::const_iterator iter = phases_.begin(); tmp tmu = iter()*iter().rho()*iter().nu(); + volScalarField& mu = tmu.ref(); for (++iter; iter != phases_.end(); ++iter) { - tmu() += iter()*iter().rho()*iter().nu(); + mu += iter()*iter().rho()*iter().nu(); } return tmu; @@ -192,10 +195,11 @@ Foam::multiphaseMixture::mu(const label patchi) const iter().boundaryField()[patchi] *iter().rho().value() *iter().nu(patchi); + scalarField& mu = tmu.ref(); for (++iter; iter != phases_.end(); ++iter) { - tmu() += + mu += iter().boundaryField()[patchi] *iter().rho().value() *iter().nu(patchi); @@ -212,10 +216,11 @@ Foam::multiphaseMixture::muf() const tmp tmuf = fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu()); + surfaceScalarField& muf = tmuf.ref(); for (++iter; iter != phases_.end(); ++iter) { - tmuf() += + muf += fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu()); } @@ -267,7 +272,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const ) ); - surfaceScalarField& stf = tstf(); + surfaceScalarField& stf = tstf.ref(); forAllConstIter(PtrDictionary, phases_, iter1) { @@ -518,7 +523,7 @@ Foam::tmp Foam::multiphaseMixture::K { tmp tnHatfv = nHatfv(alpha1, alpha2); - correctContactAngle(alpha1, alpha2, tnHatfv().boundaryField()); + correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryField()); // Simple expression for curvature return -fvc::div(tnHatfv & mesh_.Sf()); @@ -545,7 +550,7 @@ Foam::multiphaseMixture::nearInterface() const forAllConstIter(PtrDictionary, phases_, iter) { - tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); + tnearInt.ref() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); } return tnearInt; diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H index 794c0aca52..421e45ae7d 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H @@ -1,6 +1,6 @@ MRF.correctBoundaryVelocity(U); -tmp UEqn +tmp tUEqn ( fvm::ddt(U) + fvm::div(phi, U) + MRF.DDt(U) @@ -8,14 +8,15 @@ tmp UEqn == fvOptions(U) ); +fvVectorMatrix& UEqn = tUEqn.ref(); -UEqn().relax(); +UEqn.relax(); -fvOptions.constrain(UEqn()); +fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { - solve(UEqn() == -fvc::grad(p_gh)); + solve(UEqn == -fvc::grad(p_gh)); fvOptions.correct(U); } diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H index e182350114..7d4c5f9039 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H @@ -1,10 +1,10 @@ -volScalarField rAU(1.0/UEqn().A()); +volScalarField rAU(1.0/UEqn.A()); surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); -volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p_gh)); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_gh)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } surfaceScalarField phiHbyA diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H index 04b187cf85..a74f6c2664 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceDyMFoam/pEqn.H @@ -1,11 +1,11 @@ { - rAU = 1.0/UEqn().A(); + rAU = 1.0/UEqn.A(); surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU)); - volVectorField HbyA(constrainHbyA(rAU*UEqn().H(), U, p_gh)); + volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_gh)); if (pimple.nCorrPISO() <= 1) { - UEqn.clear(); + tUEqn.clear(); } surfaceScalarField phiHbyA diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C index 5fd646c5ce..ff5d3e5a6e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -153,7 +153,7 @@ Foam::InterfaceCompositionModel::D ) ); - volScalarField& D(tmpD()); + volScalarField& D(tmpD.ref()); forAll(p, cellI) { @@ -207,7 +207,7 @@ Foam::InterfaceCompositionModel::L ) ); - volScalarField& L(tmpL()); + volScalarField& L(tmpL.ref()); forAll(p, cellI) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C index 886fefe8e8..a2fbcd0bbc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,7 +111,7 @@ Foam::saturationModels::polynomial::Tsat ) ); - volScalarField& Tsat = tTsat(); + volScalarField& Tsat = tTsat.ref(); forAll(Tsat,celli) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C index fb755c6347..c17b649212 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/wallLubricationModel/wallLubricationModel.C @@ -46,7 +46,7 @@ Foam::tmp Foam::wallLubricationModel::zeroGradWalls tmp tFi ) const { - volVectorField& Fi = tFi(); + volVectorField& Fi = tFi.ref(); const fvPatchList& patches = Fi.mesh().boundary(); forAll(patches, patchi) diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C index 3cb567273f..78eb01cf1c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C @@ -199,15 +199,15 @@ Foam::BlendedInterfacialModel::K() const if (model_.valid()) { - x() += model_->K()*(scalar(1) - f1() - f2()); + x.ref() += model_->K()*(scalar(1) - f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->K()*f1; + x.ref() += model1In2_->K()*f1; } if (model2In1_.valid()) { - x() += model2In1_->K()*f2; + x.ref() += model2In1_->K()*f2; } if @@ -216,7 +216,7 @@ Foam::BlendedInterfacialModel::K() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -259,15 +259,15 @@ Foam::BlendedInterfacialModel::K(const scalar residualAlpha) const if (model_.valid()) { - x() += model_->K(residualAlpha)*(scalar(1) - f1() - f2()); + x.ref() += model_->K(residualAlpha)*(scalar(1) - f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->K(residualAlpha)*f1; + x.ref() += model1In2_->K(residualAlpha)*f1; } if (model2In1_.valid()) { - x() += model2In1_->K(residualAlpha)*f2; + x.ref() += model2In1_->K(residualAlpha)*f2; } if @@ -276,7 +276,7 @@ Foam::BlendedInterfacialModel::K(const scalar residualAlpha) const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -325,17 +325,17 @@ Foam::BlendedInterfacialModel::Kf() const if (model_.valid()) { - x() += model_->Kf()*(scalar(1) - f1() - f2()); + x.ref() += model_->Kf()*(scalar(1) - f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->Kf()*f1; + x.ref() += model1In2_->Kf()*f1; } if (model2In1_.valid()) { - x() += model2In1_->Kf()*f2; + x.ref() += model2In1_->Kf()*f2; } if @@ -344,7 +344,7 @@ Foam::BlendedInterfacialModel::Kf() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -388,17 +388,17 @@ Foam::BlendedInterfacialModel::F() const if (model_.valid()) { - x() += model_->F()*(scalar(1) - f1() - f2()); + x.ref() += model_->F()*(scalar(1) - f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->F()*f1; + x.ref() += model1In2_->F()*f1; } if (model2In1_.valid()) { - x() -= model2In1_->F()*f2; // note : subtraction + x.ref() -= model2In1_->F()*f2; // note : subtraction } if @@ -407,7 +407,7 @@ Foam::BlendedInterfacialModel::F() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -456,17 +456,17 @@ Foam::BlendedInterfacialModel::Ff() const if (model_.valid()) { - x() += model_->Ff()*(scalar(1) - f1() - f2()); + x.ref() += model_->Ff()*(scalar(1) - f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->Ff()*f1; + x.ref() += model1In2_->Ff()*f1; } if (model2In1_.valid()) { - x() -= model2In1_->Ff()*f2; // note : subtraction + x.ref() -= model2In1_->Ff()*f2; // note : subtraction } if @@ -475,7 +475,7 @@ Foam::BlendedInterfacialModel::Ff() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -518,15 +518,15 @@ Foam::BlendedInterfacialModel::D() const if (model_.valid()) { - x() += model_->D()*(scalar(1) - f1() - f2()); + x.ref() += model_->D()*(scalar(1) - f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->D()*f1; + x.ref() += model1In2_->D()*f1; } if (model2In1_.valid()) { - x() += model2In1_->D()*f2; + x.ref() += model2In1_->D()*f2; } if @@ -535,7 +535,7 @@ Foam::BlendedInterfacialModel::D() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C index 03c26c89dc..c63f6bfd44 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C @@ -218,7 +218,7 @@ Foam::HeatAndMassTransferPhaseSystem::dmdt { if (phase1 == &phase) { - tdmdt() += this->dmdt(pair); + tdmdt.ref() += this->dmdt(pair); } Swap(phase1, phase2); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index b737cd0322..6ca75c6ed4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,13 +112,13 @@ Foam::AnisothermalPhaseModel::heEqn() // Add the appropriate pressure-work term if (he.name() == this->thermo_->phasePropertyName("e")) { - tEEqn() += + tEEqn.ref() += fvc::ddt(alpha)*this->thermo().p() + fvc::div(alphaPhi, this->thermo().p()); } else if (this->thermo_->dpdt()) { - tEEqn() -= alpha*this->fluid().dpdt(); + tEEqn.ref() -= alpha*this->fluid().dpdt(); } return tEEqn; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index 4202907a2e..b9abe549a0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ Foam::tmp Foam::phaseSystem::calcPhi for (label phasei=1; phasei Foam::phaseSystem::rho() const for (label phasei=1; phasei Foam::phaseSystem::U() const for (label phasei=1; phaseirelax(); - fvOptions.constrain(EEqn()); + fvOptions.constrain(EEqn.ref()); EEqn->solve(); } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options index ec5ca1596d..5bdb4cea14 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseCompressibleTurbulenceModels/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I../multiphaseSystem/lnInclude \ -I../../phaseSystems/lnInclude \ -I../../interfacialModels/lnInclude\ diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index a9de2e6d55..b81e174db8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -477,7 +477,7 @@ Foam::tmp Foam::multiphaseSystem::K { tmp tnHatfv = nHatfv(phase1, phase2); - correctContactAngle(phase1, phase2, tnHatfv().boundaryField()); + correctContactAngle(phase1, phase2, tnHatfv.ref().boundaryField()); // Simple expression for curvature return -fvc::div(tnHatfv & mesh_.Sf()); @@ -568,7 +568,7 @@ Foam::tmp Foam::multiphaseSystem::surfaceTension if (cAlpha != cAlphas_.end()) { - tSurfaceTension() += + tSurfaceTension.ref() += fvc::interpolate(sigma(key12)*K(phase1, phase2)) *( fvc::interpolate(phase2)*fvc::snGrad(phase1) @@ -602,7 +602,7 @@ Foam::multiphaseSystem::nearInterface() const forAll(phases(), phasei) { - tnearInt() = max + tnearInt.ref() = max ( tnearInt(), pos(phases()[phasei] - 0.01)*pos(0.99 - phases()[phasei]) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H index 74e29d3df2..42e0fe70e4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H @@ -457,7 +457,7 @@ while (pimple.correct()) forAll(phases, phasei) { phaseModel& phase = phases[phasei]; - phase.rho()() += phase.thermo().psi()*(p_rgh - p_rgh_0); + phase.thermo().rho() += phase.thermo().psi()*(p_rgh - p_rgh_0); } // Correct p_rgh for consistency with p and the updated densities diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H index c0ca68835c..fec017ea30 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/setRDeltaT.H @@ -1,5 +1,5 @@ { - volScalarField& rDeltaT = trDeltaT(); + volScalarField& rDeltaT = trDeltaT.ref(); const dictionary& pimpleDict = pimple.dict(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H index 3060c444de..0ac8e84129 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H @@ -23,7 +23,7 @@ for (int Ecorr=0; Ecorrrelax(); - fvOptions.constrain(E1Eqn()); + fvOptions.constrain(E1Eqn.ref()); E1Eqn->solve(); } } @@ -43,7 +43,7 @@ for (int Ecorr=0; Ecorrrelax(); - fvOptions.constrain(E2eqn()); + fvOptions.constrain(E2eqn.ref()); E2eqn->solve(); } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H index d6ba189b12..104bc0047f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H @@ -261,8 +261,8 @@ while (pimple.correct()) ) ); - deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr()); - pEqnComp1().relax(); + deleteDemandDrivenData(pEqnComp1.ref().faceFluxCorrectionPtr()); + pEqnComp1.ref().relax(); } if (phase2.compressible()) @@ -286,8 +286,8 @@ while (pimple.correct()) + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) ) ); - deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr()); - pEqnComp2().relax(); + deleteDemandDrivenData(pEqnComp2.ref().faceFluxCorrectionPtr()); + pEqnComp2.ref().relax(); } } else @@ -317,7 +317,7 @@ while (pimple.correct()) { if (pEqnComp1.valid()) { - pEqnComp1() -= fluid.dmdt()/rho1; + pEqnComp1.ref() -= fluid.dmdt()/rho1; } else { @@ -326,7 +326,7 @@ while (pimple.correct()) if (pEqnComp2.valid()) { - pEqnComp2() += fluid.dmdt()/rho2; + pEqnComp2.ref() += fluid.dmdt()/rho2; } else { diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H index 57f491480e..d618226411 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H @@ -242,8 +242,8 @@ while (pimple.correct()) + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) ) ); - deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr()); - pEqnComp1().relax(); + deleteDemandDrivenData(pEqnComp1.ref().faceFluxCorrectionPtr()); + pEqnComp1.ref().relax(); } if (phase2.compressible()) @@ -261,8 +261,8 @@ while (pimple.correct()) + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) ) ); - deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr()); - pEqnComp2().relax(); + deleteDemandDrivenData(pEqnComp2.ref().faceFluxCorrectionPtr()); + pEqnComp2.ref().relax(); } } else @@ -292,7 +292,7 @@ while (pimple.correct()) { if (pEqnComp1.valid()) { - pEqnComp1() -= fluid.dmdt()/rho1; + pEqnComp1.ref() -= fluid.dmdt()/rho1; } else { @@ -301,7 +301,7 @@ while (pimple.correct()) if (pEqnComp2.valid()) { - pEqnComp2() += fluid.dmdt()/rho2; + pEqnComp2.ref() += fluid.dmdt()/rho2; } else { diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H index ff07dc4a32..4bef17a6bb 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaT.H @@ -1,5 +1,5 @@ { - volScalarField& rDeltaT = trDeltaT(); + volScalarField& rDeltaT = trDeltaT.ref(); const dictionary& pimpleDict = pimple.dict(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/options b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/options index 46e46e4599..3c3db948dd 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/options +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I../twoPhaseSystem/lnInclude \ -I../../phaseSystems/lnInclude \ -I../../interfacialModels/lnInclude\ diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C index 924f8209a4..4aac384117 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -299,7 +299,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() const scalarField liquidw(liquid.boundaryField()[patchi]); // Damp boiling at high void fractions. - const scalarField W(min(liquidw/0.2, scalar(0.1))); + const scalarField W(min(liquidw/0.2, scalar(1))); const scalarField A2(W*min(M_PI*sqr(Ddep)*N*Al/4, scalar(1))); const scalarField A1(max(1 - A2, scalar(1e-4))); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index 36e73662cd..597d15e7ff 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -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 @@ -284,7 +284,7 @@ void Foam::twoPhaseSystem::solve() if (tdgdt.valid()) { - scalarField& dgdt = tdgdt(); + scalarField& dgdt = tdgdt.ref(); forAll(dgdt, celli) { diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H index 2d4baf024a..c2621ae66a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H @@ -260,8 +260,8 @@ while (pimple.correct()) + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) ) ); - deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr()); - pEqnComp1().relax(); + deleteDemandDrivenData(pEqnComp1.ref().faceFluxCorrectionPtr()); + pEqnComp1.ref().relax(); pEqnComp2 = ( @@ -276,8 +276,8 @@ while (pimple.correct()) + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) ) ); - deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr()); - pEqnComp2().relax(); + deleteDemandDrivenData(pEqnComp2.ref().faceFluxCorrectionPtr()); + pEqnComp2.ref().relax(); } else { diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pUf/pEqn.H index 9fd243f275..63321bab7d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/pUf/pEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pUf/pEqn.H @@ -239,8 +239,8 @@ while (pimple.correct()) + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh) ) ); - deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr()); - pEqnComp1().relax(); + deleteDemandDrivenData(pEqnComp1.ref().faceFluxCorrectionPtr()); + pEqnComp1.ref().relax(); pEqnComp2 = ( @@ -255,8 +255,8 @@ while (pimple.correct()) + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh) ) ); - deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr()); - pEqnComp2().relax(); + deleteDemandDrivenData(pEqnComp2.ref().faceFluxCorrectionPtr()); + pEqnComp2.ref().relax(); } else { diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options index 58f3051b4d..84786bdc5d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I../twoPhaseSystem/lnInclude \ -I../interfacialModels/lnInclude\ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C index 1cac6d7176..1b2a492782 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C @@ -155,17 +155,17 @@ Foam::BlendedInterfacialModel::K() const if (model_.valid()) { - x() += model_->K()*(f1() - f2()); + x.ref() += model_->K()*(f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->K()*(1 - f1); + x.ref() += model1In2_->K()*(1 - f1); } if (model2In1_.valid()) { - x() += model2In1_->K()*f2; + x.ref() += model2In1_->K()*f2; } if @@ -174,7 +174,7 @@ Foam::BlendedInterfacialModel::K() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -223,17 +223,17 @@ Foam::BlendedInterfacialModel::Kf() const if (model_.valid()) { - x() += model_->Kf()*(f1() - f2()); + x.ref() += model_->Kf()*(f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->Kf()*(1 - f1); + x.ref() += model1In2_->Kf()*(1 - f1); } if (model2In1_.valid()) { - x() += model2In1_->Kf()*f2; + x.ref() += model2In1_->Kf()*f2; } if @@ -242,7 +242,7 @@ Foam::BlendedInterfacialModel::Kf() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -286,17 +286,17 @@ Foam::BlendedInterfacialModel::F() const if (model_.valid()) { - x() += model_->F()*(f1() - f2()); + x.ref() += model_->F()*(f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->F()*(1 - f1); + x.ref() += model1In2_->F()*(1 - f1); } if (model2In1_.valid()) { - x() -= model2In1_->F()*f2; // note : subtraction + x.ref() -= model2In1_->F()*f2; // note : subtraction } if @@ -305,7 +305,7 @@ Foam::BlendedInterfacialModel::F() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -354,17 +354,17 @@ Foam::BlendedInterfacialModel::Ff() const if (model_.valid()) { - x() += model_->Ff()*(f1() - f2()); + x.ref() += model_->Ff()*(f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->Ff()*(1 - f1); + x.ref() += model1In2_->Ff()*(1 - f1); } if (model2In1_.valid()) { - x() -= model2In1_->Ff()*f2; // note : subtraction + x.ref() -= model2In1_->Ff()*f2; // note : subtraction } if @@ -373,7 +373,7 @@ Foam::BlendedInterfacialModel::Ff() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; @@ -416,17 +416,17 @@ Foam::BlendedInterfacialModel::D() const if (model_.valid()) { - x() += model_->D()*(f1() - f2()); + x.ref() += model_->D()*(f1() - f2()); } if (model1In2_.valid()) { - x() += model1In2_->D()*(1 - f1); + x.ref() += model1In2_->D()*(1 - f1); } if (model2In1_.valid()) { - x() += model2In1_->D()*f2; + x.ref() += model2In1_->D()*f2; } if @@ -435,7 +435,7 @@ Foam::BlendedInterfacialModel::D() const && (model_.valid() || model1In2_.valid() || model2In1_.valid()) ) { - correctFixedFluxBCs(x()); + correctFixedFluxBCs(x.ref()); } return x; diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index 3659dcff38..ac12a39f4e 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -1150,7 +1150,7 @@ tmp calcOffset vectorField::subField fc = pp.faceCentres(); tmp toffsets(new pointField(fc.size())); - pointField& offsets = toffsets(); + pointField& offsets = toffsets.ref(); forAll(fc, i) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshToolsTemplates.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshToolsTemplates.C index 04abf8a943..143241f858 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshToolsTemplates.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMeshTools/DelaunayMeshToolsTemplates.C @@ -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 @@ -280,7 +280,7 @@ Foam::tmp Foam::DelaunayMeshTools::allPoints ) { tmp tpts(new pointField(t.vertexCount(), point::max)); - pointField& pts = tpts(); + pointField& pts = tpts.ref(); for ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C index 301e6b8074..24916fa50b 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C @@ -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 @@ -262,7 +262,7 @@ Foam::label Foam::cellShapeControlMesh::removePoints() Foam::tmp Foam::cellShapeControlMesh::cellCentres() const { tmp tcellCentres(new pointField(number_of_finite_cells())); - pointField& cellCentres = tcellCentres(); + pointField& cellCentres = tcellCentres.ref(); label count = 0; for diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C index 456f6be9c5..af208c587b 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C @@ -179,7 +179,7 @@ Foam::tmp Foam::smoothAlignmentSolver::buildAlignmentField ( new triadField(mesh.vertexCount(), triad::unset) ); - triadField& alignments = tAlignments(); + triadField& alignments = tAlignments.ref(); for ( @@ -211,7 +211,7 @@ Foam::tmp Foam::smoothAlignmentSolver::buildPointField ( new pointField(mesh.vertexCount(), point(GREAT, GREAT, GREAT)) ); - pointField& points = tPoints(); + pointField& points = tPoints.ref(); for ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C index 5a016d88fb..025ba5885d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C @@ -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 @@ -152,7 +152,7 @@ Foam::tmp Foam::automatic::load() ) ); - triSurfacePointScalarField& pointCellSize = tPointCellSize(); + triSurfacePointScalarField& pointCellSize = tPointCellSize.ref(); if (readCurvature_) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C index 805ad1196a..6d6b56e7b6 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/fieldFromFile/fieldFromFile.C @@ -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 @@ -95,7 +95,7 @@ Foam::tmp Foam::fieldFromFile::load() ) ); - pointCellSize() *= cellSizeMultipleCoeff_; + pointCellSize.ref() *= cellSizeMultipleCoeff_; return pointCellSize; } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C index 5c3bb699e2..16a18de191 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C @@ -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 @@ -105,7 +105,7 @@ Foam::searchableBoxFeatures::features() const edgeNormals[11][0] = 3; edgeNormals[11][1] = 0; tmp surfacePointsTmp(surface().points()); - pointField& surfacePoints = surfacePointsTmp(); + pointField& surfacePoints = surfacePointsTmp.ref(); forAll(edgeDirections, eI) { diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 65f1f25b45..b8e25e4f6c 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -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 @@ -84,7 +84,7 @@ tmp createScalarField zeroGradientFvPatchScalarField::typeName ) ); - volScalarField& fld = tfld(); + volScalarField& fld = tfld.ref(); forAll(fld, cellI) { diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 9494874c89..6697fbecfb 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -181,7 +181,7 @@ void subsetVolFields { if (addedPatches.found(patchI)) { - tSubFld().boundaryField()[patchI] == + tSubFld.ref().boundaryField()[patchI] == pTraits::zero; } } @@ -233,7 +233,7 @@ void subsetSurfaceFields { if (addedPatches.found(patchI)) { - tSubFld().boundaryField()[patchI] == + tSubFld.ref().boundaryField()[patchI] == pTraits::zero; } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C index e6a38a6cf6..612afc260a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C @@ -53,8 +53,8 @@ volField ( meshSubsetter.interpolate(vf) ); - tfld().checkOut(); - tfld().rename(vf.name()); + tfld.ref().checkOut(); + tfld.ref().rename(vf.name()); return tfld; } else @@ -729,7 +729,7 @@ void ensightField ( volPointInterpolation::New(vf.mesh()).interpolate(vf) ); - pfld().rename(vf.name()); + pfld.ref().rename(vf.name()); ensightPointField ( diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C index 86ccae2867..c3412a1faa 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C @@ -37,7 +37,7 @@ Foam::tmp> Foam::surfaceMeshWriter::getFaceField const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh(); tmp> tfld(new Field(pp_.size())); - Field& fld = tfld(); + Field& fld = tfld.ref(); forAll(pp_.addressing(), i) { diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H index d9d65a1201..f536ae04fa 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.H @@ -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 @@ -157,7 +157,7 @@ public: if (useSubMesh()) { tmp subFld = subsetter_.interpolate(fld); - subFld().rename(fld.name()); + subFld.ref().rename(fld.name()); return subFld; } else diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index 146878e272..2a6808776b 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -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 @@ -133,7 +133,7 @@ int main(int argc, char *argv[]) // Calculate nut - reference nut is calculated by the turbulence model // on its construction tmp tnut = turbulence->nut(); - volScalarField& nut = tnut(); + volScalarField& nut = tnut.ref(); volScalarField S(mag(dev(symm(fvc::grad(U))))); nut = (1 - mask)*nut + mask*sqr(kappa*min(y, ybl))*::sqrt(2)*S; @@ -151,7 +151,7 @@ int main(int argc, char *argv[]) // Turbulence k tmp tk = turbulence->k(); - volScalarField& k = tk(); + volScalarField& k = tk.ref(); scalar ck0 = pow025(Cmu)*kappa; k = (1 - mask)*k + mask*sqr(nut/(ck0*min(y, ybl))); @@ -165,7 +165,7 @@ int main(int argc, char *argv[]) // Turbulence epsilon tmp tepsilon = turbulence->epsilon(); - volScalarField& epsilon = tepsilon(); + volScalarField& epsilon = tepsilon.ref(); scalar ce0 = ::pow(Cmu, 0.75)/kappa; epsilon = (1 - mask)*epsilon + mask*ce0*k*sqrt(k)/min(y, ybl); diff --git a/applications/utilities/surface/surfaceLambdaMuSmooth/surfaceLambdaMuSmooth.C b/applications/utilities/surface/surfaceLambdaMuSmooth/surfaceLambdaMuSmooth.C index 6c1cf3cf7b..46bbfdf395 100644 --- a/applications/utilities/surface/surfaceLambdaMuSmooth/surfaceLambdaMuSmooth.C +++ b/applications/utilities/surface/surfaceLambdaMuSmooth/surfaceLambdaMuSmooth.C @@ -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 @@ -57,7 +57,7 @@ tmp avg const labelListList& pointEdges = s.pointEdges(); tmp tavg(new pointField(s.nPoints(), vector::zero)); - pointField& avg = tavg(); + pointField& avg = tavg.ref(); forAll(pointEdges, vertI) { diff --git a/src/OpenFOAM/Make/options b/src/OpenFOAM/Make/options index 9543b9ae27..b1cc1a2d10 100644 --- a/src/OpenFOAM/Make/options +++ b/src/OpenFOAM/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP -I$(OBJECTS_DIR) +EXE_INC = -I$(OBJECTS_DIR) LIB_LIBS = \ $(FOAM_LIBBIN)/libOSspecific.o \ diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C index c282ecb900..dc2a68de38 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C @@ -60,7 +60,7 @@ pow ) ); - pow(tPow().field(), df.field()); + pow(tPow.ref().field(), df.field()); return tPow; } @@ -86,7 +86,7 @@ pow pow(df.dimensions(), r) ); - pow(tPow().field(), df.field()); + pow(tPow.ref().field(), df.field()); tdf.clear(); @@ -114,7 +114,7 @@ sqr(const DimensionedField& df) ) ); - sqr(tSqr().field(), df.field()); + sqr(tSqr.ref().field(), df.field()); return tSqr; } @@ -135,7 +135,7 @@ sqr(const tmp>& tdf) sqr(df.dimensions()) ); - sqr(tSqr().field(), df.field()); + sqr(tSqr.ref().field(), df.field()); tdf.clear(); @@ -164,7 +164,7 @@ tmp> magSqr ) ); - magSqr(tMagSqr().field(), df.field()); + magSqr(tMagSqr.ref().field(), df.field()); return tMagSqr; } @@ -185,7 +185,7 @@ tmp> magSqr sqr(df.dimensions()) ); - magSqr(tMagSqr().field(), df.field()); + magSqr(tMagSqr.ref().field(), df.field()); tdf.clear(); @@ -214,7 +214,7 @@ tmp> mag ) ); - mag(tMag().field(), df.field()); + mag(tMag.ref().field(), df.field()); return tMag; } @@ -235,7 +235,7 @@ tmp> mag df.dimensions() ); - mag(tMag().field(), df.field()); + mag(tMag.ref().field(), df.field()); tdf.clear(); @@ -268,7 +268,7 @@ cmptAv(const DimensionedField& df) ) ); - cmptAv(CmptAv().field(), df.field()); + cmptAv(CmptAv.ref().field(), df.field()); return CmptAv; } @@ -294,7 +294,7 @@ cmptAv(const tmp>& tdf) df.dimensions() ); - cmptAv(CmptAv().field(), df.field()); + cmptAv(CmptAv.ref().field(), df.field()); tdf.clear(); diff --git a/src/OpenFOAM/memory/tmp/tmp.H b/src/OpenFOAM/memory/tmp/tmp.H index 4b320d8e05..9afb78bcfe 100644 --- a/src/OpenFOAM/memory/tmp/tmp.H +++ b/src/OpenFOAM/memory/tmp/tmp.H @@ -128,7 +128,7 @@ public: // Member operators - #ifndef CONST_TMP + #ifdef NON_CONST_TMP //- Deprecated non-const dereference operator. // Use ref() where non-const access is required inline T& operator()(); diff --git a/src/OpenFOAM/memory/tmp/tmpI.H b/src/OpenFOAM/memory/tmp/tmpI.H index 5c96220048..819c471428 100644 --- a/src/OpenFOAM/memory/tmp/tmpI.H +++ b/src/OpenFOAM/memory/tmp/tmpI.H @@ -217,7 +217,7 @@ inline void Foam::tmp::clear() const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -#ifndef CONST_TMP +#ifdef NON_CONST_TMP template inline T& Foam::tmp::operator()() { diff --git a/src/TurbulenceModels/compressible/Make/options b/src/TurbulenceModels/compressible/Make/options index a6401963fd..4a6578d628 100644 --- a/src/TurbulenceModels/compressible/Make/options +++ b/src/TurbulenceModels/compressible/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I../turbulenceModels/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ diff --git a/src/TurbulenceModels/incompressible/Make/options b/src/TurbulenceModels/incompressible/Make/options index cf54ffd963..c44e9ae61c 100644 --- a/src/TurbulenceModels/incompressible/Make/options +++ b/src/TurbulenceModels/incompressible/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I../turbulenceModels/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/src/TurbulenceModels/turbulenceModels/Make/options b/src/TurbulenceModels/turbulenceModels/Make/options index bcd627471b..a3ae8da833 100644 --- a/src/TurbulenceModels/turbulenceModels/Make/options +++ b/src/TurbulenceModels/turbulenceModels/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/src/combustionModels/Make/options b/src/combustionModels/Make/options index d1ee86bab4..e660ccd9f6 100644 --- a/src/combustionModels/Make/options +++ b/src/combustionModels/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ diff --git a/src/conversion/Make/options b/src/conversion/Make/options index ace5a3133b..4ff461186c 100644 --- a/src/conversion/Make/options +++ b/src/conversion/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/src/dynamicFvMesh/Make/options b/src/dynamicFvMesh/Make/options index 3cee7d2a3c..966b56964d 100644 --- a/src/dynamicFvMesh/Make/options +++ b/src/dynamicFvMesh/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ diff --git a/src/dynamicMesh/Make/options b/src/dynamicMesh/Make/options index 5725e0f867..0757c29678 100644 --- a/src/dynamicMesh/Make/options +++ b/src/dynamicMesh/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \ diff --git a/src/engine/Make/options b/src/engine/Make/options index f16d25abf1..0929e2bc8f 100644 --- a/src/engine/Make/options +++ b/src/engine/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ diff --git a/src/finiteVolume/Make/options b/src/finiteVolume/Make/options index 25eb0cc6f8..1c1990e5f3 100644 --- a/src/finiteVolume/Make/options +++ b/src/finiteVolume/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C index b02f92354f..46a3f5db9d 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C +++ b/src/finiteVolume/finiteVolume/fvm/fvmD2dt2.C @@ -51,7 +51,7 @@ d2dt2 ( vf.mesh(), vf.mesh().d2dt2Scheme("d2dt2(" + vf.name() + ')') - )().fvmD2dt2(vf); + ).ref().fvmD2dt2(vf); } @@ -67,7 +67,7 @@ d2dt2 ( vf.mesh(), vf.mesh().d2dt2Scheme("d2dt2(" + rho.name() + ',' + vf.name() + ')') - )().fvmD2dt2(rho, vf); + ).ref().fvmD2dt2(rho, vf); } @@ -83,7 +83,7 @@ d2dt2 ( vf.mesh(), vf.mesh().d2dt2Scheme("d2dt2(" + rho.name() + ',' + vf.name() + ')') - )().fvmD2dt2(rho, vf); + ).ref().fvmD2dt2(rho, vf); } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 91d7384f55..799b5d2198 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -1401,7 +1401,7 @@ Foam::tmp> Foam::correction && A.psi().mesh().fluxRequired(A.psi().name()) ) { - tAcorr().faceFluxCorrectionPtr() = (-A.flux()).ptr(); + tAcorr.ref().faceFluxCorrectionPtr() = (-A.flux()).ptr(); } return tAcorr; diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C index 33255e5c14..7f3923aef8 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C @@ -406,7 +406,7 @@ fvMeshSubset::interpolate patchFields ) ); - GeometricField& resF = tresF(); + GeometricField& resF = tresF.ref(); // 2. Change the pointPatchFields to the correct type using a mapper diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C index 186fe7d500..171e47ecd4 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C @@ -77,7 +77,7 @@ tmp> singleCellFvMesh::interpolate patchFields ) ); - GeometricField& resF = tresF(); + GeometricField& resF = tresF.ref(); // 2. Change the fvPatchFields to the correct type using a mapper diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options b/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options index 63d132ca50..93a7e01542 100644 --- a/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options +++ b/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/OpenFOAM/lnInclude diff --git a/src/fvMotionSolver/Make/options b/src/fvMotionSolver/Make/options index e0b34247ad..29e4469610 100644 --- a/src/fvMotionSolver/Make/options +++ b/src/fvMotionSolver/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ diff --git a/src/fvOptions/Make/options b/src/fvOptions/Make/options index 5598b4ef20..124084c057 100644 --- a/src/fvOptions/Make/options +++ b/src/fvOptions/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ diff --git a/src/genericPatchFields/Make/options b/src/genericPatchFields/Make/options index 287318da1f..71b7873964 100644 --- a/src/genericPatchFields/Make/options +++ b/src/genericPatchFields/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ diff --git a/src/lagrangian/DSMC/Make/options b/src/lagrangian/DSMC/Make/options index 4f10470b16..55865dfabc 100644 --- a/src/lagrangian/DSMC/Make/options +++ b/src/lagrangian/DSMC/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/src/lagrangian/basic/Make/options b/src/lagrangian/basic/Make/options index 4670e80487..f7d9a36f3b 100644 --- a/src/lagrangian/basic/Make/options +++ b/src/lagrangian/basic/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/src/lagrangian/coalCombustion/Make/options b/src/lagrangian/coalCombustion/Make/options index 9c78fa29f7..04b133ba05 100644 --- a/src/lagrangian/coalCombustion/Make/options +++ b/src/lagrangian/coalCombustion/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ diff --git a/src/lagrangian/distributionModels/Make/options b/src/lagrangian/distributionModels/Make/options index ccd5450e02..41306609f2 100644 --- a/src/lagrangian/distributionModels/Make/options +++ b/src/lagrangian/distributionModels/Make/options @@ -1 +1 @@ -EXE_INC = -DCONST_TMP +EXE_INC = diff --git a/src/lagrangian/intermediate/Make/options b/src/lagrangian/intermediate/Make/options index 18eeb81970..a5a3b3c8eb 100644 --- a/src/lagrangian/intermediate/Make/options +++ b/src/lagrangian/intermediate/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ diff --git a/src/lagrangian/molecularDynamics/molecule/Make/options b/src/lagrangian/molecularDynamics/molecule/Make/options index 6ccac8015b..de95d1b75b 100644 --- a/src/lagrangian/molecularDynamics/molecule/Make/options +++ b/src/lagrangian/molecularDynamics/molecule/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ diff --git a/src/lagrangian/solidParticle/Make/options b/src/lagrangian/solidParticle/Make/options index 5cf0265987..9fe79c9220 100644 --- a/src/lagrangian/solidParticle/Make/options +++ b/src/lagrangian/solidParticle/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude diff --git a/src/lagrangian/spray/Make/options b/src/lagrangian/spray/Make/options index d5eb8a74c5..3b5a4e72e9 100644 --- a/src/lagrangian/spray/Make/options +++ b/src/lagrangian/spray/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ diff --git a/src/lagrangian/turbulence/Make/options b/src/lagrangian/turbulence/Make/options index 67f1b6608c..7b2fc4bea8 100644 --- a/src/lagrangian/turbulence/Make/options +++ b/src/lagrangian/turbulence/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ diff --git a/src/mesh/autoMesh/Make/options b/src/mesh/autoMesh/Make/options index 78bd91e593..d37a26a9dd 100644 --- a/src/mesh/autoMesh/Make/options +++ b/src/mesh/autoMesh/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/parallel/decompose/decompositionMethods/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/src/mesh/blockMesh/Make/options b/src/mesh/blockMesh/Make/options index d398d1687f..1618ab57ec 100644 --- a/src/mesh/blockMesh/Make/options +++ b/src/mesh/blockMesh/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude diff --git a/src/mesh/extrudeModel/Make/options b/src/mesh/extrudeModel/Make/options index 92abbacf67..eabd0b53a8 100644 --- a/src/mesh/extrudeModel/Make/options +++ b/src/mesh/extrudeModel/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude diff --git a/src/meshTools/Make/options b/src/meshTools/Make/options index 2f8d1a7b47..1713152e9e 100644 --- a/src/meshTools/Make/options +++ b/src/meshTools/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude diff --git a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C index 24a3b377da..65875e91fb 100644 --- a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C +++ b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C @@ -76,7 +76,7 @@ Foam::fvFieldDecomposer::decomposeField patchFields ) ); - GeometricField& resF = tresF(); + GeometricField& resF = tresF.ref(); // 2. Change the fvPatchFields to the correct type using a mapper @@ -246,7 +246,7 @@ Foam::fvFieldDecomposer::decomposeField patchFields ) ); - GeometricField& resF = tresF(); + GeometricField& resF = tresF.ref(); // 2. Change the fvsPatchFields to the correct type using a mapper diff --git a/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C b/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C index 1fb0a26ac0..960a65d76a 100644 --- a/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C +++ b/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C @@ -55,7 +55,7 @@ Foam::tmp> Foam::reconstructLagrangianField Field(0) ) ); - Field& field = tfield(); + Field& field = tfield.ref(); forAll(meshes, i) { @@ -115,7 +115,7 @@ Foam::reconstructLagrangianFieldField Field>(0) ) ); - Field>& field = tfield(); + Field>& field = tfield.ref(); forAll(meshes, i) { diff --git a/src/postProcessing/functionObjects/field/Make/options b/src/postProcessing/functionObjects/field/Make/options index 583c538b9e..0732822dba 100644 --- a/src/postProcessing/functionObjects/field/Make/options +++ b/src/postProcessing/functionObjects/field/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ diff --git a/src/postProcessing/functionObjects/utilities/Make/options b/src/postProcessing/functionObjects/utilities/Make/options index f50a857be2..ad4e27c196 100644 --- a/src/postProcessing/functionObjects/utilities/Make/options +++ b/src/postProcessing/functionObjects/utilities/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/DSMC/lnInclude \ -I$(LIB_SRC)/transportModels \ diff --git a/src/randomProcesses/Make/options b/src/randomProcesses/Make/options index 287318da1f..71b7873964 100644 --- a/src/randomProcesses/Make/options +++ b/src/randomProcesses/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ diff --git a/src/regionCoupled/Make/options b/src/regionCoupled/Make/options index 21a2486c48..a9753c5115 100644 --- a/src/regionCoupled/Make/options +++ b/src/regionCoupled/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ diff --git a/src/regionModels/regionModel/Make/options b/src/regionModels/regionModel/Make/options index bcd627471b..a3ae8da833 100644 --- a/src/regionModels/regionModel/Make/options +++ b/src/regionModels/regionModel/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude diff --git a/src/regionModels/surfaceFilmModels/Make/options b/src/regionModels/surfaceFilmModels/Make/options index 0cd68b47e8..a0eb4828ea 100644 --- a/src/regionModels/surfaceFilmModels/Make/options +++ b/src/regionModels/surfaceFilmModels/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ diff --git a/src/sampling/Make/options b/src/sampling/Make/options index 15ca6b932f..23e6bc81a7 100644 --- a/src/sampling/Make/options +++ b/src/sampling/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \ diff --git a/src/sixDoFRigidBodyMotion/Make/options b/src/sixDoFRigidBodyMotion/Make/options index fd1f401690..f2367d2e1d 100644 --- a/src/sixDoFRigidBodyMotion/Make/options +++ b/src/sixDoFRigidBodyMotion/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/postProcessing/functionObjects/forces/lnInclude \ diff --git a/src/surfMesh/Make/options b/src/surfMesh/Make/options index 079607db05..7e207d0dbe 100644 --- a/src/surfMesh/Make/options +++ b/src/surfMesh/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/fileFormats/lnInclude LIB_LIBS = \ diff --git a/src/thermophysicalModels/SLGThermo/Make/options b/src/thermophysicalModels/SLGThermo/Make/options index 3dac244d79..c4f0b2a8a9 100644 --- a/src/thermophysicalModels/SLGThermo/Make/options +++ b/src/thermophysicalModels/SLGThermo/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/Make/options b/src/thermophysicalModels/barotropicCompressibilityModel/Make/options index 287318da1f..71b7873964 100644 --- a/src/thermophysicalModels/barotropicCompressibilityModel/Make/options +++ b/src/thermophysicalModels/barotropicCompressibilityModel/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ diff --git a/src/thermophysicalModels/basic/Make/options b/src/thermophysicalModels/basic/Make/options index 95f178b455..b5c859baf1 100644 --- a/src/thermophysicalModels/basic/Make/options +++ b/src/thermophysicalModels/basic/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/src/thermophysicalModels/chemistryModel/Make/options b/src/thermophysicalModels/chemistryModel/Make/options index 7a1e7f43d2..de52d7e6ae 100644 --- a/src/thermophysicalModels/chemistryModel/Make/options +++ b/src/thermophysicalModels/chemistryModel/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ diff --git a/src/thermophysicalModels/laminarFlameSpeed/Make/options b/src/thermophysicalModels/laminarFlameSpeed/Make/options index 925d4a58aa..f97edb8458 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Make/options +++ b/src/thermophysicalModels/laminarFlameSpeed/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ diff --git a/src/thermophysicalModels/properties/liquidMixtureProperties/Make/options b/src/thermophysicalModels/properties/liquidMixtureProperties/Make/options index 690761730f..6e1d19dbb6 100644 --- a/src/thermophysicalModels/properties/liquidMixtureProperties/Make/options +++ b/src/thermophysicalModels/properties/liquidMixtureProperties/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \ diff --git a/src/thermophysicalModels/properties/liquidProperties/Make/options b/src/thermophysicalModels/properties/liquidProperties/Make/options index e1fbd3ed45..b964b61294 100644 --- a/src/thermophysicalModels/properties/liquidProperties/Make/options +++ b/src/thermophysicalModels/properties/liquidProperties/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude LIB_LIBS = \ diff --git a/src/thermophysicalModels/properties/solidMixtureProperties/Make/options b/src/thermophysicalModels/properties/solidMixtureProperties/Make/options index 97cc509212..f2d8f809d5 100644 --- a/src/thermophysicalModels/properties/solidMixtureProperties/Make/options +++ b/src/thermophysicalModels/properties/solidMixtureProperties/Make/options @@ -1,3 +1,3 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I${LIB_SRC}/thermophysicalModels/properties/solidProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude diff --git a/src/thermophysicalModels/properties/solidProperties/Make/options b/src/thermophysicalModels/properties/solidProperties/Make/options index f8779f538f..848cce789f 100644 --- a/src/thermophysicalModels/properties/solidProperties/Make/options +++ b/src/thermophysicalModels/properties/solidProperties/Make/options @@ -1,2 +1,2 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude diff --git a/src/thermophysicalModels/radiation/Make/options b/src/thermophysicalModels/radiation/Make/options index ea189b0b63..726b76e764 100644 --- a/src/thermophysicalModels/radiation/Make/options +++ b/src/thermophysicalModels/radiation/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ diff --git a/src/thermophysicalModels/reactionThermo/Make/options b/src/thermophysicalModels/reactionThermo/Make/options index bded2d7118..f59f44fc8d 100644 --- a/src/thermophysicalModels/reactionThermo/Make/options +++ b/src/thermophysicalModels/reactionThermo/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ diff --git a/src/thermophysicalModels/solidChemistryModel/Make/options b/src/thermophysicalModels/solidChemistryModel/Make/options index e922aa724f..e871169b17 100644 --- a/src/thermophysicalModels/solidChemistryModel/Make/options +++ b/src/thermophysicalModels/solidChemistryModel/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude \ diff --git a/src/thermophysicalModels/solidSpecie/Make/options b/src/thermophysicalModels/solidSpecie/Make/options index 85a93d1d17..bdc8b074c0 100644 --- a/src/thermophysicalModels/solidSpecie/Make/options +++ b/src/thermophysicalModels/solidSpecie/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude LIB_LIBS = \ diff --git a/src/thermophysicalModels/solidThermo/Make/options b/src/thermophysicalModels/solidThermo/Make/options index c84b6c5546..d3e1cb87ce 100644 --- a/src/thermophysicalModels/solidThermo/Make/options +++ b/src/thermophysicalModels/solidThermo/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ diff --git a/src/topoChangerFvMesh/Make/options b/src/topoChangerFvMesh/Make/options index 82165ae6e5..44753e64c9 100644 --- a/src/topoChangerFvMesh/Make/options +++ b/src/topoChangerFvMesh/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ diff --git a/src/transportModels/compressible/Make/options b/src/transportModels/compressible/Make/options index 287318da1f..71b7873964 100644 --- a/src/transportModels/compressible/Make/options +++ b/src/transportModels/compressible/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ diff --git a/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/Make/options b/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/Make/options index 138dcbf7f5..4ae2fbf966 100644 --- a/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/Make/options +++ b/src/transportModels/immiscibleIncompressibleTwoPhaseMixture/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I.. \ -I../incompressible/lnInclude \ -I../interfaceProperties/lnInclude \ diff --git a/src/transportModels/incompressible/Make/options b/src/transportModels/incompressible/Make/options index c55a98a0b6..46aa26d4ad 100644 --- a/src/transportModels/incompressible/Make/options +++ b/src/transportModels/incompressible/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I.. \ -I../twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ diff --git a/src/transportModels/interfaceProperties/Make/options b/src/transportModels/interfaceProperties/Make/options index efbf1b41ca..cc63db7dcc 100644 --- a/src/transportModels/interfaceProperties/Make/options +++ b/src/transportModels/interfaceProperties/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/src/transportModels/twoPhaseMixture/Make/options b/src/transportModels/twoPhaseMixture/Make/options index 287318da1f..71b7873964 100644 --- a/src/transportModels/twoPhaseMixture/Make/options +++ b/src/transportModels/twoPhaseMixture/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ diff --git a/src/transportModels/twoPhaseProperties/Make/options b/src/transportModels/twoPhaseProperties/Make/options index 547d45694c..32ce36b959 100644 --- a/src/transportModels/twoPhaseProperties/Make/options +++ b/src/transportModels/twoPhaseProperties/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude diff --git a/src/triSurface/Make/options b/src/triSurface/Make/options index 948c54f756..9ee5884e59 100644 --- a/src/triSurface/Make/options +++ b/src/triSurface/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -DCONST_TMP \ +EXE_INC = \ -I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude