From cd852be3da95f867689570ee8b04ff48a50659c7 Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
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 fe96d0bfe7b..45050a171b6 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::volScalarField> Foam::XiGModels::basicSubGrid::G() const
     const volScalarField& Lobs = db.lookupObject<volScalarField>("Lobs");
 
     tmp<volScalarField> 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 7454b2f7eec..0de82a82e4c 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::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
         )
     );
 
-    volSymmTensorField& DragDcu = tDragDcu();
+    volSymmTensorField& DragDcu = tDragDcu.ref();
 
     if (on_)
     {
@@ -147,7 +147,7 @@ Foam::tmp<Foam::volScalarField> 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 ebc92684a44..afe97f7f7f3 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 ad8452f5a43..0208818ee00 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::volScalarField> 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 59f5c81bd34..a84aca32108 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 d4d77822878..fd07b0b3cbf 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::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, celli)
     {
@@ -306,7 +306,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
         )
     );
 
-    volScalarField& Su0 = tSu0();
+    volScalarField& Su0 = tSu0.ref();
 
     forAll(Su0, celli)
     {
@@ -358,7 +358,7 @@ Foam::tmp<Foam::volScalarField> 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 907c9934e2b..e4caa1cea4a 100644
--- a/applications/solvers/combustion/reactingFoam/UEqn.H
+++ b/applications/solvers/combustion/reactingFoam/UEqn.H
@@ -2,7 +2,7 @@
 
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(rho, U) + fvm::div(phi, U)
   + MRF.DDt(rho, U)
@@ -10,14 +10,15 @@ tmp<fvVectorMatrix> 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 ae5478c5b6e..f5b71412247 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 8bef07a5bbb..bf8eb899aff 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 cd191534625..3d02c63381e 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 b84be5a66d9..12bdceb7e52 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 7d361ac9f84..bc94840d1f3 100644
--- a/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H
+++ b/applications/solvers/compressible/rhoCentralFoam/directionInterpolate.H
@@ -22,7 +22,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
         )
     );
 
-    GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsf();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& 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 e469bafa346..806ddd38324 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 907c9934e2b..e4caa1cea4a 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(rho, U) + fvm::div(phi, U)
   + MRF.DDt(rho, U)
@@ -10,14 +10,15 @@ tmp<fvVectorMatrix> 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 ae5478c5b6e..f5b71412247 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 8bef07a5bbb..bf8eb899aff 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 615682db12d..4abc5cd4aad 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 30a3908b05c..ba2db0d04a4 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 396b923494c..a6f410250bd 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/UEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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 4c6276711c1..b085a2b9d1c 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 7b77048a999..51b38651657 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 fcb8f713d6a..3ec153c5679 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<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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<volTensorField> tTU = tensor(I)*UEqn().A();
-        pZones.addResistance(UEqn(), tTU());
+        tmp<volTensorField> 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<nUCorr; UCorr++)
         {
-            U = trTU() & (UEqn().H() - gradp);
+            U = trTU() & (UEqn.H() - gradp);
         }
         U.correctBoundaryConditions();
 
@@ -41,14 +42,14 @@
     }
     else
     {
-        pZones.addResistance(UEqn());
+        pZones.addResistance(UEqn);
 
-        fvOptions.constrain(UEqn());
+        fvOptions.constrain(UEqn);
 
-        solve(UEqn() == -fvc::grad(p));
+        solve(UEqn == -fvc::grad(p));
 
         fvOptions.correct(U);
 
-        trAU = 1.0/UEqn().A();
-        trAU().rename("rAU");
+        trAU = 1.0/UEqn.A();
+        trAU.ref().rename("rAU");
     }
diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H
index d54f7eec248..b586cd15c0d 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H
@@ -4,15 +4,15 @@
     tmp<volVectorField> 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 72bf78c7fb1..d8a347f87d7 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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 13200035d85..7df0ac46d29 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 04796b47543..1a47d06a8e8 100644
--- a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H
+++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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 132e440bcd2..a744b9d19fb 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 b65ef6bfdb2..ed0402c2d02 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<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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 341de6b13e9..3fdadc042a2 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 563ad65eba2..a12d0e81467 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<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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 0b82c440686..358535efe97 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 49fd39e45b7..30a670768ff 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<fvScalarMatrix> 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 fbd8e5f1507..cdc1616e2b4 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<fvVectorMatrix> UEqn
+            tmp<fvVectorMatrix> 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<fvVectorMatrix> UaEqn
+            tmp<fvVectorMatrix> 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 5aa6cef0b14..0d55edd5a08 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<fvVectorMatrix> UrelEqn
+    tmp<fvVectorMatrix> 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 0e3936bc5d7..aaeb12ae067 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<volScalarField> 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 880c0066e36..1a6b404885a 100644
--- a/applications/solvers/incompressible/pimpleFoam/UEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(U) + fvm::div(phi, U)
   + MRF.DDt(U)
@@ -10,14 +10,15 @@ tmp<fvVectorMatrix> 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 6d4eb903347..ffce1373263 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<volScalarField> 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 f4106997c60..452f13fb1f1 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<volScalarField> 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 75df41d00b6..6a2070eb4e4 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<fvVectorMatrix> UrelEqn
+    tmp<fvVectorMatrix> 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 636a4c571de..9982ddf5467 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 12b56216366..31c081792c1 100644
--- a/applications/solvers/incompressible/simpleFoam/UEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/UEqn.H
@@ -2,7 +2,7 @@
 
     MRF.correctBoundaryVelocity(U);
 
-    tmp<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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 b506bf43cfe..5d5dde848c7 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 035b83ebd1b..e2c9917d5ae 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<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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<volTensorField> tTU = tensor(I)*UEqn().A();
-        pZones.addResistance(UEqn(), tTU());
+        tmp<volTensorField> 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<nUCorr; UCorr++)
         {
-            U = trTU() & (UEqn().H() - gradp);
+            U = trTU() & (UEqn.H() - gradp);
         }
         U.correctBoundaryConditions();
 
@@ -41,14 +42,14 @@
     }
     else
     {
-        pZones.addResistance(UEqn());
+        pZones.addResistance(UEqn);
 
-        fvOptions.constrain(UEqn());
+        fvOptions.constrain(UEqn);
 
-        solve(UEqn() == -fvc::grad(p));
+        solve(UEqn == -fvc::grad(p));
 
         fvOptions.correct(U);
 
-        trAU = 1.0/UEqn().A();
-        trAU().rename("rAU");
+        trAU = 1.0/UEqn.A();
+        trAU.ref().rename("rAU");
     }
diff --git a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H
index e4ad23aabc2..68bdcc77e0e 100644
--- a/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H
+++ b/applications/solvers/incompressible/simpleFoam/porousSimpleFoam/pEqn.H
@@ -1,15 +1,15 @@
 tmp<volVectorField> 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 bd9cbcb6133..902afe59e4f 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 1c7d7cb5e29..65b0388e12d 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 d599d491f83..f51eeb49bf3 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 2f5a74d45b0..86cf5362f81 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<fvVectorMatrix> UEqn
+    tmp<fvVectorMatrix> 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 aa775bc0d0f..9b48bb939df 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 c26bf1cf65e..97a83f7d5b6 100644
--- a/applications/solvers/lagrangian/sprayFoam/UEqn.H
+++ b/applications/solvers/lagrangian/sprayFoam/UEqn.H
@@ -2,7 +2,7 @@
 
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(rho, U) + fvm::div(phi, U)
   + MRF.DDt(rho, U)
@@ -12,14 +12,15 @@ tmp<fvVectorMatrix> 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 5d28412683f..1447f5b6be5 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 406128feed6..8522e609185 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 e1ac1288101..c326215512e 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 fb23042a87c..a0a91c32554 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 5730273383f..14bbbe87086 100644
--- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C
+++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C
@@ -190,7 +190,7 @@ Foam::tmp<Foam::volScalarField> 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::scalarField> 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::scalarField> 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::volScalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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::scalarField> 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::volScalarField> 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<phaseModel>, phases_, phase1)
     {
@@ -922,7 +923,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureThermo::K
 {
     tmp<surfaceVectorField> 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<phaseModel>, 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 ccf4bc9794e..26ffef825a5 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 68f027cd246..3938fde30f0 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 055aac39669..9d6dd2dc18b 100644
--- a/applications/solvers/multiphase/interFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/interFoam/alphaEqn.H
@@ -32,7 +32,8 @@
         }
 
         ocCoeff =
-            refCast<fv::CrankNicolsonDdtScheme<scalar>>(ddtAlpha()).ocCoeff();
+            refCast<const fv::CrankNicolsonDdtScheme<scalar>>(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<surfaceScalarField> 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 01bb8aa411c..dd0e6a4da45 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 9cc90a9ebe4..150ccd1f787 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 6755e96ecb3..27a5067edd7 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
@@ -372,7 +372,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::K
 {
     tmp<surfaceVectorField> 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::volScalarField> Foam::multiphaseSystem::rho() const
     PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
 
     tmp<volScalarField> 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<phaseModel>::const_iterator iter = phases_.begin();
 
     tmp<scalarField> 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::volScalarField> Foam::multiphaseSystem::nu() const
     PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
 
     tmp<volScalarField> 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<scalarField> 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::volScalarField> 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::volScalarField> 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::volVectorField> 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::volVectorField> 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::volVectorField> Foam::multiphaseSystem::Svm
             )
         )
         {
-            tSvm().boundaryField()[patchi] = vector::zero;
+            tSvm.ref().boundaryField()[patchi] = vector::zero;
         }
     }
 
@@ -772,7 +776,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::dragCoeff
          || &phase == &dmIter()->phase2()
         )
         {
-            tdragCoeff() += *dcIter();
+            tdragCoeff.ref() += *dcIter();
         }
     }
 
@@ -818,7 +822,7 @@ Foam::tmp<Foam::surfaceScalarField> 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<phaseModel>, 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 27f0f51c351..ea08ba29865 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<phase>::const_iterator iter = phases_.begin();
 
     tmp<volScalarField> 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<phase>::const_iterator iter = phases_.begin();
 
     tmp<scalarField> 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<phase>::const_iterator iter = phases_.begin();
 
     tmp<volScalarField> 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<surfaceScalarField> 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<phase>, phases_, iter1)
     {
@@ -518,7 +523,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K
 {
     tmp<surfaceVectorField> 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<phase>, 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 794c0aca520..421e45ae7da 100644
--- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H
+++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H
@@ -1,6 +1,6 @@
 MRF.correctBoundaryVelocity(U);
 
-tmp<fvVectorMatrix> UEqn
+tmp<fvVectorMatrix> tUEqn
 (
     fvm::ddt(U) + fvm::div(phi, U)
   + MRF.DDt(U)
@@ -8,14 +8,15 @@ tmp<fvVectorMatrix> 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 e182350114a..7d4c5f9039d 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 04b187cf850..a74f6c2664b 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 5fd646c5cee..ff5d3e5a6ed 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<Thermo, OtherThermo>::D
         )
     );
 
-    volScalarField& D(tmpD());
+    volScalarField& D(tmpD.ref());
 
     forAll(p, cellI)
     {
@@ -207,7 +207,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::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 886fefe8e89..a2fbcd0bbcc 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 fb755c63471..c17b649212c 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::volVectorField> Foam::wallLubricationModel::zeroGradWalls
     tmp<volVectorField> 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 3cb567273f3..78eb01cf1c3 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<ModelType>::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<ModelType>::K() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -259,15 +259,15 @@ Foam::BlendedInterfacialModel<ModelType>::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<ModelType>::K(const scalar residualAlpha) const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -325,17 +325,17 @@ Foam::BlendedInterfacialModel<ModelType>::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<ModelType>::Kf() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -388,17 +388,17 @@ Foam::BlendedInterfacialModel<ModelType>::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<ModelType>::F() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -456,17 +456,17 @@ Foam::BlendedInterfacialModel<ModelType>::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<ModelType>::Ff() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -518,15 +518,15 @@ Foam::BlendedInterfacialModel<ModelType>::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<ModelType>::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 03c26c89dcb..c63f6bfd447 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<BasePhaseSystem>::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 b737cd03222..6ca75c6ed49 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<BasePhaseModel>::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 4202907a2e1..b9abe549a0b 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::surfaceScalarField> Foam::phaseSystem::calcPhi
 
     for (label phasei=1; phasei<phaseModels.size(); phasei++)
     {
-        tmpPhi() +=
+        tmpPhi.ref() +=
             fvc::interpolate(phaseModels[phasei])*phaseModels[phasei].phi();
     }
 
@@ -197,7 +197,7 @@ Foam::tmp<Foam::volScalarField> Foam::phaseSystem::rho() const
 
     for (label phasei=1; phasei<phaseModels_.size(); phasei++)
     {
-        tmpRho() += phaseModels_[phasei]*phaseModels_[phasei].rho();
+        tmpRho.ref() += phaseModels_[phasei]*phaseModels_[phasei].rho();
     }
 
     return tmpRho;
@@ -213,7 +213,7 @@ Foam::tmp<Foam::volVectorField> Foam::phaseSystem::U() const
 
     for (label phasei=1; phasei<phaseModels_.size(); phasei++)
     {
-        tmpU() += phaseModels_[phasei]*phaseModels_[phasei].U();
+        tmpU.ref() += phaseModels_[phasei]*phaseModels_[phasei].U();
     }
 
     return tmpU;
diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H
index 422f6324b1d..c1d98bcb439 100644
--- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H
+++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H
@@ -29,7 +29,7 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
             );
 
             EEqn->relax();
-            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 ec5ca1596d4..5bdb4cea140 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 a9de2e6d558..b81e174db87 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::volScalarField> Foam::multiphaseSystem::K
 {
     tmp<surfaceVectorField> 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::surfaceScalarField> 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 74e29d3df24..42e0fe70e49 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 c0ca68835ce..fec017ea304 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 3060c444de3..0ac8e841297 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; Ecorr<nEnergyCorrectors; Ecorr++)
             );
 
             E1Eqn->relax();
-            fvOptions.constrain(E1Eqn());
+            fvOptions.constrain(E1Eqn.ref());
             E1Eqn->solve();
         }
     }
@@ -43,7 +43,7 @@ for (int Ecorr=0; Ecorr<nEnergyCorrectors; Ecorr++)
             );
 
             E2eqn->relax();
-            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 d6ba189b129..104bc0047ff 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 57f491480e3..d618226411a 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 ff07dc4a322..4bef17a6bb4 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 46e46e45995..3c3db948dda 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 924f8209a4c..4aac3841178 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 36e73662cdc..597d15e7ff0 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 2d4baf024ac..c2621ae66af 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 9fd243f2758..63321bab7d8 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 58f3051b4d7..84786bdc5db 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 1cac6d7176b..1b2a4927825 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<modelType>::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<modelType>::K() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -223,17 +223,17 @@ Foam::BlendedInterfacialModel<modelType>::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<modelType>::Kf() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -286,17 +286,17 @@ Foam::BlendedInterfacialModel<modelType>::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<modelType>::F() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -354,17 +354,17 @@ Foam::BlendedInterfacialModel<modelType>::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<modelType>::Ff() const
      && (model_.valid() || model1In2_.valid() || model2In1_.valid())
     )
     {
-        correctFixedFluxBCs(x());
+        correctFixedFluxBCs(x.ref());
     }
 
     return x;
@@ -416,17 +416,17 @@ Foam::BlendedInterfacialModel<modelType>::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<modelType>::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 3659dcff385..ac12a39f4ef 100644
--- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
+++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
@@ -1150,7 +1150,7 @@ tmp<pointField> calcOffset
     vectorField::subField fc = pp.faceCentres();
 
     tmp<pointField> 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 04abf8a943d..143241f8583 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::pointField> Foam::DelaunayMeshTools::allPoints
 )
 {
     tmp<pointField> 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 301e6b8074e..24916fa50b3 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::pointField> Foam::cellShapeControlMesh::cellCentres() const
 {
     tmp<pointField> 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 456f6be9c5f..af208c587b7 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::triadField> Foam::smoothAlignmentSolver::buildAlignmentField
     (
         new triadField(mesh.vertexCount(), triad::unset)
     );
-    triadField& alignments = tAlignments();
+    triadField& alignments = tAlignments.ref();
 
     for
     (
@@ -211,7 +211,7 @@ Foam::tmp<Foam::pointField> 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 5a016d88fb7..025ba5885d9 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::triSurfacePointScalarField> 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 805ad1196ae..6d6b56e7b6c 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::triSurfacePointScalarField> 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 5c3bb699e2d..16a18de191d 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<pointField> 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 65f1f25b457..b8e25e4f6c5 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<volScalarField> 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 9494874c895..6697fbecfba 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<typename GeoField::value_type>::zero;
             }
         }
@@ -233,7 +233,7 @@ void subsetSurfaceFields
         {
             if (addedPatches.found(patchI))
             {
-                tSubFld().boundaryField()[patchI] ==
+                tSubFld.ref().boundaryField()[patchI] ==
                     pTraits<typename GeoField::value_type>::zero;
             }
         }
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
index e6a38a6cf6e..612afc260ad 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<Type>
         (
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
index 86ccae28675..c3412a1faa4 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
@@ -37,7 +37,7 @@ Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField
     const polyBoundaryMesh& patches = sfld.mesh().boundaryMesh();
 
     tmp<Field<Type>> tfld(new Field<Type>(pp_.size()));
-    Field<Type>& fld = tfld();
+    Field<Type>& 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 d9d65a12012..f536ae04fa2 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<GeoField> 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 146878e272d..2a6808776b5 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<volScalarField> 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<volScalarField> 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<volScalarField> 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 6c1cf3cf7b4..46bbfdf3952 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<pointField> avg
     const labelListList& pointEdges = s.pointEdges();
 
     tmp<pointField> 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 9543b9ae27b..b1cc1a2d10a 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 c282ecb900a..dc2a68de389 100644
--- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C
+++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldFunctions.C
@@ -60,7 +60,7 @@ pow
         )
     );
 
-    pow<Type, r, GeoMesh>(tPow().field(), df.field());
+    pow<Type, r, GeoMesh>(tPow.ref().field(), df.field());
 
     return tPow;
 }
@@ -86,7 +86,7 @@ pow
             pow(df.dimensions(), r)
         );
 
-    pow<Type, r, GeoMesh>(tPow().field(), df.field());
+    pow<Type, r, GeoMesh>(tPow.ref().field(), df.field());
 
     tdf.clear();
 
@@ -114,7 +114,7 @@ sqr(const DimensionedField<Type, GeoMesh>& df)
         )
     );
 
-    sqr(tSqr().field(), df.field());
+    sqr(tSqr.ref().field(), df.field());
 
     return tSqr;
 }
@@ -135,7 +135,7 @@ sqr(const tmp<DimensionedField<Type, GeoMesh>>& tdf)
             sqr(df.dimensions())
         );
 
-    sqr(tSqr().field(), df.field());
+    sqr(tSqr.ref().field(), df.field());
 
     tdf.clear();
 
@@ -164,7 +164,7 @@ tmp<DimensionedField<scalar, GeoMesh>> magSqr
         )
     );
 
-    magSqr(tMagSqr().field(), df.field());
+    magSqr(tMagSqr.ref().field(), df.field());
 
     return tMagSqr;
 }
@@ -185,7 +185,7 @@ tmp<DimensionedField<scalar, GeoMesh>> magSqr
             sqr(df.dimensions())
         );
 
-    magSqr(tMagSqr().field(), df.field());
+    magSqr(tMagSqr.ref().field(), df.field());
 
     tdf.clear();
 
@@ -214,7 +214,7 @@ tmp<DimensionedField<scalar, GeoMesh>> mag
         )
     );
 
-    mag(tMag().field(), df.field());
+    mag(tMag.ref().field(), df.field());
 
     return tMag;
 }
@@ -235,7 +235,7 @@ tmp<DimensionedField<scalar, GeoMesh>> mag
             df.dimensions()
         );
 
-    mag(tMag().field(), df.field());
+    mag(tMag.ref().field(), df.field());
 
     tdf.clear();
 
@@ -268,7 +268,7 @@ cmptAv(const DimensionedField<Type, GeoMesh>& df)
         )
     );
 
-    cmptAv(CmptAv().field(), df.field());
+    cmptAv(CmptAv.ref().field(), df.field());
 
     return CmptAv;
 }
@@ -294,7 +294,7 @@ cmptAv(const tmp<DimensionedField<Type, GeoMesh>>& 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 4b320d8e05d..9afb78bcfe8 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 5c962200487..819c4714284 100644
--- a/src/OpenFOAM/memory/tmp/tmpI.H
+++ b/src/OpenFOAM/memory/tmp/tmpI.H
@@ -217,7 +217,7 @@ inline void Foam::tmp<T>::clear() const
 
 // * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
 
-#ifndef CONST_TMP
+#ifdef NON_CONST_TMP
 template<class T>
 inline T& Foam::tmp<T>::operator()()
 {
diff --git a/src/TurbulenceModels/compressible/Make/options b/src/TurbulenceModels/compressible/Make/options
index a6401963fd1..4a6578d6285 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 cf54ffd963b..c44e9ae61c9 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 bcd627471b9..a3ae8da8331 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 d1ee86bab4b..e660ccd9f61 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 ace5a3133b7..4ff461186cc 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 3cee7d2a3c4..966b56964d7 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 5725e0f8671..0757c296783 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 f16d25abf15..0929e2bc8f1 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 25eb0cc6f8f..1c1990e5f3e 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 b02f92354f7..46a3f5db9d9 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 91d7384f552..799b5d21988 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C
@@ -1401,7 +1401,7 @@ Foam::tmp<Foam::fvMatrix<Type>> 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 33255e5c14d..7f3923aef8f 100644
--- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C
+++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C
@@ -406,7 +406,7 @@ fvMeshSubset::interpolate
             patchFields
         )
     );
-    GeometricField<Type, pointPatchField, pointMesh>& resF = tresF();
+    GeometricField<Type, pointPatchField, pointMesh>& 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 186fe7d500e..171e47ecd44 100644
--- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C
+++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C
@@ -77,7 +77,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate
             patchFields
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& resF = tresF();
+    GeometricField<Type, fvPatchField, volMesh>& resF = tresF.ref();
 
 
     // 2. Change the fvPatchFields to the correct type using a mapper
diff --git a/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options b/src/fvAgglomerationMethods/pairPatchAgglomeration/Make/options
index 63d132ca507..93a7e01542e 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 e0b34247ad2..29e44696101 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 5598b4ef20f..124084c0575 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 287318da1ff..71b7873964d 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 4f10470b160..55865dfabcd 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 4670e804874..f7d9a36f3b6 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 9c78fa29f77..04b133ba053 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 ccd5450e02b..41306609f20 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 18eeb819701..a5a3b3c8ebd 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 6ccac8015b0..de95d1b75b8 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 5cf02659870..9fe79c9220b 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 d5eb8a74c56..3b5a4e72e95 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 67f1b6608c5..7b2fc4bea88 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 78bd91e5936..d37a26a9dd4 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 d398d1687fc..1618ab57ec2 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 92abbacf67a..eabd0b53a8f 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 2f8d1a7b478..1713152e9e5 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 24a3b377dae..65875e91fbe 100644
--- a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C
+++ b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C
@@ -76,7 +76,7 @@ Foam::fvFieldDecomposer::decomposeField
             patchFields
         )
     );
-    GeometricField<Type, fvPatchField, volMesh>& resF = tresF();
+    GeometricField<Type, fvPatchField, volMesh>& resF = tresF.ref();
 
 
     // 2. Change the fvPatchFields to the correct type using a mapper
@@ -246,7 +246,7 @@ Foam::fvFieldDecomposer::decomposeField
             patchFields
         )
     );
-    GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF();
+    GeometricField<Type, fvsPatchField, surfaceMesh>& resF = tresF.ref();
 
 
     // 2. Change the fvsPatchFields to the correct type using a mapper
diff --git a/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C b/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C
index 1fb0a26ac06..960a65d76a8 100644
--- a/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C
+++ b/src/parallel/reconstruct/reconstruct/reconstructLagrangianFields.C
@@ -55,7 +55,7 @@ Foam::tmp<Foam::IOField<Type>> Foam::reconstructLagrangianField
             Field<Type>(0)
         )
     );
-    Field<Type>& field = tfield();
+    Field<Type>& field = tfield.ref();
 
     forAll(meshes, i)
     {
@@ -115,7 +115,7 @@ Foam::reconstructLagrangianFieldField
             Field<Field<Type>>(0)
         )
     );
-    Field<Field<Type>>& field = tfield();
+    Field<Field<Type>>& field = tfield.ref();
 
     forAll(meshes, i)
     {
diff --git a/src/postProcessing/functionObjects/field/Make/options b/src/postProcessing/functionObjects/field/Make/options
index 583c538b9e6..0732822dba6 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 f50a857be26..ad4e27c1967 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 287318da1ff..71b7873964d 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 21a2486c48c..a9753c5115e 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 bcd627471b9..a3ae8da8331 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 0cd68b47e81..a0eb4828eaa 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 15ca6b932f8..23e6bc81a7e 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 fd1f401690d..f2367d2e1d4 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 079607db058..7e207d0dbea 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 3dac244d796..c4f0b2a8a95 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 287318da1ff..71b7873964d 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 95f178b4551..b5c859baf14 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 7a1e7f43d2b..de52d7e6ae8 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 925d4a58aab..f97edb8458c 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 690761730fa..6e1d19dbb60 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 e1fbd3ed453..b964b61294c 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 97cc5092123..f2d8f809d5d 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 f8779f538f6..848cce789f2 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 ea189b0b635..726b76e7644 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 bded2d7118f..f59f44fc8d3 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 e922aa724f5..e871169b17f 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 85a93d1d170..bdc8b074c03 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 c84b6c55464..d3e1cb87ce5 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 82165ae6e5e..44753e64c96 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 287318da1ff..71b7873964d 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 138dcbf7f55..4ae2fbf9664 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 c55a98a0b64..46aa26d4ad8 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 efbf1b41ca3..cc63db7dcc4 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 287318da1ff..71b7873964d 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 547d45694c8..32ce36b9594 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 948c54f7560..9ee5884e590 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
 
-- 
GitLab