From 10759271487ce1cdb5cd751576e2d41500d984e5 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Sun, 10 Feb 2019 14:53:13 +0000
Subject: [PATCH] ENH: mixed precision solver infrastructure (#1086)

- lduSolver: solveScalar for coarse-level solve; normFactor etc

- lduMatrix: have smoother natively use solveScalarField
---
 .../cyclicLduInterfaceField.C                 |   4 +-
 .../cyclicLduInterfaceField.H                 |   4 +-
 .../lduInterfaceField/lduInterfaceField.C     |   6 -
 .../lduInterfaceField/lduInterfaceField.H     |  20 +--
 .../processorLduInterfaceField.C              |   4 +-
 .../processorLduInterfaceField.H              |   4 +-
 .../matrices/lduMatrix/lduMatrix/lduMatrix.C  |  10 +-
 .../matrices/lduMatrix/lduMatrix/lduMatrix.H  |  59 +++++----
 .../lduMatrix/lduMatrix/lduMatrixATmul.C      |  40 +++---
 .../lduMatrix/lduMatrix/lduMatrixSolver.C     |  12 +-
 .../lduMatrixUpdateMatrixInterfaces.C         |  10 +-
 .../DICPreconditioner/DICPreconditioner.C     |  28 ++--
 .../DICPreconditioner/DICPreconditioner.H     |  10 +-
 .../DILUPreconditioner/DILUPreconditioner.C   |  55 ++++----
 .../DILUPreconditioner/DILUPreconditioner.H   |  14 +-
 .../FDICPreconditioner/FDICPreconditioner.C   |  38 +++---
 .../FDICPreconditioner/FDICPreconditioner.H   |  12 +-
 .../GAMGPreconditioner/GAMGPreconditioner.C   |  30 +++--
 .../GAMGPreconditioner/GAMGPreconditioner.H   |   6 +-
 .../diagonalPreconditioner.C                  |  18 +--
 .../diagonalPreconditioner.H                  |  12 +-
 .../noPreconditioner/noPreconditioner.C       |  12 +-
 .../noPreconditioner/noPreconditioner.H       |  10 +-
 .../lduMatrix/smoothers/DIC/DICSmoother.C     |  48 +++++--
 .../lduMatrix/smoothers/DIC/DICSmoother.H     |  15 ++-
 .../DICGaussSeidel/DICGaussSeidelSmoother.C   |  17 ++-
 .../DICGaussSeidel/DICGaussSeidelSmoother.H   |  13 +-
 .../lduMatrix/smoothers/DILU/DILUSmoother.C   |  48 +++++--
 .../lduMatrix/smoothers/DILU/DILUSmoother.H   |  15 ++-
 .../DILUGaussSeidel/DILUGaussSeidelSmoother.C |  27 +++-
 .../DILUGaussSeidel/DILUGaussSeidelSmoother.H |  13 +-
 .../lduMatrix/smoothers/FDIC/FDICSmoother.C   |  35 +++--
 .../lduMatrix/smoothers/FDIC/FDICSmoother.H   |  13 +-
 .../GaussSeidel/GaussSeidelSmoother.C         |  39 ++++--
 .../GaussSeidel/GaussSeidelSmoother.H         |  17 ++-
 .../nonBlockingGaussSeidelSmoother.C          |  40 ++++--
 .../nonBlockingGaussSeidelSmoother.H          |  17 ++-
 .../symGaussSeidel/symGaussSeidelSmoother.C   |  39 ++++--
 .../symGaussSeidel/symGaussSeidelSmoother.H   |  17 ++-
 .../lduMatrix/solvers/GAMG/GAMGSolver.H       |  46 +++----
 .../solvers/GAMG/GAMGSolverInterpolate.C      |  28 ++--
 .../lduMatrix/solvers/GAMG/GAMGSolverScale.C  |  26 ++--
 .../lduMatrix/solvers/GAMG/GAMGSolverSolve.C  | 123 +++++++++++-------
 .../cyclicGAMGInterfaceField.C                |   8 +-
 .../cyclicGAMGInterfaceField.H                |   6 +-
 .../processorGAMGInterfaceField.C             |  18 ++-
 .../processorGAMGInterfaceField.H             |  14 +-
 .../matrices/lduMatrix/solvers/PBiCG/PBiCG.C  |  61 +++++----
 .../lduMatrix/solvers/PBiCGStab/PBiCGStab.C   |  91 ++++++++-----
 .../lduMatrix/solvers/PBiCGStab/PBiCGStab.H   |   8 ++
 .../matrices/lduMatrix/solvers/PCG/PCG.C      |  68 +++++++---
 .../matrices/lduMatrix/solvers/PCG/PCG.H      |   8 ++
 .../solvers/smoothSolver/smoothSolver.C       |  36 +++--
 .../faMatrices/faMatrix/faMatrixSolve.C       |  47 ++++---
 .../faScalarMatrix/faScalarMatrix.C           |  19 ++-
 .../basic/coupled/coupledFaPatchField.H       |   8 +-
 .../constraint/cyclic/cyclicFaPatchField.C    |   8 +-
 .../constraint/cyclic/cyclicFaPatchField.H    |   8 +-
 .../processor/processorFaPatchField.C         |  14 +-
 .../processor/processorFaPatchField.H         |  12 +-
 .../processor/processorFaPatchScalarField.C   |  16 +--
 .../processor/processorFaPatchScalarField.H   |  12 +-
 .../basic/coupled/coupledFvPatchField.H       |   6 +-
 .../constraint/cyclic/cyclicFvPatchField.C    |   8 +-
 .../constraint/cyclic/cyclicFvPatchField.H    |   6 +-
 .../cyclicACMI/cyclicACMIFvPatchField.C       |   8 +-
 .../cyclicACMI/cyclicACMIFvPatchField.H       |   6 +-
 .../cyclicAMI/cyclicAMIFvPatchField.C         |  10 +-
 .../cyclicAMI/cyclicAMIFvPatchField.H         |   6 +-
 .../jumpCyclic/jumpCyclicFvPatchField.C       |   6 +-
 .../jumpCyclic/jumpCyclicFvPatchField.H       |  14 +-
 .../jumpCyclic/jumpCyclicFvPatchFields.C      |  26 ++--
 .../jumpCyclicAMI/jumpCyclicAMIFvPatchField.C |   6 +-
 .../jumpCyclicAMI/jumpCyclicAMIFvPatchField.H |  10 +-
 .../jumpCyclicAMIFvPatchFields.C              |  20 ++-
 .../processor/processorFvPatchField.C         |  16 ++-
 .../processor/processorFvPatchField.H         |  15 ++-
 .../fvPatchFields/fvPatchField/fvPatchField.H |   3 +-
 .../fvMatrices/fvMatrix/fvMatrixSolve.C       |  44 ++++---
 .../fvScalarMatrix/fvScalarMatrix.C           |  20 +--
 .../cyclicACMIGAMGInterfaceField.C            |   8 +-
 .../cyclicACMIGAMGInterfaceField.H            |   6 +-
 .../cyclicAMIGAMGInterfaceField.C             |   8 +-
 .../cyclicAMIGAMGInterfaceField.H             |   6 +-
 .../cyclicACMILduInterfaceField.C             |   4 +-
 .../cyclicACMILduInterfaceField.H             |   4 +-
 .../cyclicAMILduInterfaceField.C              |   4 +-
 .../cyclicAMILduInterfaceField.H              |   4 +-
 .../regionCoupledGAMGInterfaceField.H         |   6 +-
 .../regionCoupledWallGAMGInterfaceField.H     |   6 +-
 .../calculatedProcessorGAMGInterfaceField.C   |  27 ++--
 .../calculatedProcessorGAMGInterfaceField.H   |  14 +-
 .../calculatedProcessorFvPatchField.C         |  13 +-
 .../calculatedProcessorFvPatchField.H         |  37 ++----
 .../energyRegionCoupledFvPatchScalarField.C   |  17 ++-
 .../energyRegionCoupledFvPatchScalarField.H   |   6 +-
 .../tabulation/ISAT/binaryTree/binaryTree.C   |   2 +-
 97 files changed, 1178 insertions(+), 740 deletions(-)

diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C
index 2e21969249c..2fe1299d133 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2012 OpenFOAM Foundation
@@ -46,7 +46,7 @@ Foam::cyclicLduInterfaceField::~cyclicLduInterfaceField()
 
 void Foam::cyclicLduInterfaceField::transformCoupleField
 (
-    scalarField& f,
+    solveScalarField& f,
     const direction cmpt
 ) const
 {
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.H b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.H
index 09d5425ad8d..0b12ecb0cb6 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.H
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2012 OpenFOAM Foundation
@@ -93,7 +93,7 @@ public:
         //- Transform given patch component field
         void transformCoupleField
         (
-            scalarField& f,
+            solveScalarField& f,
             const direction cmpt
         ) const;
 };
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C
index 3e84b52a170..eff667bfca9 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C
@@ -35,10 +35,4 @@ defineTypeNameAndDebug(lduInterfaceField, 0);
 }
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-Foam::lduInterfaceField::~lduInterfaceField()
-{}
-
-
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.H b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.H
index 0ef6f23e883..9c23e2392c8 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.H
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -93,7 +93,7 @@ public:
 
 
     //- Destructor
-    virtual ~lduInterfaceField();
+    virtual ~lduInterfaceField() = default;
 
 
     // Member Functions
@@ -137,11 +137,11 @@ public:
             //  or subtract coupled contributions to matrix
             virtual void initInterfaceMatrixUpdate
             (
-                scalarField&,
+                solveScalarField& result,
                 const bool add,
-                const scalarField&,
-                const scalarField&,
-                const direction,
+                const solveScalarField& psiInternal,
+                const scalarField& coeffs,
+                const direction cmpt,
                 const Pstream::commsTypes commsType
             ) const
             {}
@@ -150,11 +150,11 @@ public:
             //  or subtract coupled contributions to matrix
             virtual void updateInterfaceMatrix
             (
-                scalarField&,
+                solveScalarField& result,
                 const bool add,
-                const scalarField&,
-                const scalarField&,
-                const direction,
+                const solveScalarField& psiInternal,
+                const scalarField& coeffs,
+                const direction cmpt,
                 const Pstream::commsTypes commsType
             ) const = 0;
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C
index 05da9815b5a..d57d8933001 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2012 OpenFOAM Foundation
@@ -46,7 +46,7 @@ Foam::processorLduInterfaceField::~processorLduInterfaceField()
 
 void Foam::processorLduInterfaceField::transformCoupleField
 (
-    scalarField& f,
+    solveScalarField& f,
     const direction cmpt
 ) const
 {
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.H b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.H
index 2af83af6f26..3aa9d076d2f 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.H
+++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2014 OpenFOAM Foundation
@@ -99,7 +99,7 @@ public:
         //- Transform given patch component field
         void transformCoupleField
         (
-            scalarField& f,
+            solveScalarField& f,
             const direction cmpt
         ) const;
 };
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C
index e18b7476df4..b0dbd5afee2 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -29,7 +29,7 @@ License
 #include "IOstreams.H"
 #include "Switch.H"
 #include "objectRegistry.H"
-#include "IOField.H"
+#include "scalarIOField.H"
 #include "Time.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@@ -319,7 +319,7 @@ const Foam::scalarField& Foam::lduMatrix::upper() const
 
 void Foam::lduMatrix::setResidualField
 (
-    const Field<scalar>& residual,
+    const scalarField& residual,
     const word& fieldName,
     const bool initial
 ) const
@@ -339,8 +339,8 @@ void Foam::lduMatrix::setResidualField
         lookupName = word("residual:" + fieldName);
     }
 
-    IOField<scalar>* residualPtr =
-        lduMesh_.thisDb().getObjectPtr<IOField<scalar>>(lookupName);
+    scalarIOField* residualPtr =
+        lduMesh_.thisDb().getObjectPtr<scalarIOField>(lookupName);
 
     if (residualPtr)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
index f969ae2fa31..412efebf482 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -262,12 +262,12 @@ public:
 
             //- Return the matrix norm used to normalise the residual for the
             //- stopping criterion
-            scalar normFactor
+            solveScalarField::cmptType normFactor
             (
-                const scalarField& psi,
-                const scalarField& source,
-                const scalarField& Apsi,
-                scalarField& tmpField
+                const solveScalarField& psi,
+                const solveScalarField& source,
+                const solveScalarField& Apsi,
+                solveScalarField& tmpField
             ) const;
     };
 
@@ -404,11 +404,20 @@ public:
             //- Smooth the solution for a given number of sweeps
             virtual void smooth
             (
-                scalarField& psi,
+                solveScalarField& psi,
                 const scalarField& source,
                 const direction cmpt,
                 const label nSweeps
             ) const = 0;
+
+            //- Smooth the solution for a given number of sweeps
+            virtual void scalarSmooth
+            (
+                solveScalarField& psi,
+                const solveScalarField& source,
+                const direction cmpt,
+                const label nSweeps
+            ) const = 0;
     };
 
 
@@ -495,8 +504,8 @@ public:
             //- Return wA the preconditioned form of residual rA
             virtual void precondition
             (
-                scalarField& wA,
-                const scalarField& rA,
+                solveScalarField& wA,
+                const solveScalarField& rA,
                 const direction cmpt=0
             ) const = 0;
 
@@ -505,8 +514,8 @@ public:
             //  This is only required for preconditioning asymmetric matrices.
             virtual void preconditionT
             (
-                scalarField& wT,
-                const scalarField& rT,
+                solveScalarField& wT,
+                const solveScalarField& rT,
                 const direction cmpt=0
             ) const
             {
@@ -624,8 +633,8 @@ public:
             //- Matrix multiplication with updated interfaces.
             void Amul
             (
-                scalarField&,
-                const tmp<scalarField>&,
+                solveScalarField&,
+                const tmp<solveScalarField>&,
                 const FieldField<Field, scalar>&,
                 const lduInterfaceFieldPtrsList&,
                 const direction cmpt
@@ -634,8 +643,8 @@ public:
             //- Matrix transpose multiplication with updated interfaces.
             void Tmul
             (
-                scalarField&,
-                const tmp<scalarField>&,
+                solveScalarField&,
+                const tmp<solveScalarField>&,
                 const FieldField<Field, scalar>&,
                 const lduInterfaceFieldPtrsList&,
                 const direction cmpt
@@ -645,7 +654,7 @@ public:
             //- Sum the coefficients on each row of the matrix
             void sumA
             (
-                scalarField&,
+                solveScalarField&,
                 const FieldField<Field, scalar>&,
                 const lduInterfaceFieldPtrsList&
             ) const;
@@ -653,17 +662,17 @@ public:
 
             void residual
             (
-                scalarField& rA,
-                const scalarField& psi,
+                solveScalarField& rA,
+                const solveScalarField& psi,
                 const scalarField& source,
                 const FieldField<Field, scalar>& interfaceBouCoeffs,
                 const lduInterfaceFieldPtrsList& interfaces,
                 const direction cmpt
             ) const;
 
-            tmp<scalarField> residual
+            tmp<solveScalarField> residual
             (
-                const scalarField& psi,
+                const solveScalarField& psi,
                 const scalarField& source,
                 const FieldField<Field, scalar>& interfaceBouCoeffs,
                 const lduInterfaceFieldPtrsList& interfaces,
@@ -678,8 +687,8 @@ public:
                 const bool add,
                 const FieldField<Field, scalar>& interfaceCoeffs,
                 const lduInterfaceFieldPtrsList& interfaces,
-                const scalarField& psiif,
-                scalarField& result,
+                const solveScalarField& psiif,
+                solveScalarField& result,
                 const direction cmpt
             ) const;
 
@@ -689,8 +698,8 @@ public:
                 const bool add,
                 const FieldField<Field, scalar>& interfaceCoeffs,
                 const lduInterfaceFieldPtrsList& interfaces,
-                const scalarField& psiif,
-                scalarField& result,
+                const solveScalarField& psiif,
+                solveScalarField& result,
                 const direction cmpt
             ) const;
 
@@ -698,7 +707,7 @@ public:
             //- if it exists
             void setResidualField
             (
-                const Field<scalar>& residual,
+                const scalarField& residual,
                 const word& fieldName,
                 const bool initial
             ) const;
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C
index d5fb2d62dcd..9cf6b44531f 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -35,17 +35,17 @@ Description
 
 void Foam::lduMatrix::Amul
 (
-    scalarField& Apsi,
-    const tmp<scalarField>& tpsi,
+    solveScalarField& Apsi,
+    const tmp<solveScalarField>& tpsi,
     const FieldField<Field, scalar>& interfaceBouCoeffs,
     const lduInterfaceFieldPtrsList& interfaces,
     const direction cmpt
 ) const
 {
-    scalar* __restrict__ ApsiPtr = Apsi.begin();
+    solveScalar* __restrict__ ApsiPtr = Apsi.begin();
 
-    const scalarField& psi = tpsi();
-    const scalar* const __restrict__ psiPtr = psi.begin();
+    const solveScalarField& psi = tpsi();
+    const solveScalar* const __restrict__ psiPtr = psi.begin();
 
     const scalar* const __restrict__ diagPtr = diag().begin();
 
@@ -98,17 +98,17 @@ void Foam::lduMatrix::Amul
 
 void Foam::lduMatrix::Tmul
 (
-    scalarField& Tpsi,
-    const tmp<scalarField>& tpsi,
+    solveScalarField& Tpsi,
+    const tmp<solveScalarField>& tpsi,
     const FieldField<Field, scalar>& interfaceIntCoeffs,
     const lduInterfaceFieldPtrsList& interfaces,
     const direction cmpt
 ) const
 {
-    scalar* __restrict__ TpsiPtr = Tpsi.begin();
+    solveScalar* __restrict__ TpsiPtr = Tpsi.begin();
 
-    const scalarField& psi = tpsi();
-    const scalar* const __restrict__ psiPtr = psi.begin();
+    const solveScalarField& psi = tpsi();
+    const solveScalar* const __restrict__ psiPtr = psi.begin();
 
     const scalar* const __restrict__ diagPtr = diag().begin();
 
@@ -159,12 +159,12 @@ void Foam::lduMatrix::Tmul
 
 void Foam::lduMatrix::sumA
 (
-    scalarField& sumA,
+    solveScalarField& sumA,
     const FieldField<Field, scalar>& interfaceBouCoeffs,
     const lduInterfaceFieldPtrsList& interfaces
 ) const
 {
-    scalar* __restrict__ sumAPtr = sumA.begin();
+    solveScalar* __restrict__ sumAPtr = sumA.begin();
 
     const scalar* __restrict__ diagPtr = diag().begin();
 
@@ -208,17 +208,17 @@ void Foam::lduMatrix::sumA
 
 void Foam::lduMatrix::residual
 (
-    scalarField& rA,
-    const scalarField& psi,
+    solveScalarField& rA,
+    const solveScalarField& psi,
     const scalarField& source,
     const FieldField<Field, scalar>& interfaceBouCoeffs,
     const lduInterfaceFieldPtrsList& interfaces,
     const direction cmpt
 ) const
 {
-    scalar* __restrict__ rAPtr = rA.begin();
+    solveScalar* __restrict__ rAPtr = rA.begin();
 
-    const scalar* const __restrict__ psiPtr = psi.begin();
+    const solveScalar* const __restrict__ psiPtr = psi.begin();
     const scalar* const __restrict__ diagPtr = diag().begin();
     const scalar* const __restrict__ sourcePtr = source.begin();
 
@@ -278,16 +278,16 @@ void Foam::lduMatrix::residual
 }
 
 
-Foam::tmp<Foam::scalarField> Foam::lduMatrix::residual
+Foam::tmp<Foam::Field<Foam::solveScalar>> Foam::lduMatrix::residual
 (
-    const scalarField& psi,
+    const solveScalarField& psi,
     const scalarField& source,
     const FieldField<Field, scalar>& interfaceBouCoeffs,
     const lduInterfaceFieldPtrsList& interfaces,
     const direction cmpt
 ) const
 {
-    tmp<scalarField> trA(new scalarField(psi.size()));
+    tmp<solveScalarField> trA(new solveScalarField(psi.size()));
     residual(trA.ref(), psi, source, interfaceBouCoeffs, interfaces, cmpt);
     return trA;
 }
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C
index af640206c5c..45226edba8e 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -170,12 +170,12 @@ void Foam::lduMatrix::solver::read(const dictionary& solverControls)
 }
 
 
-Foam::scalar Foam::lduMatrix::solver::normFactor
+Foam::solveScalarField::cmptType Foam::lduMatrix::solver::normFactor
 (
-    const scalarField& psi,
-    const scalarField& source,
-    const scalarField& Apsi,
-    scalarField& tmpField
+    const solveScalarField& psi,
+    const solveScalarField& source,
+    const solveScalarField& Apsi,
+    solveScalarField& tmpField
 ) const
 {
     // --- Calculate A dot reference value of psi
diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C
index 27369279549..e1bf4a01b71 100644
--- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C
+++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -34,8 +34,8 @@ void Foam::lduMatrix::initMatrixInterfaces
     const bool add,
     const FieldField<Field, scalar>& coupleCoeffs,
     const lduInterfaceFieldPtrsList& interfaces,
-    const scalarField& psiif,
-    scalarField& result,
+    const solveScalarField& psiif,
+    solveScalarField& result,
     const direction cmpt
 ) const
 {
@@ -103,8 +103,8 @@ void Foam::lduMatrix::updateMatrixInterfaces
     const bool add,
     const FieldField<Field, scalar>& coupleCoeffs,
     const lduInterfaceFieldPtrsList& interfaces,
-    const scalarField& psiif,
-    scalarField& result,
+    const solveScalarField& psiif,
+    solveScalarField& result,
     const direction cmpt
 ) const
 {
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DICPreconditioner/DICPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DICPreconditioner/DICPreconditioner.C
index cd028667a92..d410f0ff712 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DICPreconditioner/DICPreconditioner.C
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DICPreconditioner/DICPreconditioner.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "DICPreconditioner.H"
+#include <algorithm>
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -48,8 +49,11 @@ Foam::DICPreconditioner::DICPreconditioner
 )
 :
     lduMatrix::preconditioner(sol),
-    rD_(sol.matrix().diag())
+    rD_(sol.matrix().diag().size())
 {
+    const scalarField& diag = sol.matrix().diag();
+    std::copy(diag.begin(), diag.end(), rD_.begin());
+
     calcReciprocalD(rD_, sol.matrix());
 }
 
@@ -58,11 +62,11 @@ Foam::DICPreconditioner::DICPreconditioner
 
 void Foam::DICPreconditioner::calcReciprocalD
 (
-    scalarField& rD,
+    solveScalarField& rD,
     const lduMatrix& matrix
 )
 {
-    scalar* __restrict__ rDPtr = rD.begin();
+    solveScalar* __restrict__ rDPtr = rD.begin();
 
     const label* const __restrict__ uPtr = matrix.lduAddr().upperAddr().begin();
     const label* const __restrict__ lPtr = matrix.lduAddr().lowerAddr().begin();
@@ -88,14 +92,14 @@ void Foam::DICPreconditioner::calcReciprocalD
 
 void Foam::DICPreconditioner::precondition
 (
-    scalarField& wA,
-    const scalarField& rA,
+    solveScalarField& wA,
+    const solveScalarField& rA,
     const direction
 ) const
 {
-    scalar* __restrict__ wAPtr = wA.begin();
-    const scalar* __restrict__ rAPtr = rA.begin();
-    const scalar* __restrict__ rDPtr = rD_.begin();
+    solveScalar* __restrict__ wAPtr = wA.begin();
+    const solveScalar* __restrict__ rAPtr = rA.begin();
+    const solveScalar* __restrict__ rDPtr = rD_.begin();
 
     const label* const __restrict__ uPtr =
         solver_.matrix().lduAddr().upperAddr().begin();
@@ -104,9 +108,9 @@ void Foam::DICPreconditioner::precondition
     const scalar* const __restrict__ upperPtr =
         solver_.matrix().upper().begin();
 
-    label nCells = wA.size();
-    label nFaces = solver_.matrix().upper().size();
-    label nFacesM1 = nFaces - 1;
+    const label nCells = wA.size();
+    const label nFaces = solver_.matrix().upper().size();
+    const label nFacesM1 = nFaces - 1;
 
     for (label cell=0; cell<nCells; cell++)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DICPreconditioner/DICPreconditioner.H b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DICPreconditioner/DICPreconditioner.H
index 852ece3b99e..c447e21412d 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DICPreconditioner/DICPreconditioner.H
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DICPreconditioner/DICPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -60,7 +60,7 @@ class DICPreconditioner
     // Private data
 
         //- The reciprocal preconditioned diagonal
-        scalarField rD_;
+        solveScalarField rD_;
 
 
 public:
@@ -87,13 +87,13 @@ public:
     // Member Functions
 
         //- Calculate the reciprocal of the preconditioned diagonal
-        static void calcReciprocalD(scalarField& rD, const lduMatrix& matrix);
+        static void calcReciprocalD(solveScalarField&, const lduMatrix&);
 
         //- Return wA the preconditioned form of residual rA
         virtual void precondition
         (
-            scalarField& wA,
-            const scalarField& rA,
+            solveScalarField& wA,
+            const solveScalarField& rA,
             const direction cmpt=0
         ) const;
 };
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.C
index 399d47f55ed..54b9c34dd9b 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.C
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "DILUPreconditioner.H"
+#include <algorithm>
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -48,8 +49,11 @@ Foam::DILUPreconditioner::DILUPreconditioner
 )
 :
     lduMatrix::preconditioner(sol),
-    rD_(sol.matrix().diag())
+    rD_(sol.matrix().diag().size())
 {
+    const scalarField& diag = sol.matrix().diag();
+    std::copy(diag.begin(), diag.end(), rD_.begin());
+
     calcReciprocalD(rD_, sol.matrix());
 }
 
@@ -58,11 +62,11 @@ Foam::DILUPreconditioner::DILUPreconditioner
 
 void Foam::DILUPreconditioner::calcReciprocalD
 (
-    scalarField& rD,
+    solveScalarField& rD,
     const lduMatrix& matrix
 )
 {
-    scalar* __restrict__ rDPtr = rD.begin();
+    solveScalar* __restrict__ rDPtr = rD.begin();
 
     const label* const __restrict__ uPtr = matrix.lduAddr().upperAddr().begin();
     const label* const __restrict__ lPtr = matrix.lduAddr().lowerAddr().begin();
@@ -78,7 +82,7 @@ void Foam::DILUPreconditioner::calcReciprocalD
 
 
     // Calculate the reciprocal of the preconditioned diagonal
-    label nCells = rD.size();
+    const label nCells = rD.size();
 
     for (label cell=0; cell<nCells; cell++)
     {
@@ -89,14 +93,14 @@ void Foam::DILUPreconditioner::calcReciprocalD
 
 void Foam::DILUPreconditioner::precondition
 (
-    scalarField& wA,
-    const scalarField& rA,
+    solveScalarField& wA,
+    const solveScalarField& rA,
     const direction
 ) const
 {
-    scalar* __restrict__ wAPtr = wA.begin();
-    const scalar* __restrict__ rAPtr = rA.begin();
-    const scalar* __restrict__ rDPtr = rD_.begin();
+    solveScalar* __restrict__ wAPtr = wA.begin();
+    const solveScalar* __restrict__ rAPtr = rA.begin();
+    const solveScalar* __restrict__ rDPtr = rD_.begin();
 
     const label* const __restrict__ uPtr =
         solver_.matrix().lduAddr().upperAddr().begin();
@@ -110,21 +114,18 @@ void Foam::DILUPreconditioner::precondition
     const scalar* const __restrict__ lowerPtr =
         solver_.matrix().lower().begin();
 
-    label nCells = wA.size();
-    label nFaces = solver_.matrix().upper().size();
-    label nFacesM1 = nFaces - 1;
+    const label nCells = wA.size();
+    const label nFaces = solver_.matrix().upper().size();
+    const label nFacesM1 = nFaces - 1;
 
     for (label cell=0; cell<nCells; cell++)
     {
         wAPtr[cell] = rDPtr[cell]*rAPtr[cell];
     }
 
-
-    label sface;
-
     for (label face=0; face<nFaces; face++)
     {
-        sface = losortPtr[face];
+        const label sface = losortPtr[face];
         wAPtr[uPtr[sface]] -=
             rDPtr[uPtr[sface]]*lowerPtr[sface]*wAPtr[lPtr[sface]];
     }
@@ -139,14 +140,14 @@ void Foam::DILUPreconditioner::precondition
 
 void Foam::DILUPreconditioner::preconditionT
 (
-    scalarField& wT,
-    const scalarField& rT,
+    solveScalarField& wT,
+    const solveScalarField& rT,
     const direction
 ) const
 {
-    scalar* __restrict__ wTPtr = wT.begin();
-    const scalar* __restrict__ rTPtr = rT.begin();
-    const scalar* __restrict__ rDPtr = rD_.begin();
+    solveScalar* __restrict__ wTPtr = wT.begin();
+    const solveScalar* __restrict__ rTPtr = rT.begin();
+    const solveScalar* __restrict__ rDPtr = rD_.begin();
 
     const label* const __restrict__ uPtr =
         solver_.matrix().lduAddr().upperAddr().begin();
@@ -160,9 +161,9 @@ void Foam::DILUPreconditioner::preconditionT
     const scalar* const __restrict__ lowerPtr =
         solver_.matrix().lower().begin();
 
-    label nCells = wT.size();
-    label nFaces = solver_.matrix().upper().size();
-    label nFacesM1 = nFaces - 1;
+    const label nCells = wT.size();
+    const label nFaces = solver_.matrix().upper().size();
+    const label nFacesM1 = nFaces - 1;
 
     for (label cell=0; cell<nCells; cell++)
     {
@@ -176,11 +177,9 @@ void Foam::DILUPreconditioner::preconditionT
     }
 
 
-    label sface;
-
     for (label face=nFacesM1; face>=0; face--)
     {
-        sface = losortPtr[face];
+        const label sface = losortPtr[face];
         wTPtr[lPtr[sface]] -=
             rDPtr[lPtr[sface]]*lowerPtr[sface]*wTPtr[uPtr[sface]];
     }
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.H b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.H
index c105dd4d0ac..e91a8d989ba 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.H
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/DILUPreconditioner/DILUPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -60,7 +60,7 @@ class DILUPreconditioner
     // Private data
 
         //- The reciprocal preconditioned diagonal
-        scalarField rD_;
+        solveScalarField rD_;
 
 
 public:
@@ -87,21 +87,21 @@ public:
     // Member Functions
 
         //- Calculate the reciprocal of the preconditioned diagonal
-        static void calcReciprocalD(scalarField& rD, const lduMatrix& matrix);
+        static void calcReciprocalD(solveScalarField&, const lduMatrix&);
 
         //- Return wA the preconditioned form of residual rA
         virtual void precondition
         (
-            scalarField& wA,
-            const scalarField& rA,
+            solveScalarField& wA,
+            const solveScalarField& rA,
             const direction cmpt=0
         ) const;
 
         //- Return wT the transpose-matrix preconditioned form of residual rT.
         virtual void preconditionT
         (
-            scalarField& wT,
-            const scalarField& rT,
+            solveScalarField& wT,
+            const solveScalarField& rT,
             const direction cmpt=0
         ) const;
 };
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.C
index 9915a334eec..2af34311166 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.C
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "FDICPreconditioner.H"
+#include <algorithm>
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -48,13 +49,16 @@ Foam::FDICPreconditioner::FDICPreconditioner
 )
 :
     lduMatrix::preconditioner(sol),
-    rD_(sol.matrix().diag()),
+    rD_(sol.matrix().diag().size()),
     rDuUpper_(sol.matrix().upper().size()),
     rDlUpper_(sol.matrix().upper().size())
 {
-    scalar* __restrict__ rDPtr = rD_.begin();
-    scalar* __restrict__ rDuUpperPtr = rDuUpper_.begin();
-    scalar* __restrict__ rDlUpperPtr = rDlUpper_.begin();
+    const scalarField& diag = sol.matrix().diag();
+    std::copy(diag.begin(), diag.end(), rD_.begin());
+
+    solveScalar* __restrict__ rDPtr = rD_.begin();
+    solveScalar* __restrict__ rDuUpperPtr = rDuUpper_.begin();
+    solveScalar* __restrict__ rDlUpperPtr = rDlUpper_.begin();
 
     const label* const __restrict__ uPtr =
         solver_.matrix().lduAddr().upperAddr().begin();
@@ -63,8 +67,8 @@ Foam::FDICPreconditioner::FDICPreconditioner
     const scalar* const __restrict__ upperPtr =
         solver_.matrix().upper().begin();
 
-    label nCells = rD_.size();
-    label nFaces = solver_.matrix().upper().size();
+    const label nCells = rD_.size();
+    const label nFaces = solver_.matrix().upper().size();
 
     for (label face=0; face<nFaces; face++)
     {
@@ -89,26 +93,26 @@ Foam::FDICPreconditioner::FDICPreconditioner
 
 void Foam::FDICPreconditioner::precondition
 (
-    scalarField& wA,
-    const scalarField& rA,
+    solveScalarField& wA,
+    const solveScalarField& rA,
     const direction
 ) const
 {
-    scalar* __restrict__ wAPtr = wA.begin();
-    const scalar* __restrict__ rAPtr = rA.begin();
-    const scalar* __restrict__ rDPtr = rD_.begin();
+    solveScalar* __restrict__ wAPtr = wA.begin();
+    const solveScalar* __restrict__ rAPtr = rA.begin();
+    const solveScalar* __restrict__ rDPtr = rD_.begin();
 
     const label* const __restrict__ uPtr =
         solver_.matrix().lduAddr().upperAddr().begin();
     const label* const __restrict__ lPtr =
         solver_.matrix().lduAddr().lowerAddr().begin();
 
-    const scalar* const __restrict__ rDuUpperPtr = rDuUpper_.begin();
-    const scalar* const __restrict__ rDlUpperPtr = rDlUpper_.begin();
+    const solveScalar* const __restrict__ rDuUpperPtr = rDuUpper_.begin();
+    const solveScalar* const __restrict__ rDlUpperPtr = rDlUpper_.begin();
 
-    label nCells = wA.size();
-    label nFaces = solver_.matrix().upper().size();
-    label nFacesM1 = nFaces - 1;
+    const label nCells = wA.size();
+    const label nFaces = solver_.matrix().upper().size();
+    const label nFacesM1 = nFaces - 1;
 
     for (label cell=0; cell<nCells; cell++)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.H b/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.H
index d8d7c4b9902..1c42a3aebc9 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.H
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/FDICPreconditioner/FDICPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -62,9 +62,9 @@ class FDICPreconditioner
     // Private data
 
         //- The reciprocal preconditioned diagonal
-        scalarField rD_;
-        scalarField rDuUpper_;
-        scalarField rDlUpper_;
+        solveScalarField rD_;
+        solveScalarField rDuUpper_;
+        solveScalarField rDlUpper_;
 
 
     // Private Member Functions
@@ -102,8 +102,8 @@ public:
         //- Return wA the preconditioned form of residual rA
         virtual void precondition
         (
-            scalarField& wA,
-            const scalarField& rA,
+            solveScalarField& wA,
+            const solveScalarField& rA,
             const direction cmpt=0
         ) const;
 };
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C
index 7a251e2f5f6..01aadc496e5 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "GAMGPreconditioner.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -82,29 +83,29 @@ void Foam::GAMGPreconditioner::readControls()
 
 void Foam::GAMGPreconditioner::precondition
 (
-    scalarField& wA,
-    const scalarField& rA,
+    solveScalarField& wA,
+    const solveScalarField& rA_ss,
     const direction cmpt
 ) const
 {
     wA = 0.0;
-    scalarField AwA(wA.size());
-    scalarField finestCorrection(wA.size());
-    scalarField finestResidual(rA);
+    solveScalarField AwA(wA.size());
+    solveScalarField finestCorrection(wA.size());
+    solveScalarField finestResidual(rA_ss);
 
     // Create coarse grid correction fields
-    PtrList<scalarField> coarseCorrFields;
+    PtrList<solveScalarField> coarseCorrFields;
 
     // Create coarse grid sources
-    PtrList<scalarField> coarseSources;
+    PtrList<solveScalarField> coarseSources;
 
     // Create the smoothers for all levels
     PtrList<lduMatrix::smoother> smoothers;
 
     // Scratch fields if processor-agglomerated coarse level meshes
     // are bigger than original. Usually not needed
-    scalarField ApsiScratch;
-    scalarField finestCorrectionScratch;
+    solveScalarField ApsiScratch;
+    solveScalarField finestCorrectionScratch;
 
     // Initialise the above data structures
     initVcycle
@@ -116,8 +117,15 @@ void Foam::GAMGPreconditioner::precondition
         finestCorrectionScratch
     );
 
+
+    // Storage area when solveScalar != scalar
+    scalarField rA_s;
+
     for (label cycle=0; cycle<nVcycles_; cycle++)
     {
+        const scalarField& rA =
+            ConstPrecisionAdaptor<scalar, solveScalar>::get(rA_ss, rA_s);
+
         Vcycle
         (
             smoothers,
@@ -143,7 +151,7 @@ void Foam::GAMGPreconditioner::precondition
         {
             // Calculate finest level residual field
             matrix_.Amul(AwA, wA, interfaceBouCoeffs_, interfaces_, cmpt);
-            finestResidual = rA;
+            finestResidual = rA_ss;
             finestResidual -= AwA;
         }
     }
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.H b/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.H
index 5e98bcbe921..63d9f171960 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.H
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/GAMGPreconditioner/GAMGPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -93,8 +93,8 @@ public:
         //- Return wA the preconditioned form of residual rA
         virtual void precondition
         (
-            scalarField& wA,
-            const scalarField& rA,
+            solveScalarField& wA,
+            const solveScalarField& rA,
             const direction cmpt=0
         ) const;
 };
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.C
index 99d59d64883..59f2b6cf2b0 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.C
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -54,10 +54,10 @@ Foam::diagonalPreconditioner::diagonalPreconditioner
     lduMatrix::preconditioner(sol),
     rD(sol.matrix().diag().size())
 {
-    scalar* __restrict__ rDPtr = rD.begin();
+    solveScalar* __restrict__ rDPtr = rD.begin();
     const scalar* __restrict__ DPtr = solver_.matrix().diag().begin();
 
-    label nCells = rD.size();
+    const label nCells = rD.size();
 
     // Generate reciprocal diagonal
     for (label cell=0; cell<nCells; cell++)
@@ -71,16 +71,16 @@ Foam::diagonalPreconditioner::diagonalPreconditioner
 
 void Foam::diagonalPreconditioner::precondition
 (
-    scalarField& wA,
-    const scalarField& rA,
+    solveScalarField& wA,
+    const solveScalarField& rA,
     const direction
 ) const
 {
-    scalar* __restrict__ wAPtr = wA.begin();
-    const scalar* __restrict__ rAPtr = rA.begin();
-    const scalar* __restrict__ rDPtr = rD.begin();
+    solveScalar* __restrict__ wAPtr = wA.begin();
+    const solveScalar* __restrict__ rAPtr = rA.begin();
+    const solveScalar* __restrict__ rDPtr = rD.begin();
 
-    label nCells = wA.size();
+    const label nCells = wA.size();
 
     for (label cell=0; cell<nCells; cell++)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.H b/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.H
index 4d3fc850506..595bb29aefd 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.H
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/diagonalPreconditioner/diagonalPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -61,7 +61,7 @@ class diagonalPreconditioner
     // Private data
 
         //- The reciprocal diagonal
-        scalarField rD;
+        solveScalarField rD;
 
 
     // Private Member Functions
@@ -99,16 +99,16 @@ public:
         //- Return wA the preconditioned form of residual rA
         virtual void precondition
         (
-            scalarField& wA,
-            const scalarField& rA,
+            solveScalarField& wA,
+            const solveScalarField& rA,
             const direction cmpt=0
         ) const;
 
         //- Return wT the transpose-matrix preconditioned form of residual rT.
         virtual void preconditionT
         (
-            scalarField& wT,
-            const scalarField& rT,
+            solveScalarField& wT,
+            const solveScalarField& rT,
             const direction cmpt=0
         ) const
         {
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/noPreconditioner/noPreconditioner.C b/src/OpenFOAM/matrices/lduMatrix/preconditioners/noPreconditioner/noPreconditioner.C
index b1e825eba9a..82eb35b69af 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/noPreconditioner/noPreconditioner.C
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/noPreconditioner/noPreconditioner.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -59,15 +59,15 @@ Foam::noPreconditioner::noPreconditioner
 
 void Foam::noPreconditioner::precondition
 (
-    scalarField& wA,
-    const scalarField& rA,
+    solveScalarField& wA,
+    const solveScalarField& rA,
     const direction
 ) const
 {
-    scalar* __restrict__ wAPtr = wA.begin();
-    const scalar* __restrict__ rAPtr = rA.begin();
+    solveScalar* __restrict__ wAPtr = wA.begin();
+    const solveScalar* __restrict__ rAPtr = rA.begin();
 
-    label nCells = wA.size();
+    const label nCells = wA.size();
 
     for (label cell=0; cell<nCells; cell++)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/preconditioners/noPreconditioner/noPreconditioner.H b/src/OpenFOAM/matrices/lduMatrix/preconditioners/noPreconditioner/noPreconditioner.H
index b78a71669d1..d5b20584fc8 100644
--- a/src/OpenFOAM/matrices/lduMatrix/preconditioners/noPreconditioner/noPreconditioner.H
+++ b/src/OpenFOAM/matrices/lduMatrix/preconditioners/noPreconditioner/noPreconditioner.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -90,16 +90,16 @@ public:
         //- Return wA the preconditioned form of residual rA
         virtual void precondition
         (
-            scalarField& wA,
-            const scalarField& rA,
+            solveScalarField& wA,
+            const solveScalarField& rA,
             const direction cmpt=0
         ) const;
 
         //- Return wT the transpose-matrix preconditioned form of residual rT.
         virtual void preconditionT
         (
-            scalarField& wT,
-            const scalarField& rT,
+            solveScalarField& wT,
+            const solveScalarField& rT,
             const direction cmpt=0
         ) const
         {
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.C
index d4ee30a4bcd..de1d63d1b19 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.C
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -27,6 +27,8 @@ License
 
 #include "DICSmoother.H"
 #include "DICPreconditioner.H"
+#include "PrecisionAdaptor.H"
+#include <algorithm>
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -58,8 +60,11 @@ Foam::DICSmoother::DICSmoother
         interfaceIntCoeffs,
         interfaces
     ),
-    rD_(matrix_.diag())
+    rD_(matrix_.diag().size())
 {
+    const scalarField& diag = matrix_.diag();
+    std::copy(diag.begin(), diag.end(), rD_.begin());
+
     DICPreconditioner::calcReciprocalD(rD_, matrix_);
 }
 
@@ -68,13 +73,13 @@ Foam::DICSmoother::DICSmoother
 
 void Foam::DICSmoother::smooth
 (
-    scalarField& psi,
+    solveScalarField& psi,
     const scalarField& source,
     const direction cmpt,
     const label nSweeps
 ) const
 {
-    const scalar* const __restrict__ rDPtr = rD_.begin();
+    const solveScalar* const __restrict__ rDPtr = rD_.begin();
     const scalar* const __restrict__ upperPtr = matrix_.upper().begin();
     const label* const __restrict__ uPtr =
         matrix_.lduAddr().upperAddr().begin();
@@ -82,8 +87,8 @@ void Foam::DICSmoother::smooth
         matrix_.lduAddr().lowerAddr().begin();
 
     // Temporary storage for the residual
-    scalarField rA(rD_.size());
-    scalar* __restrict__ rAPtr = rA.begin();
+    solveScalarField rA(rD_.size());
+    solveScalar* __restrict__ rAPtr = rA.begin();
 
     for (label sweep=0; sweep<nSweeps; sweep++)
     {
@@ -97,19 +102,22 @@ void Foam::DICSmoother::smooth
             cmpt
         );
 
-        rA *= rD_;
+        forAll(rA, i)
+        {
+            rA[i] *= rD_[i];
+        }
 
-        label nFaces = matrix_.upper().size();
+        const label nFaces = matrix_.upper().size();
         for (label facei=0; facei<nFaces; facei++)
         {
-            label u = uPtr[facei];
+            const label u = uPtr[facei];
             rAPtr[u] -= rDPtr[u]*upperPtr[facei]*rAPtr[lPtr[facei]];
         }
 
-        label nFacesM1 = nFaces - 1;
+        const label nFacesM1 = nFaces - 1;
         for (label facei=nFacesM1; facei>=0; facei--)
         {
-            label l = lPtr[facei];
+            const label l = lPtr[facei];
             rAPtr[l] -= rDPtr[l]*upperPtr[facei]*rAPtr[uPtr[facei]];
         }
 
@@ -118,4 +126,22 @@ void Foam::DICSmoother::smooth
 }
 
 
+void Foam::DICSmoother::scalarSmooth
+(
+    solveScalarField& psi,
+    const solveScalarField& source,
+    const direction cmpt,
+    const label nSweeps
+) const
+{
+    smooth
+    (
+        psi,
+        ConstPrecisionAdaptor<scalar, solveScalar>(source),
+        cmpt,
+        nSweeps
+    );
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.H
index 757490eba2a..31018bf215d 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.H
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -62,7 +62,7 @@ class DICSmoother
     // Private data
 
         //- The reciprocal preconditioned diagonal
-        scalarField rD_;
+        solveScalarField rD_;
 
 
 public:
@@ -89,11 +89,20 @@ public:
         //- Smooth the solution for a given number of sweeps
         void smooth
         (
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& source,
             const direction cmpt,
             const label nSweeps
         ) const;
+
+        //- Smooth the solution for a given number of sweeps
+        void scalarSmooth
+        (
+            solveScalarField& psi,
+            const solveScalarField& source,
+            const direction cmpt,
+            const label nSweeps
+        ) const;
 };
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.C
index 443f80091b0..bb9b1933156 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.C
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -80,7 +80,7 @@ Foam::DICGaussSeidelSmoother::DICGaussSeidelSmoother
 
 void Foam::DICGaussSeidelSmoother::smooth
 (
-    scalarField& psi,
+    solveScalarField& psi,
     const scalarField& source,
     const direction cmpt,
     const label nSweeps
@@ -91,4 +91,17 @@ void Foam::DICGaussSeidelSmoother::smooth
 }
 
 
+void Foam::DICGaussSeidelSmoother::scalarSmooth
+(
+    solveScalarField& psi,
+    const solveScalarField& source,
+    const direction cmpt,
+    const label nSweeps
+) const
+{
+    dicSmoother_.scalarSmooth(psi, source, cmpt, nSweeps);
+    gsSmoother_.scalarSmooth(psi, source, cmpt, nSweeps);
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.H
index cc25df9a5c0..590f3d253c4 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.H
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -89,11 +89,20 @@ public:
         //- Smooth the solution for a given number of sweeps
         virtual void smooth
         (
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& Source,
             const direction cmpt,
             const label nSweeps
         ) const;
+
+        //- Smooth the solution for a given number of sweeps
+        virtual void scalarSmooth
+        (
+            solveScalarField& psi,
+            const solveScalarField& Source,
+            const direction cmpt,
+            const label nSweeps
+        ) const;
 };
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.C
index 030bda41acb..02c48173976 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.C
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -27,6 +27,8 @@ License
 
 #include "DILUSmoother.H"
 #include "DILUPreconditioner.H"
+#include "PrecisionAdaptor.H"
+#include <algorithm>
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -58,8 +60,11 @@ Foam::DILUSmoother::DILUSmoother
         interfaceIntCoeffs,
         interfaces
     ),
-    rD_(matrix_.diag())
+    rD_(matrix_.diag().size())
 {
+    const scalarField& diag = matrix_.diag();
+    std::copy(diag.begin(), diag.end(), rD_.begin());
+
     DILUPreconditioner::calcReciprocalD(rD_, matrix_);
 }
 
@@ -68,13 +73,13 @@ Foam::DILUSmoother::DILUSmoother
 
 void Foam::DILUSmoother::smooth
 (
-    scalarField& psi,
+    solveScalarField& psi,
     const scalarField& source,
     const direction cmpt,
     const label nSweeps
 ) const
 {
-    const scalar* const __restrict__ rDPtr = rD_.begin();
+    const solveScalar* const __restrict__ rDPtr = rD_.begin();
 
     const label* const __restrict__ uPtr =
         matrix_.lduAddr().upperAddr().begin();
@@ -85,8 +90,8 @@ void Foam::DILUSmoother::smooth
     const scalar* const __restrict__ lowerPtr = matrix_.lower().begin();
 
     // Temporary storage for the residual
-    scalarField rA(rD_.size());
-    scalar* __restrict__ rAPtr = rA.begin();
+    solveScalarField rA(rD_.size());
+    solveScalar* __restrict__ rAPtr = rA.begin();
 
     for (label sweep=0; sweep<nSweeps; sweep++)
     {
@@ -100,19 +105,22 @@ void Foam::DILUSmoother::smooth
             cmpt
         );
 
-        rA *= rD_;
+        forAll(rA, i)
+        {
+            rA[i] *= rD_[i];
+        }
 
-        label nFaces = matrix_.upper().size();
+        const label nFaces = matrix_.upper().size();
         for (label face=0; face<nFaces; face++)
         {
-            label u = uPtr[face];
+            const label u = uPtr[face];
             rAPtr[u] -= rDPtr[u]*lowerPtr[face]*rAPtr[lPtr[face]];
         }
 
-        label nFacesM1 = nFaces - 1;
+        const label nFacesM1 = nFaces - 1;
         for (label face=nFacesM1; face>=0; face--)
         {
-            label l = lPtr[face];
+            const label l = lPtr[face];
             rAPtr[l] -= rDPtr[l]*upperPtr[face]*rAPtr[uPtr[face]];
         }
 
@@ -121,4 +129,22 @@ void Foam::DILUSmoother::smooth
 }
 
 
+void Foam::DILUSmoother::scalarSmooth
+(
+    solveScalarField& psi,
+    const solveScalarField& source,
+    const direction cmpt,
+    const label nSweeps
+) const
+{
+    smooth
+    (
+        psi,
+        ConstPrecisionAdaptor<scalar, solveScalar>(source),
+        cmpt,
+        nSweeps
+    );
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.H
index 4ed90b88476..8d884934c30 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.H
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILU/DILUSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -58,7 +58,7 @@ class DILUSmoother
     // Private data
 
         //- The reciprocal preconditioned diagonal
-        scalarField rD_;
+        solveScalarField rD_;
 
 
 public:
@@ -85,11 +85,20 @@ public:
         //- Smooth the solution for a given number of sweeps
         void smooth
         (
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& source,
             const direction cmpt,
             const label nSweeps
         ) const;
+
+        //- Smooth the solution for a given number of sweeps
+        void scalarSmooth
+        (
+            solveScalarField& psi,
+            const solveScalarField& source,
+            const direction cmpt,
+            const label nSweeps
+        ) const;
 };
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.C
index 8a193bd7a41..ea93eae02a1 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.C
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "DILUGaussSeidelSmoother.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -79,16 +80,34 @@ Foam::DILUGaussSeidelSmoother::DILUGaussSeidelSmoother
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
+void Foam::DILUGaussSeidelSmoother::scalarSmooth
+(
+    solveScalarField& psi,
+    const solveScalarField& source,
+    const direction cmpt,
+    const label nSweeps
+) const
+{
+    diluSmoother_.scalarSmooth(psi, source, cmpt, nSweeps);
+    gsSmoother_.scalarSmooth(psi, source, cmpt, nSweeps);
+}
+
+
 void Foam::DILUGaussSeidelSmoother::smooth
 (
-    scalarField& psi,
+    solveScalarField& psi,
     const scalarField& source,
     const direction cmpt,
     const label nSweeps
 ) const
 {
-    diluSmoother_.smooth(psi, source, cmpt, nSweeps);
-    gsSmoother_.smooth(psi, source, cmpt, nSweeps);
+    scalarSmooth
+    (
+        psi,
+        ConstPrecisionAdaptor<solveScalar, scalar>(source),
+        cmpt,
+        nSweeps
+    );
 }
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.H
index a02022bcb24..120857f0549 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.H
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -86,11 +86,20 @@ public:
         //- Smooth the solution for a given number of sweeps
         virtual void smooth
         (
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& Source,
             const direction cmpt,
             const label nSweeps
         ) const;
+
+        //- Smooth the solution for a given number of sweeps
+        void scalarSmooth
+        (
+            solveScalarField& psi,
+            const solveScalarField& source,
+            const direction cmpt,
+            const label nSweeps
+        ) const;
 };
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C
index 4e3463563a3..8c0e1a3cd5d 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -27,6 +27,7 @@ License
 
 #include "FDICSmoother.H"
 #include "FDICPreconditioner.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -73,8 +74,8 @@ Foam::FDICSmoother::FDICSmoother
     const scalar* const __restrict__ upperPtr =
         matrix_.upper().begin();
 
-    label nCells = rD_.size();
-    label nFaces = matrix_.upper().size();
+    const label nCells = rD_.size();
+    const label nFaces = matrix_.upper().size();
 
     for (label face=0; face<nFaces; face++)
     {
@@ -99,7 +100,7 @@ Foam::FDICSmoother::FDICSmoother
 
 void Foam::FDICSmoother::smooth
 (
-    scalarField& psi,
+    solveScalarField& psi,
     const scalarField& source,
     const direction cmpt,
     const label nSweeps
@@ -114,8 +115,8 @@ void Foam::FDICSmoother::smooth
         matrix_.lduAddr().lowerAddr().begin();
 
     // Temporary storage for the residual
-    scalarField rA(rD_.size());
-    scalar* __restrict__ rAPtr = rA.begin();
+    solveScalarField rA(rD_.size());
+    solveScalar* __restrict__ rAPtr = rA.begin();
 
     for (label sweep=0; sweep<nSweeps; sweep++)
     {
@@ -131,13 +132,13 @@ void Foam::FDICSmoother::smooth
 
         rA *= rD_;
 
-        label nFaces = matrix_.upper().size();
+        const label nFaces = matrix_.upper().size();
         for (label face=0; face<nFaces; face++)
         {
             rAPtr[uPtr[face]] -= rDuUpperPtr[face]*rAPtr[lPtr[face]];
         }
 
-        label nFacesM1 = nFaces - 1;
+        const label nFacesM1 = nFaces - 1;
         for (label face=nFacesM1; face>=0; face--)
         {
             rAPtr[lPtr[face]] -= rDlUpperPtr[face]*rAPtr[uPtr[face]];
@@ -148,4 +149,22 @@ void Foam::FDICSmoother::smooth
 }
 
 
+void Foam::FDICSmoother::scalarSmooth
+(
+    solveScalarField& psi,
+    const solveScalarField& source,
+    const direction cmpt,
+    const label nSweeps
+) const
+{
+    smooth
+    (
+        psi,
+        ConstPrecisionAdaptor<scalar, solveScalar>(source),
+        cmpt,
+        nSweeps
+    );
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.H
index ff32ab2dcb3..9825ed85991 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.H
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2012 OpenFOAM Foundation
@@ -88,11 +88,20 @@ public:
         //- Smooth the solution for a given number of sweeps
         void smooth
         (
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& source,
             const direction cmpt,
             const label nSweeps
         ) const;
+
+        //- Smooth the solution for a given number of sweeps
+        virtual void scalarSmooth
+        (
+            solveScalarField& psi,
+            const solveScalarField& source,
+            const direction cmpt,
+            const label nSweeps
+        ) const;
 };
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C
index 4ed92af342e..71af93a718c 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2015 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "GaussSeidelSmoother.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -68,21 +69,21 @@ Foam::GaussSeidelSmoother::GaussSeidelSmoother
 void Foam::GaussSeidelSmoother::smooth
 (
     const word& fieldName_,
-    scalarField& psi,
+    solveScalarField& psi,
     const lduMatrix& matrix_,
-    const scalarField& source,
+    const solveScalarField& source,
     const FieldField<Field, scalar>& interfaceBouCoeffs_,
     const lduInterfaceFieldPtrsList& interfaces_,
     const direction cmpt,
     const label nSweeps
 )
 {
-    scalar* __restrict__ psiPtr = psi.begin();
+    solveScalar* __restrict__ psiPtr = psi.begin();
 
     const label nCells = psi.size();
 
-    scalarField bPrime(nCells);
-    scalar* __restrict__ bPrimePtr = bPrime.begin();
+    solveScalarField bPrime(nCells);
+    solveScalar* __restrict__ bPrimePtr = bPrime.begin();
 
     const scalar* const __restrict__ diagPtr = matrix_.diag().begin();
     const scalar* const __restrict__ upperPtr =
@@ -133,7 +134,7 @@ void Foam::GaussSeidelSmoother::smooth
             cmpt
         );
 
-        scalar psii;
+        solveScalar psii;
         label fStart;
         label fEnd = ownStartPtr[0];
 
@@ -169,11 +170,33 @@ void Foam::GaussSeidelSmoother::smooth
 
 void Foam::GaussSeidelSmoother::smooth
 (
-    scalarField& psi,
+    solveScalarField& psi,
     const scalarField& source,
     const direction cmpt,
     const label nSweeps
 ) const
+{
+    smooth
+    (
+        fieldName_,
+        psi,
+        matrix_,
+        ConstPrecisionAdaptor<solveScalar, scalar>(source),
+        interfaceBouCoeffs_,
+        interfaces_,
+        cmpt,
+        nSweeps
+    );
+}
+
+
+void Foam::GaussSeidelSmoother::scalarSmooth
+(
+    solveScalarField& psi,
+    const solveScalarField& source,
+    const direction cmpt,
+    const label nSweeps
+) const
 {
     smooth
     (
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.H
index 07057d12721..30d032fe9ac 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.H
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -81,9 +81,9 @@ public:
         static void smooth
         (
             const word& fieldName,
-            scalarField& psi,
+            solveScalarField& psi,
             const lduMatrix& matrix,
-            const scalarField& source,
+            const solveScalarField& source,
             const FieldField<Field, scalar>& interfaceBouCoeffs,
             const lduInterfaceFieldPtrsList& interfaces,
             const direction cmpt,
@@ -94,11 +94,20 @@ public:
         //- Smooth the solution for a given number of sweeps
         virtual void smooth
         (
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& Source,
             const direction cmpt,
             const label nSweeps
         ) const;
+
+        //- Smooth the solution for a given number of sweeps
+        virtual void scalarSmooth
+        (
+            solveScalarField& psi,
+            const solveScalarField& Source,
+            const direction cmpt,
+            const label nSweeps
+        ) const;
 };
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C
index 6d282d18e2d..9b1f9277ce2 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "nonBlockingGaussSeidelSmoother.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -95,22 +96,22 @@ Foam::nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother
 void Foam::nonBlockingGaussSeidelSmoother::smooth
 (
     const word& fieldName_,
-    scalarField& psi,
+    solveScalarField& psi,
     const lduMatrix& matrix_,
     const label blockStart,
-    const scalarField& source,
+    const solveScalarField& source,
     const FieldField<Field, scalar>& interfaceBouCoeffs_,
     const lduInterfaceFieldPtrsList& interfaces_,
     const direction cmpt,
     const label nSweeps
 )
 {
-    scalar* __restrict__ psiPtr = psi.begin();
+    solveScalar* __restrict__ psiPtr = psi.begin();
 
     const label nCells = psi.size();
 
-    scalarField bPrime(nCells);
-    scalar* __restrict__ bPrimePtr = bPrime.begin();
+    solveScalarField bPrime(nCells);
+    solveScalar* __restrict__ bPrimePtr = bPrime.begin();
 
     const scalar* const __restrict__ diagPtr = matrix_.diag().begin();
     const scalar* const __restrict__ upperPtr =
@@ -136,7 +137,6 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
     // To compensate for this, it is necessary to turn the
     // sign of the contribution.
 
-
     for (label sweep=0; sweep<nSweeps; sweep++)
     {
         bPrime = source;
@@ -151,7 +151,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
             cmpt
         );
 
-        scalar curPsi;
+        solveScalar curPsi;
         label fStart;
         label fEnd = ownStartPtr[0];
 
@@ -223,10 +223,10 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
 }
 
 
-void Foam::nonBlockingGaussSeidelSmoother::smooth
+void Foam::nonBlockingGaussSeidelSmoother::scalarSmooth
 (
-    scalarField& psi,
-    const scalarField& source,
+    solveScalarField& psi,
+    const solveScalarField& source,
     const direction cmpt,
     const label nSweeps
 ) const
@@ -246,4 +246,22 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth
 }
 
 
+void Foam::nonBlockingGaussSeidelSmoother::smooth
+(
+    solveScalarField& psi,
+    const scalarField& source,
+    const direction cmpt,
+    const label nSweeps
+) const
+{
+    scalarSmooth
+    (
+        psi,
+        ConstPrecisionAdaptor<solveScalar, scalar>(source),
+        cmpt,
+        nSweeps
+    );
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.H
index 580518be081..b6edc00dc4b 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.H
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -93,10 +93,10 @@ public:
         static void smooth
         (
             const word& fieldName,
-            scalarField& psi,
+            solveScalarField& psi,
             const lduMatrix& matrix,
             const label blockStart,
-            const scalarField& source,
+            const solveScalarField& source,
             const FieldField<Field, scalar>& interfaceBouCoeffs,
             const lduInterfaceFieldPtrsList& interfaces,
             const direction cmpt,
@@ -106,11 +106,20 @@ public:
         //- Smooth the solution for a given number of sweeps
         virtual void smooth
         (
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& Source,
             const direction cmpt,
             const label nSweeps
         ) const;
+
+        //- Smooth the solution for a given number of sweeps
+        virtual void scalarSmooth
+        (
+            solveScalarField& psi,
+            const solveScalarField& source,
+            const direction cmpt,
+            const label nSweeps
+        ) const;
 };
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.C
index 6bfd97cdc0b..c0c44868d95 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.C
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012-2015 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "symGaussSeidelSmoother.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -68,21 +69,21 @@ Foam::symGaussSeidelSmoother::symGaussSeidelSmoother
 void Foam::symGaussSeidelSmoother::smooth
 (
     const word& fieldName_,
-    scalarField& psi,
+    solveScalarField& psi,
     const lduMatrix& matrix_,
-    const scalarField& source,
+    const solveScalarField& source,
     const FieldField<Field, scalar>& interfaceBouCoeffs_,
     const lduInterfaceFieldPtrsList& interfaces_,
     const direction cmpt,
     const label nSweeps
 )
 {
-    scalar* __restrict__ psiPtr = psi.begin();
+    solveScalar* __restrict__ psiPtr = psi.begin();
 
     const label nCells = psi.size();
 
-    scalarField bPrime(nCells);
-    scalar* __restrict__ bPrimePtr = bPrime.begin();
+    solveScalarField bPrime(nCells);
+    solveScalar* __restrict__ bPrimePtr = bPrime.begin();
 
     const scalar* const __restrict__ diagPtr = matrix_.diag().begin();
     const scalar* const __restrict__ upperPtr =
@@ -133,7 +134,7 @@ void Foam::symGaussSeidelSmoother::smooth
             cmpt
         );
 
-        scalar psii;
+        solveScalar psii;
         label fStart;
         label fEnd = ownStartPtr[0];
 
@@ -196,10 +197,10 @@ void Foam::symGaussSeidelSmoother::smooth
 }
 
 
-void Foam::symGaussSeidelSmoother::smooth
+void Foam::symGaussSeidelSmoother::scalarSmooth
 (
-    scalarField& psi,
-    const scalarField& source,
+    solveScalarField& psi,
+    const solveScalarField& source,
     const direction cmpt,
     const label nSweeps
 ) const
@@ -218,4 +219,22 @@ void Foam::symGaussSeidelSmoother::smooth
 }
 
 
+void Foam::symGaussSeidelSmoother::smooth
+(
+    solveScalarField& psi,
+    const scalarField& source,
+    const direction cmpt,
+    const label nSweeps
+) const
+{
+    scalarSmooth
+    (
+        psi,
+        ConstPrecisionAdaptor<solveScalar, scalar>(source),
+        cmpt,
+        nSweeps
+    );
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.H
index a18f87728e6..92ecaa37b7f 100644
--- a/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.H
+++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012 OpenFOAM Foundation
@@ -81,9 +81,9 @@ public:
         static void smooth
         (
             const word& fieldName,
-            scalarField& psi,
+            solveScalarField& psi,
             const lduMatrix& matrix,
-            const scalarField& source,
+            const solveScalarField& source,
             const FieldField<Field, scalar>& interfaceBouCoeffs,
             const lduInterfaceFieldPtrsList& interfaces,
             const direction cmpt,
@@ -94,11 +94,20 @@ public:
         //- Smooth the solution for a given number of sweeps
         virtual void smooth
         (
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& Source,
             const direction cmpt,
             const label nSweeps
         ) const;
+
+        //- Smooth the solution for a given number of sweeps
+        virtual void scalarSmooth
+        (
+            solveScalarField& psi,
+            const solveScalarField& source,
+            const direction cmpt,
+            const label nSweeps
+        ) const;
 };
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H
index 5031985872e..b3138c822df 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -230,8 +230,8 @@ class GAMGSolver
         //- Interpolate the correction after injected prolongation
         void interpolate
         (
-            scalarField& psi,
-            scalarField& Apsi,
+            solveScalarField& psi,
+            solveScalarField& Apsi,
             const lduMatrix& m,
             const FieldField<Field, scalar>& interfaceBouCoeffs,
             const lduInterfaceFieldPtrsList& interfaces,
@@ -242,13 +242,13 @@ class GAMGSolver
         //  re-normalise
         void interpolate
         (
-            scalarField& psi,
-            scalarField& Apsi,
+            solveScalarField& psi,
+            solveScalarField& Apsi,
             const lduMatrix& m,
             const FieldField<Field, scalar>& interfaceBouCoeffs,
             const lduInterfaceFieldPtrsList& interfaces,
             const labelList& restrictAddressing,
-            const scalarField& psiC,
+            const solveScalarField& psiC,
             const direction cmpt
         ) const;
 
@@ -259,23 +259,23 @@ class GAMGSolver
         //  scaling factor.
         void scale
         (
-            scalarField& field,
-            scalarField& Acf,
+            solveScalarField& field,
+            solveScalarField& Acf,
             const lduMatrix& A,
             const FieldField<Field, scalar>& interfaceLevelBouCoeffs,
             const lduInterfaceFieldPtrsList& interfaceLevel,
-            const scalarField& source,
+            const solveScalarField& source,
             const direction cmpt
         ) const;
 
         //- Initialise the data structures for the V-cycle
         void initVcycle
         (
-            PtrList<scalarField>& coarseCorrFields,
-            PtrList<scalarField>& coarseSources,
+            PtrList<solveScalarField>& coarseCorrFields,
+            PtrList<solveScalarField>& coarseSources,
             PtrList<lduMatrix::smoother>& smoothers,
-            scalarField& scratch1,
-            scalarField& scratch2
+            solveScalarField& scratch1,
+            solveScalarField& scratch2
         ) const;
 
 
@@ -283,17 +283,17 @@ class GAMGSolver
         void Vcycle
         (
             const PtrList<lduMatrix::smoother>& smoothers,
-            scalarField& psi,
+            solveScalarField& psi,
             const scalarField& source,
-            scalarField& Apsi,
-            scalarField& finestCorrection,
-            scalarField& finestResidual,
+            solveScalarField& Apsi,
+            solveScalarField& finestCorrection,
+            solveScalarField& finestResidual,
 
-            scalarField& scratch1,
-            scalarField& scratch2,
+            solveScalarField& scratch1,
+            solveScalarField& scratch2,
 
-            PtrList<scalarField>& coarseCorrFields,
-            PtrList<scalarField>& coarseSources,
+            PtrList<solveScalarField>& coarseCorrFields,
+            PtrList<solveScalarField>& coarseSources,
             const direction cmpt=0
         ) const;
 
@@ -316,8 +316,8 @@ class GAMGSolver
         //- Solve the coarsest level with either an iterative or direct solver
         void solveCoarsestLevel
         (
-            scalarField& coarsestCorrField,
-            const scalarField& coarsestSource
+            solveScalarField& coarsestCorrField,
+            const solveScalarField& coarsestSource
         ) const;
 
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C
index c8772f75a9c..3ea9443d2d4 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2013-2015 OpenFOAM Foundation
@@ -31,15 +31,15 @@ License
 
 void Foam::GAMGSolver::interpolate
 (
-    scalarField& psi,
-    scalarField& Apsi,
+    solveScalarField& psi,
+    solveScalarField& Apsi,
     const lduMatrix& m,
     const FieldField<Field, scalar>& interfaceBouCoeffs,
     const lduInterfaceFieldPtrsList& interfaces,
     const direction cmpt
 ) const
 {
-    scalar* __restrict__ psiPtr = psi.begin();
+    solveScalar* __restrict__ psiPtr = psi.begin();
 
     const label* const __restrict__ uPtr = m.lduAddr().upperAddr().begin();
     const label* const __restrict__ lPtr = m.lduAddr().lowerAddr().begin();
@@ -49,7 +49,7 @@ void Foam::GAMGSolver::interpolate
     const scalar* const __restrict__ lowerPtr = m.lower().begin();
 
     Apsi = 0;
-    scalar* __restrict__ ApsiPtr = Apsi.begin();
+    solveScalar* __restrict__ ApsiPtr = Apsi.begin();
 
     m.initMatrixInterfaces
     (
@@ -88,13 +88,13 @@ void Foam::GAMGSolver::interpolate
 
 void Foam::GAMGSolver::interpolate
 (
-    scalarField& psi,
-    scalarField& Apsi,
+    solveScalarField& psi,
+    solveScalarField& Apsi,
     const lduMatrix& m,
     const FieldField<Field, scalar>& interfaceBouCoeffs,
     const lduInterfaceFieldPtrsList& interfaces,
     const labelList& restrictAddressing,
-    const scalarField& psiC,
+    const solveScalarField& psiC,
     const direction cmpt
 ) const
 {
@@ -109,17 +109,17 @@ void Foam::GAMGSolver::interpolate
     );
 
     const label nCells = m.diag().size();
-    scalar* __restrict__ psiPtr = psi.begin();
+    solveScalar* __restrict__ psiPtr = psi.begin();
     const scalar* const __restrict__ diagPtr = m.diag().begin();
-    const scalar* const __restrict__ psiCPtr = psiC.begin();
+    const solveScalar* const __restrict__ psiCPtr = psiC.begin();
 
 
     const label nCCells = psiC.size();
-    scalarField corrC(nCCells, 0);
-    scalar* __restrict__ corrCPtr = corrC.begin();
+    solveScalarField corrC(nCCells, 0);
+    solveScalar* __restrict__ corrCPtr = corrC.begin();
 
-    scalarField diagC(nCCells, 0);
-    scalar* __restrict__ diagCPtr = diagC.begin();
+    solveScalarField diagC(nCCells, 0);
+    solveScalar* __restrict__ diagCPtr = diagC.begin();
 
     for (label celli=0; celli<nCells; celli++)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverScale.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverScale.C
index 637cf3d3436..5df93c9e0af 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverScale.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverScale.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -32,12 +32,12 @@ License
 
 void Foam::GAMGSolver::scale
 (
-    scalarField& field,
-    scalarField& Acf,
+    solveScalarField& field,
+    solveScalarField& Acf,
     const lduMatrix& A,
     const FieldField<Field, scalar>& interfaceLevelBouCoeffs,
     const lduInterfaceFieldPtrsList& interfaceLevel,
-    const scalarField& source,
+    const solveScalarField& source,
     const direction cmpt
 ) const
 {
@@ -52,13 +52,13 @@ void Foam::GAMGSolver::scale
 
 
     const label nCells = field.size();
-    scalar* __restrict__ fieldPtr = field.begin();
-    const scalar* const __restrict__ sourcePtr = source.begin();
-    const scalar* const __restrict__ AcfPtr = Acf.begin();
+    solveScalar* __restrict__ fieldPtr = field.begin();
+    const solveScalar* const __restrict__ sourcePtr = source.begin();
+    const solveScalar* const __restrict__ AcfPtr = Acf.begin();
 
 
-    scalar scalingFactorNum = 0.0;
-    scalar scalingFactorDenom = 0.0;
+    solveScalar scalingFactorNum = 0.0;
+    solveScalar scalingFactorDenom = 0.0;
 
     for (label i=0; i<nCells; i++)
     {
@@ -66,10 +66,12 @@ void Foam::GAMGSolver::scale
         scalingFactorDenom += AcfPtr[i]*fieldPtr[i];
     }
 
-    vector2D scalingVector(scalingFactorNum, scalingFactorDenom);
-    A.mesh().reduce(scalingVector, sumOp<vector2D>());
+    Vector2D<solveScalar> scalingVector(scalingFactorNum, scalingFactorDenom);
+    A.mesh().reduce(scalingVector, sumOp<Vector2D<solveScalar>>());
 
-    const scalar sf = scalingVector.x()/stabilise(scalingVector.y(), VSMALL);
+    const solveScalar sf =
+        scalingVector.x()
+       /stabilise(scalingVector.y(), pTraits<solveScalar>::vsmall);
 
     if (debug >= 2)
     {
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C
index 603048a4179..eafba05b337 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -29,29 +29,36 @@ License
 #include "PCG.H"
 #include "PBiCGStab.H"
 #include "SubField.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 Foam::solverPerformance Foam::GAMGSolver::solve
 (
-    scalarField& psi,
+    scalarField& psi_s,
     const scalarField& source,
     const direction cmpt
 ) const
 {
+    PrecisionAdaptor<solveScalar, scalar> tpsi(psi_s);
+    solveScalarField& psi = tpsi.constCast();
+
+    ConstPrecisionAdaptor<solveScalar, scalar> tsource(source);
+
     // Setup class containing solver performance data
     solverPerformance solverPerf(typeName, fieldName_);
 
     // Calculate A.psi used to calculate the initial residual
-    scalarField Apsi(psi.size());
+    solveScalarField Apsi(psi.size());
     matrix_.Amul(Apsi, psi, interfaceBouCoeffs_, interfaces_, cmpt);
 
     // Create the storage for the finestCorrection which may be used as a
     // temporary in normFactor
-    scalarField finestCorrection(psi.size());
+    solveScalarField finestCorrection(psi.size());
 
     // Calculate normalisation factor
-    scalar normFactor = this->normFactor(psi, source, Apsi, finestCorrection);
+    solveScalar normFactor =
+        this->normFactor(psi, tsource(), Apsi, finestCorrection);
 
     if (debug >= 2)
     {
@@ -59,9 +66,14 @@ Foam::solverPerformance Foam::GAMGSolver::solve
     }
 
     // Calculate initial finest-grid residual field
-    scalarField finestResidual(source - Apsi);
+    solveScalarField finestResidual(tsource() - Apsi);
 
-    matrix().setResidualField(finestResidual, fieldName_, true);
+    matrix().setResidualField
+    (
+        ConstPrecisionAdaptor<scalar, solveScalar>(finestResidual)(),
+        fieldName_,
+        true
+    );
 
     // Calculate normalised residual for convergence test
     solverPerf.initialResidual() = gSumMag
@@ -80,18 +92,18 @@ Foam::solverPerformance Foam::GAMGSolver::solve
     )
     {
         // Create coarse grid correction fields
-        PtrList<scalarField> coarseCorrFields;
+        PtrList<solveScalarField> coarseCorrFields;
 
         // Create coarse grid sources
-        PtrList<scalarField> coarseSources;
+        PtrList<solveScalarField> coarseSources;
 
         // Create the smoothers for all levels
         PtrList<lduMatrix::smoother> smoothers;
 
         // Scratch fields if processor-agglomerated coarse level meshes
         // are bigger than original. Usually not needed
-        scalarField scratch1;
-        scalarField scratch2;
+        solveScalarField scratch1;
+        solveScalarField scratch2;
 
         // Initialise the above data structures
         initVcycle
@@ -124,7 +136,7 @@ Foam::solverPerformance Foam::GAMGSolver::solve
 
             // Calculate finest level residual field
             matrix_.Amul(Apsi, psi, interfaceBouCoeffs_, interfaces_, cmpt);
-            finestResidual = source;
+            finestResidual = tsource();
             finestResidual -= Apsi;
 
             solverPerf.finalResidual() = gSumMag
@@ -147,7 +159,12 @@ Foam::solverPerformance Foam::GAMGSolver::solve
         );
     }
 
-    matrix().setResidualField(finestResidual, fieldName_, false);
+    matrix().setResidualField
+    (
+        ConstPrecisionAdaptor<scalar, solveScalar>(finestResidual)(),
+        fieldName_,
+        false
+    );
 
     return solverPerf;
 }
@@ -156,17 +173,17 @@ Foam::solverPerformance Foam::GAMGSolver::solve
 void Foam::GAMGSolver::Vcycle
 (
     const PtrList<lduMatrix::smoother>& smoothers,
-    scalarField& psi,
+    solveScalarField& psi,
     const scalarField& source,
-    scalarField& Apsi,
-    scalarField& finestCorrection,
-    scalarField& finestResidual,
+    solveScalarField& Apsi,
+    solveScalarField& finestCorrection,
+    solveScalarField& finestResidual,
 
-    scalarField& scratch1,
-    scalarField& scratch2,
+    solveScalarField& scratch1,
+    solveScalarField& scratch2,
 
-    PtrList<scalarField>& coarseCorrFields,
-    PtrList<scalarField>& coarseSources,
+    PtrList<solveScalarField>& coarseCorrFields,
+    PtrList<solveScalarField>& coarseSources,
     const direction cmpt
 ) const
 {
@@ -194,10 +211,10 @@ void Foam::GAMGSolver::Vcycle
             {
                 coarseCorrFields[leveli] = 0.0;
 
-                smoothers[leveli + 1].smooth
+                smoothers[leveli + 1].scalarSmooth
                 (
                     coarseCorrFields[leveli],
-                    coarseSources[leveli],
+                    coarseSources[leveli],  //coarseSource,
                     cmpt,
                     min
                     (
@@ -206,7 +223,7 @@ void Foam::GAMGSolver::Vcycle
                     )
                 );
 
-                scalarField::subField ACf
+                solveScalarField::subField ACf
                 (
                     scratch1,
                     coarseCorrFields[leveli].size()
@@ -219,9 +236,9 @@ void Foam::GAMGSolver::Vcycle
                     scale
                     (
                         coarseCorrFields[leveli],
-                        const_cast<scalarField&>
+                        const_cast<solveScalarField&>
                         (
-                            ACf.operator const scalarField&()
+                            ACf.operator const solveScalarField&()
                         ),
                         matrixLevels_[leveli],
                         interfaceLevelsBouCoeffs_[leveli],
@@ -234,9 +251,9 @@ void Foam::GAMGSolver::Vcycle
                 // Correct the residual with the new solution
                 matrixLevels_[leveli].Amul
                 (
-                    const_cast<scalarField&>
+                    const_cast<solveScalarField&>
                     (
-                        ACf.operator const scalarField&()
+                        ACf.operator const solveScalarField&()
                     ),
                     coarseCorrFields[leveli],
                     interfaceLevelsBouCoeffs_[leveli],
@@ -282,7 +299,7 @@ void Foam::GAMGSolver::Vcycle
     // Smoothing and prolongation of the coarse correction fields
     // (going to finer levels)
 
-    scalarField dummyField(0);
+    solveScalarField dummyField(0);
 
     for (label leveli = coarsestLevel - 1; leveli >= 0; leveli--)
     {
@@ -291,7 +308,7 @@ void Foam::GAMGSolver::Vcycle
             // Create a field for the pre-smoothed correction field
             // as a sub-field of the finestCorrection which is not
             // currently being used
-            scalarField::subField preSmoothedCoarseCorrField
+            solveScalarField::subField preSmoothedCoarseCorrField
             (
                 scratch2,
                 coarseCorrFields[leveli].size()
@@ -318,13 +335,16 @@ void Foam::GAMGSolver::Vcycle
 
 
             // Create A.psi for this coarse level as a sub-field of Apsi
-            scalarField::subField ACf
+            solveScalarField::subField ACf
             (
                scratch1,
                 coarseCorrFields[leveli].size()
             );
-            scalarField& ACfRef =
-                const_cast<scalarField&>(ACf.operator const scalarField&());
+            solveScalarField& ACfRef =
+                const_cast
+                <
+                    solveScalarField&
+                >(ACf.operator const solveScalarField&());
 
             if (interpolateCorrection_) //&& leveli < coarsestLevel - 2)
             {
@@ -383,10 +403,10 @@ void Foam::GAMGSolver::Vcycle
                 coarseCorrFields[leveli] += preSmoothedCoarseCorrField;
             }
 
-            smoothers[leveli + 1].smooth
+            smoothers[leveli + 1].scalarSmooth
             (
                 coarseCorrFields[leveli],
-                coarseSources[leveli],
+                coarseSources[leveli],  //coarseSource,
                 cmpt,
                 min
                 (
@@ -453,11 +473,11 @@ void Foam::GAMGSolver::Vcycle
 
 void Foam::GAMGSolver::initVcycle
 (
-    PtrList<scalarField>& coarseCorrFields,
-    PtrList<scalarField>& coarseSources,
+    PtrList<solveScalarField>& coarseCorrFields,
+    PtrList<solveScalarField>& coarseSources,
     PtrList<lduMatrix::smoother>& smoothers,
-    scalarField& scratch1,
-    scalarField& scratch2
+    solveScalarField& scratch1,
+    solveScalarField& scratch2
 ) const
 {
     label maxSize = matrix_.diag().size();
@@ -487,7 +507,7 @@ void Foam::GAMGSolver::initVcycle
         {
             label nCoarseCells = agglomeration_.nCells(leveli);
 
-            coarseSources.set(leveli, new scalarField(nCoarseCells));
+            coarseSources.set(leveli, new solveScalarField(nCoarseCells));
         }
 
         if (matrixLevels_.set(leveli))
@@ -498,7 +518,7 @@ void Foam::GAMGSolver::initVcycle
 
             maxSize = max(maxSize, nCoarseCells);
 
-            coarseCorrFields.set(leveli, new scalarField(nCoarseCells));
+            coarseCorrFields.set(leveli, new solveScalarField(nCoarseCells));
 
             smoothers.set
             (
@@ -555,8 +575,8 @@ Foam::dictionary Foam::GAMGSolver::PBiCGStabSolverDict
 
 void Foam::GAMGSolver::solveCoarsestLevel
 (
-    scalarField& coarsestCorrField,
-    const scalarField& coarsestSource
+    solveScalarField& coarsestCorrField,
+    const solveScalarField& coarsestSource
 ) const
 {
     const label coarsestLevel = matrixLevels_.size() - 1;
@@ -565,7 +585,18 @@ void Foam::GAMGSolver::solveCoarsestLevel
 
     if (directSolveCoarsest_)
     {
-        coarsestLUMatrixPtr_->solve(coarsestCorrField, coarsestSource);
+        PrecisionAdaptor<scalar, solveScalar> tcorrField
+        (
+            coarsestCorrField
+        );
+        coarsestLUMatrixPtr_->solve
+        (
+            tcorrField.constCast(),
+            ConstPrecisionAdaptor<scalar, solveScalar>
+            (
+                coarsestSource
+            )()
+        );
     }
     //else if
     //(
@@ -681,7 +712,7 @@ void Foam::GAMGSolver::solveCoarsestLevel
                 interfaceLevelsIntCoeffs_[coarsestLevel],
                 interfaceLevels_[coarsestLevel],
                 PBiCGStabSolverDict(tolerance_, relTol_)
-            ).solve
+            ).scalarSolve
             (
                 coarsestCorrField,
                 coarsestSource
@@ -697,7 +728,7 @@ void Foam::GAMGSolver::solveCoarsestLevel
                 interfaceLevelsIntCoeffs_[coarsestLevel],
                 interfaceLevels_[coarsestLevel],
                 PCGsolverDict(tolerance_, relTol_)
-            ).solve
+            ).scalarSolve
             (
                 coarsestCorrField,
                 coarsestSource
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C
index a2d791400d7..b74ced69886 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -110,16 +110,16 @@ Foam::cyclicGAMGInterfaceField::~cyclicGAMGInterfaceField()
 
 void Foam::cyclicGAMGInterfaceField::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
 ) const
 {
     // Get neighbouring field
-    scalarField pnf
+    solveScalarField pnf
     (
         cyclicInterface_.neighbPatch().interfaceInternalField(psiInternal)
     );
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H
index 9bea40da1c2..9bf1d478001 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -147,9 +147,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C
index 5a5374a4c5e..2d06cd797e4 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -94,9 +94,9 @@ Foam::processorGAMGInterfaceField::~processorGAMGInterfaceField()
 
 void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
 (
-    scalarField&,
+    solveScalarField&,
     const bool,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField&,
     const direction,
     const Pstream::commsTypes commsType
@@ -145,9 +145,9 @@ void Foam::processorGAMGInterfaceField::initInterfaceMatrixUpdate
 
 void Foam::processorGAMGInterfaceField::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField&,
+    const solveScalarField&,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
@@ -187,9 +187,13 @@ void Foam::processorGAMGInterfaceField::updateInterfaceMatrix
     }
     else
     {
-        scalarField pnf
+        solveScalarField pnf
         (
-            procInterface_.compressedReceive<scalar>(commsType, coeffs.size())
+            procInterface_.compressedReceive<solveScalar>
+            (
+                commsType,
+                coeffs.size()
+            )
         );
         transformCoupleField(pnf, cmpt);
 
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H
index bda6c771435..7ab93ec1527 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/processorGAMGInterfaceField/processorGAMGInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2014 OpenFOAM Foundation
@@ -76,10 +76,10 @@ class processorGAMGInterfaceField
             mutable label outstandingRecvRequest_;
 
             //- Scalar send buffer
-            mutable Field<scalar> scalarSendBuf_;
+            mutable solveScalarField scalarSendBuf_;
 
             //- Scalar receive buffer
-            mutable Field<scalar> scalarReceiveBuf_;
+            mutable solveScalarField scalarReceiveBuf_;
 
 
 
@@ -139,9 +139,9 @@ public:
             //- Initialise neighbour matrix update
             virtual void initInterfaceMatrixUpdate
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
@@ -150,9 +150,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCG/PBiCG.C b/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCG/PBiCG.C
index 33a8a53bfd3..a69223ea3c7 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCG/PBiCG.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCG/PBiCG.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "PBiCG.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -66,11 +67,14 @@ Foam::PBiCG::PBiCG
 
 Foam::solverPerformance Foam::PBiCG::solve
 (
-    scalarField& psi,
+    scalarField& psi_s,
     const scalarField& source,
     const direction cmpt
 ) const
 {
+    PrecisionAdaptor<solveScalar, scalar> tpsi(psi_s);
+    solveScalarField& psi = tpsi.constCast();
+
     // --- Setup class containing solver performance data
     solverPerformance solverPerf
     (
@@ -80,25 +84,31 @@ Foam::solverPerformance Foam::PBiCG::solve
 
     const label nCells = psi.size();
 
-    scalar* __restrict__ psiPtr = psi.begin();
+    solveScalar* __restrict__ psiPtr = psi.begin();
 
-    scalarField pA(nCells);
-    scalar* __restrict__ pAPtr = pA.begin();
+    solveScalarField pA(nCells);
+    solveScalar* __restrict__ pAPtr = pA.begin();
 
-    scalarField wA(nCells);
-    scalar* __restrict__ wAPtr = wA.begin();
+    solveScalarField wA(nCells);
+    solveScalar* __restrict__ wAPtr = wA.begin();
 
     // --- Calculate A.psi
     matrix_.Amul(wA, psi, interfaceBouCoeffs_, interfaces_, cmpt);
 
     // --- Calculate initial residual field
-    scalarField rA(source - wA);
-    scalar* __restrict__ rAPtr = rA.begin();
+    ConstPrecisionAdaptor<solveScalar, scalar> tsource(source);
+    solveScalarField rA(tsource() - wA);
+    solveScalar* __restrict__ rAPtr = rA.begin();
 
-    matrix().setResidualField(rA, fieldName_, true);
+    matrix().setResidualField
+    (
+        ConstPrecisionAdaptor<scalar, solveScalar>(rA)(),
+        fieldName_,
+        false
+    );
 
     // --- Calculate normalisation factor
-    const scalar normFactor = this->normFactor(psi, source, wA, pA);
+    const solveScalar normFactor = this->normFactor(psi, tsource(), wA, pA);
 
     if (lduMatrix::debug >= 2)
     {
@@ -118,21 +128,21 @@ Foam::solverPerformance Foam::PBiCG::solve
      || !solverPerf.checkConvergence(tolerance_, relTol_)
     )
     {
-        scalarField pT(nCells, 0);
-        scalar* __restrict__ pTPtr = pT.begin();
+        solveScalarField pT(nCells, 0);
+        solveScalar* __restrict__ pTPtr = pT.begin();
 
-        scalarField wT(nCells);
-        scalar* __restrict__ wTPtr = wT.begin();
+        solveScalarField wT(nCells);
+        solveScalar* __restrict__ wTPtr = wT.begin();
 
         // --- Calculate T.psi
         matrix_.Tmul(wT, psi, interfaceIntCoeffs_, interfaces_, cmpt);
 
         // --- Calculate initial transpose residual field
-        scalarField rT(source - wT);
-        scalar* __restrict__ rTPtr = rT.begin();
+        solveScalarField rT(tsource() - wT);
+        solveScalar* __restrict__ rTPtr = rT.begin();
 
         // --- Initial value not used
-        scalar wArT = 0;
+        solveScalar wArT = 0;
 
         // --- Select and construct the preconditioner
         autoPtr<lduMatrix::preconditioner> preconPtr =
@@ -146,7 +156,7 @@ Foam::solverPerformance Foam::PBiCG::solve
         do
         {
             // --- Store previous wArT
-            const scalar wArTold = wArT;
+            const solveScalar wArTold = wArT;
 
             // --- Precondition residuals
             preconPtr->precondition(wA, rA, cmpt);
@@ -165,7 +175,7 @@ Foam::solverPerformance Foam::PBiCG::solve
             }
             else
             {
-                const scalar beta = wArT/wArTold;
+                const solveScalar beta = wArT/wArTold;
 
                 for (label cell=0; cell<nCells; cell++)
                 {
@@ -179,7 +189,7 @@ Foam::solverPerformance Foam::PBiCG::solve
             matrix_.Amul(wA, pA, interfaceBouCoeffs_, interfaces_, cmpt);
             matrix_.Tmul(wT, pT, interfaceIntCoeffs_, interfaces_, cmpt);
 
-            const scalar wApT = gSumProd(wA, pT, matrix().mesh().comm());
+            const solveScalar wApT = gSumProd(wA, pT, matrix().mesh().comm());
 
             // --- Test for singularity
             if (solverPerf.checkSingularity(mag(wApT)/normFactor))
@@ -190,7 +200,7 @@ Foam::solverPerformance Foam::PBiCG::solve
 
             // --- Update solution and residual:
 
-            const scalar alpha = wArT/wApT;
+            const solveScalar alpha = wArT/wApT;
 
             for (label cell=0; cell<nCells; cell++)
             {
@@ -222,7 +232,12 @@ Foam::solverPerformance Foam::PBiCG::solve
             << exit(FatalError);
     }
 
-    matrix().setResidualField(rA, fieldName_, false);
+    matrix().setResidualField
+    (
+        ConstPrecisionAdaptor<scalar, solveScalar>(rA)(),
+        fieldName_,
+        false
+    );
 
     return solverPerf;
 }
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCGStab/PBiCGStab.C b/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCGStab/PBiCGStab.C
index 1e343565fb7..7ec60707c1b 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCGStab/PBiCGStab.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCGStab/PBiCGStab.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "PBiCGStab.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -67,10 +68,10 @@ Foam::PBiCGStab::PBiCGStab
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::solverPerformance Foam::PBiCGStab::solve
+Foam::solverPerformance Foam::PBiCGStab::scalarSolve
 (
-    scalarField& psi,
-    const scalarField& source,
+    solveScalarField& psi,
+    const solveScalarField& source,
     const direction cmpt
 ) const
 {
@@ -83,25 +84,30 @@ Foam::solverPerformance Foam::PBiCGStab::solve
 
     const label nCells = psi.size();
 
-    scalar* __restrict__ psiPtr = psi.begin();
+    solveScalar* __restrict__ psiPtr = psi.begin();
 
-    scalarField pA(nCells);
-    scalar* __restrict__ pAPtr = pA.begin();
+    solveScalarField pA(nCells);
+    solveScalar* __restrict__ pAPtr = pA.begin();
 
-    scalarField yA(nCells);
-    scalar* __restrict__ yAPtr = yA.begin();
+    solveScalarField yA(nCells);
+    solveScalar* __restrict__ yAPtr = yA.begin();
 
     // --- Calculate A.psi
     matrix_.Amul(yA, psi, interfaceBouCoeffs_, interfaces_, cmpt);
 
     // --- Calculate initial residual field
-    scalarField rA(source - yA);
-    scalar* __restrict__ rAPtr = rA.begin();
+    solveScalarField rA(source - yA);
+    solveScalar* __restrict__ rAPtr = rA.begin();
 
-    matrix().setResidualField(rA, fieldName_, true);
+    matrix().setResidualField
+    (
+        ConstPrecisionAdaptor<scalar, solveScalar>(rA)(),
+        fieldName_,
+        true
+    );
 
     // --- Calculate normalisation factor
-    const scalar normFactor = this->normFactor(psi, source, yA, pA);
+    const solveScalar normFactor = this->normFactor(psi, source, yA, pA);
 
     if (lduMatrix::debug >= 2)
     {
@@ -121,25 +127,25 @@ Foam::solverPerformance Foam::PBiCGStab::solve
      || !solverPerf.checkConvergence(tolerance_, relTol_)
     )
     {
-        scalarField AyA(nCells);
-        scalar* __restrict__ AyAPtr = AyA.begin();
+        solveScalarField AyA(nCells);
+        solveScalar* __restrict__ AyAPtr = AyA.begin();
 
-        scalarField sA(nCells);
-        scalar* __restrict__ sAPtr = sA.begin();
+        solveScalarField sA(nCells);
+        solveScalar* __restrict__ sAPtr = sA.begin();
 
-        scalarField zA(nCells);
-        scalar* __restrict__ zAPtr = zA.begin();
+        solveScalarField zA(nCells);
+        solveScalar* __restrict__ zAPtr = zA.begin();
 
-        scalarField tA(nCells);
-        scalar* __restrict__ tAPtr = tA.begin();
+        solveScalarField tA(nCells);
+        solveScalar* __restrict__ tAPtr = tA.begin();
 
         // --- Store initial residual
-        const scalarField rA0(rA);
+        const solveScalarField rA0(rA);
 
         // --- Initial values not used
-        scalar rA0rA = 0;
-        scalar alpha = 0;
-        scalar omega = 0;
+        solveScalar rA0rA = 0;
+        solveScalar alpha = 0;
+        solveScalar omega = 0;
 
         // --- Select and construct the preconditioner
         autoPtr<lduMatrix::preconditioner> preconPtr =
@@ -153,7 +159,7 @@ Foam::solverPerformance Foam::PBiCGStab::solve
         do
         {
             // --- Store previous rA0rA
-            const scalar rA0rAold = rA0rA;
+            const solveScalar rA0rAold = rA0rA;
 
             rA0rA = gSumProd(rA0, rA, matrix().mesh().comm());
 
@@ -179,7 +185,7 @@ Foam::solverPerformance Foam::PBiCGStab::solve
                     break;
                 }
 
-                const scalar beta = (rA0rA/rA0rAold)*(alpha/omega);
+                const solveScalar beta = (rA0rA/rA0rAold)*(alpha/omega);
 
                 for (label cell=0; cell<nCells; cell++)
                 {
@@ -194,7 +200,8 @@ Foam::solverPerformance Foam::PBiCGStab::solve
             // --- Calculate AyA
             matrix_.Amul(AyA, yA, interfaceBouCoeffs_, interfaces_, cmpt);
 
-            const scalar rA0AyA = gSumProd(rA0, AyA, matrix().mesh().comm());
+            const solveScalar rA0AyA =
+                gSumProd(rA0, AyA, matrix().mesh().comm());
 
             alpha = rA0rA/rA0AyA;
 
@@ -230,7 +237,7 @@ Foam::solverPerformance Foam::PBiCGStab::solve
             // --- Calculate tA
             matrix_.Amul(tA, zA, interfaceBouCoeffs_, interfaces_, cmpt);
 
-            const scalar tAtA = gSumSqr(tA, matrix().mesh().comm());
+            const solveScalar tAtA = gSumSqr(tA, matrix().mesh().comm());
 
             // --- Calculate omega from tA and sA
             //     (cheaper than using zA with preconditioned tA)
@@ -256,10 +263,34 @@ Foam::solverPerformance Foam::PBiCGStab::solve
         );
     }
 
-    matrix().setResidualField(rA, fieldName_, false);
+    matrix().setResidualField
+    (
+        ConstPrecisionAdaptor<scalar, solveScalar>(rA)(),
+        fieldName_,
+        false
+    );
 
     return solverPerf;
 }
 
 
+Foam::solverPerformance Foam::PBiCGStab::solve
+(
+    scalarField& psi_s,
+    const scalarField& source,
+    const direction cmpt
+) const
+{
+    PrecisionAdaptor<solveScalar, scalar> tpsi(psi_s);
+    solveScalarField& psi = tpsi.constCast();
+
+    return scalarSolve
+    (
+        psi,
+        ConstPrecisionAdaptor<solveScalar, scalar>(source)(),
+        cmpt
+    );
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCGStab/PBiCGStab.H b/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCGStab/PBiCGStab.H
index 0ea17bfb464..6c4771e9727 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCGStab/PBiCGStab.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/PBiCGStab/PBiCGStab.H
@@ -104,6 +104,14 @@ public:
 
     // Member Functions
 
+        //- Solve the matrix with this solver
+        virtual solverPerformance scalarSolve
+        (
+            solveScalarField& psi,
+            const solveScalarField& source,
+            const direction cmpt = 0
+        ) const;
+
         //- Solve the matrix with this solver
         virtual solverPerformance solve
         (
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/PCG/PCG.C b/src/OpenFOAM/matrices/lduMatrix/solvers/PCG/PCG.C
index e1e98996828..49e9e5017fa 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/PCG/PCG.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/PCG/PCG.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -26,6 +26,7 @@ License
 \*---------------------------------------------------------------------------*/
 
 #include "PCG.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -64,10 +65,10 @@ Foam::PCG::PCG
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-Foam::solverPerformance Foam::PCG::solve
+Foam::solverPerformance Foam::PCG::scalarSolve
 (
-    scalarField& psi,
-    const scalarField& source,
+    solveScalarField& psi,
+    const solveScalarField& source,
     const direction cmpt
 ) const
 {
@@ -80,28 +81,33 @@ Foam::solverPerformance Foam::PCG::solve
 
     label nCells = psi.size();
 
-    scalar* __restrict__ psiPtr = psi.begin();
+    solveScalar* __restrict__ psiPtr = psi.begin();
 
-    scalarField pA(nCells);
-    scalar* __restrict__ pAPtr = pA.begin();
+    solveScalarField pA(nCells);
+    solveScalar* __restrict__ pAPtr = pA.begin();
 
-    scalarField wA(nCells);
-    scalar* __restrict__ wAPtr = wA.begin();
+    solveScalarField wA(nCells);
+    solveScalar* __restrict__ wAPtr = wA.begin();
 
-    scalar wArA = solverPerf.great_;
-    scalar wArAold = wArA;
+    solveScalar wArA = solverPerf.great_;
+    solveScalar wArAold = wArA;
 
     // --- Calculate A.psi
     matrix_.Amul(wA, psi, interfaceBouCoeffs_, interfaces_, cmpt);
 
     // --- Calculate initial residual field
-    scalarField rA(source - wA);
-    scalar* __restrict__ rAPtr = rA.begin();
+    solveScalarField rA(source - wA);
+    solveScalar* __restrict__ rAPtr = rA.begin();
 
-    matrix().setResidualField(rA, fieldName_, true);
+    matrix().setResidualField
+    (
+        ConstPrecisionAdaptor<scalar, solveScalar>(rA)(),
+        fieldName_,
+        false
+    );
 
     // --- Calculate normalisation factor
-    scalar normFactor = this->normFactor(psi, source, wA, pA);
+    solveScalar normFactor = this->normFactor(psi, source, wA, pA);
 
     if (lduMatrix::debug >= 2)
     {
@@ -150,7 +156,7 @@ Foam::solverPerformance Foam::PCG::solve
             }
             else
             {
-                scalar beta = wArA/wArAold;
+                solveScalar beta = wArA/wArAold;
 
                 for (label cell=0; cell<nCells; cell++)
                 {
@@ -162,8 +168,7 @@ Foam::solverPerformance Foam::PCG::solve
             // --- Update preconditioned residual
             matrix_.Amul(wA, pA, interfaceBouCoeffs_, interfaces_, cmpt);
 
-            scalar wApA = gSumProd(wA, pA, matrix().mesh().comm());
-
+            solveScalar wApA = gSumProd(wA, pA, matrix().mesh().comm());
 
             // --- Test for singularity
             if (solverPerf.checkSingularity(mag(wApA)/normFactor)) break;
@@ -171,7 +176,7 @@ Foam::solverPerformance Foam::PCG::solve
 
             // --- Update solution and residual:
 
-            scalar alpha = wArA/wApA;
+            solveScalar alpha = wArA/wApA;
 
             for (label cell=0; cell<nCells; cell++)
             {
@@ -193,10 +198,33 @@ Foam::solverPerformance Foam::PCG::solve
         );
     }
 
-    matrix().setResidualField(rA, fieldName_, false);
+    matrix().setResidualField
+    (
+        ConstPrecisionAdaptor<scalar, solveScalar>(rA)(),
+        fieldName_,
+        false
+    );
 
     return solverPerf;
 }
 
 
+
+Foam::solverPerformance Foam::PCG::solve
+(
+    scalarField& psi_s,
+    const scalarField& source,
+    const direction cmpt
+) const
+{
+    PrecisionAdaptor<solveScalar, scalar> tpsi(psi_s);
+    return scalarSolve
+    (
+        tpsi.constCast(),
+        ConstPrecisionAdaptor<solveScalar, scalar>(source)(),
+        cmpt
+    );
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/PCG/PCG.H b/src/OpenFOAM/matrices/lduMatrix/solvers/PCG/PCG.H
index ed53f729ac6..15b140ede3b 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/PCG/PCG.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/PCG/PCG.H
@@ -92,6 +92,14 @@ public:
 
     // Member Functions
 
+        //- Solve the matrix with this solver
+        virtual solverPerformance scalarSolve
+        (
+            solveScalarField& psi,
+            const solveScalarField& source,
+            const direction cmpt=0
+        ) const;
+
         //- Solve the matrix with this solver
         virtual solverPerformance solve
         (
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C b/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C
index f2689fe56d0..f26fb5c676f 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/smoothSolver/smoothSolver.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2014 OpenFOAM Foundation
@@ -27,6 +27,7 @@ License
 
 #include "smoothSolver.H"
 #include "profiling.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
 
@@ -79,11 +80,14 @@ void Foam::smoothSolver::readControls()
 
 Foam::solverPerformance Foam::smoothSolver::solve
 (
-    scalarField& psi,
+    scalarField& psi_s,
     const scalarField& source,
     const direction cmpt
 ) const
 {
+    PrecisionAdaptor<solveScalar, scalar> tpsi(psi_s);
+    solveScalarField& psi = tpsi.constCast();
+
     // Setup class containing solver performance data
     solverPerformance solverPerf(typeName, fieldName_);
 
@@ -114,22 +118,29 @@ Foam::solverPerformance Foam::smoothSolver::solve
     }
     else
     {
-        scalar normFactor = 0;
-        scalarField residual;
+        solveScalar normFactor = 0;
+        solveScalarField residual;
+
+        ConstPrecisionAdaptor<solveScalar, scalar> tsource(source);
 
         {
-            scalarField Apsi(psi.size());
-            scalarField temp(psi.size());
+            solveScalarField Apsi(psi.size());
+            solveScalarField temp(psi.size());
 
             // Calculate A.psi
             matrix_.Amul(Apsi, psi, interfaceBouCoeffs_, interfaces_, cmpt);
 
             // Calculate normalisation factor
-            normFactor = this->normFactor(psi, source, Apsi, temp);
+            normFactor = this->normFactor(psi, tsource(), Apsi, temp);
 
-            residual = source - Apsi;
+            residual = tsource() - Apsi;
 
-            matrix().setResidualField(residual, fieldName_, true);
+            matrix().setResidualField
+            (
+                ConstPrecisionAdaptor<scalar, solveScalar>(residual)(),
+                fieldName_,
+                false
+            );
 
             // Calculate residual magnitude
             solverPerf.initialResidual() =
@@ -197,7 +208,12 @@ Foam::solverPerformance Foam::smoothSolver::solve
             );
         }
 
-        matrix().setResidualField(residual, fieldName_, false);
+        matrix().setResidualField
+        (
+            ConstPrecisionAdaptor<scalar, solveScalar>(residual)(),
+            fieldName_,
+            false
+        );
     }
 
     return solverPerf;
diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C b/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C
index 574227b89e0..82703d19eda 100644
--- a/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C
+++ b/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -28,6 +28,10 @@ Description
 
 \*---------------------------------------------------------------------------*/
 
+#include "PrecisionAdaptor.H"
+
+// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
+
 template<class Type>
 void Foam::faMatrix<Type>::setComponentReference
 (
@@ -96,25 +100,30 @@ Foam::SolverPerformance<Type> Foam::faMatrix<Type>::solve
         // Use the initMatrixInterfaces and updateMatrixInterfaces to correct
         // bouCoeffsCmpt for the explicit part of the coupled boundary
         // conditions
-        initMatrixInterfaces
-        (
-            true,
-            bouCoeffsCmpt,
-            interfaces,
-            psiCmpt,
-            sourceCmpt,
-            cmpt
-        );
+        {
+            PrecisionAdaptor<solveScalar, scalar> sourceCmpt_ss(sourceCmpt);
+            ConstPrecisionAdaptor<solveScalar, scalar> psiCmpt_ss(psiCmpt);
 
-        updateMatrixInterfaces
-        (
-            true,
-            bouCoeffsCmpt,
-            interfaces,
-            psiCmpt,
-            sourceCmpt,
-            cmpt
-        );
+            initMatrixInterfaces
+            (
+                true,
+                bouCoeffsCmpt,
+                interfaces,
+                psiCmpt_ss(),
+                sourceCmpt_ss.ref(),
+                cmpt
+            );
+
+            updateMatrixInterfaces
+            (
+                true,
+                bouCoeffsCmpt,
+                interfaces,
+                psiCmpt_ss(),
+                sourceCmpt_ss.ref(),
+                cmpt
+            );
+        }
 
         solverPerformance solverPerf;
 
diff --git a/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C b/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C
index df469cc1e12..b7eefba1172 100644
--- a/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C
+++ b/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -30,6 +30,7 @@ Description
 
 #include "faScalarMatrix.H"
 #include "zeroGradientFaPatchFields.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
@@ -101,21 +102,27 @@ Foam::tmp<Foam::scalarField> Foam::faMatrix<Foam::scalar>::residual() const
     scalarField boundaryDiag(psi_.size(), Zero);
     addBoundaryDiag(boundaryDiag, 0);
 
-    tmp<scalarField> tres
+    const scalarField& psif = psi_.internalField();
+    ConstPrecisionAdaptor<solveScalar, scalar> tpsi(psif);
+    const solveScalarField& psi = tpsi();
+
+    tmp<solveScalarField> tres
     (
         lduMatrix::residual
         (
-            psi_.internalField(),
-            source_ - boundaryDiag*psi_.internalField(),
+            psi,
+            source_ - boundaryDiag*psif,
             boundaryCoeffs_,
             psi_.boundaryField().scalarInterfaces(),
             0
         )
     );
 
-    addBoundarySource(tres.ref());
+    ConstPrecisionAdaptor<scalar, solveScalar> tres_s(tres);
+
+    addBoundarySource(tres_s.ref());
 
-    return tres;
+    return tres_s;
 }
 
 
diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H
index 511e98e7364..8fd6cbfe978 100644
--- a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H
+++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -183,16 +183,16 @@ public:
             //- Transform given patch component field
             virtual void transformCoupleField
             (
-                scalarField& f,
+                solveScalarField& f,
                 const direction cmpt
             ) const = 0;
 
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction,
                 const Pstream::commsTypes commsType
diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C
index 14fa7dcd3c3..13d685a1e66 100644
--- a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C
+++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -161,15 +161,15 @@ Foam::cyclicFaPatchField<Type>::patchNeighbourField() const
 template<class Type>
 void Foam::cyclicFaPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
 ) const
 {
-    scalarField pnf(this->size());
+    solveScalarField pnf(this->size());
 
     label sizeby2 = this->size()/2;
     const labelUList& faceCells = cyclicPatch_.faceCells();
diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H
index b8185a5c0f3..3b265bcdd32 100644
--- a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H
+++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -166,7 +166,7 @@ public:
             //- Transform neighbour field
             virtual void transformCoupleField
             (
-                scalarField& f,
+                solveScalarField& f,
                 const direction cmpt
             ) const
             {
@@ -176,9 +176,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C
index 9db7f49ac5d..4d5e13ec1b9 100644
--- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C
+++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -189,9 +189,9 @@ Foam::tmp<Foam::Field<Type>> Foam::processorFaPatchField<Type>::snGrad() const
 template<class Type>
 void Foam::processorFaPatchField<Type>::initInterfaceMatrixUpdate
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction,
     const Pstream::commsTypes commsType
@@ -208,17 +208,17 @@ void Foam::processorFaPatchField<Type>::initInterfaceMatrixUpdate
 template<class Type>
 void Foam::processorFaPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField&,
+    const solveScalarField&,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
 ) const
 {
-    scalarField pnf
+    solveScalarField pnf
     (
-        procPatch_.receive<scalar>(commsType, this->size())()
+        procPatch_.receive<solveScalar>(commsType, this->size())()
     );
 
     // Transform according to the transformation tensor
diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H
index b516620e60b..4df002aa103 100644
--- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H
+++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -180,7 +180,7 @@ public:
             //- Transform neighbour field
             virtual void transformCoupleField
             (
-                scalarField& f,
+                solveScalarField& f,
                 const direction cmpt
             ) const
             {
@@ -190,9 +190,9 @@ public:
             //- Initialise neighbour matrix update
             virtual void initInterfaceMatrixUpdate
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
@@ -201,9 +201,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.C b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.C
index 6f52b046a0b..d26df7ce026 100644
--- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.C
+++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -32,7 +32,7 @@ License
 template<>
 void Foam::processorFaPatchField<Foam::scalar>::transformCoupleField
 (
-    scalarField& f,
+    solveScalarField& f,
     const direction cmpt
 ) const
 {}
@@ -41,9 +41,9 @@ void Foam::processorFaPatchField<Foam::scalar>::transformCoupleField
 template<>
 void Foam::processorFaPatchField<Foam::scalar>::initInterfaceMatrixUpdate
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction,
     const Pstream::commsTypes commsType
@@ -60,17 +60,17 @@ void Foam::processorFaPatchField<Foam::scalar>::initInterfaceMatrixUpdate
 template<>
 void Foam::processorFaPatchField<Foam::scalar>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField&,
+    const solveScalarField&,
     const scalarField& coeffs,
     const direction,
     const Pstream::commsTypes commsType
 ) const
 {
-    scalarField pnf
+    solveScalarField pnf
     (
-        procPatch_.receive<scalar>(commsType, this->size())()
+        procPatch_.receive<solveScalar>(commsType, this->size())()
     );
 
     const labelUList& edgeFaces = patch().edgeFaces();
diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.H b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.H
index 4db957540c5..e737506c833 100644
--- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.H
+++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2016-2017 Wikki Ltd
@@ -40,7 +40,7 @@ namespace Foam
 template<>
 void processorFaPatchField<scalar>::transformCoupleField
 (
-    scalarField& f,
+    solveScalarField& f,
     const direction cmpt
 ) const;
 
@@ -48,9 +48,9 @@ void processorFaPatchField<scalar>::transformCoupleField
 template<>
 void processorFaPatchField<scalar>::initInterfaceMatrixUpdate
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField&,
+    const solveScalarField&,
     const scalarField& coeffs,
     const direction,
     const Pstream::commsTypes commsType
@@ -60,9 +60,9 @@ void processorFaPatchField<scalar>::initInterfaceMatrixUpdate
 template<>
 void processorFaPatchField<scalar>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField&,
+    const solveScalarField&,
     const scalarField& coeffs,
     const direction,
     const Pstream::commsTypes commsType
diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H
index 9b526989534..6b54e4a8451 100644
--- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -208,9 +208,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction,
                 const Pstream::commsTypes commsType
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C
index ffe83dd66b5..985eb0edd27 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -172,9 +172,9 @@ Foam::cyclicFvPatchField<Type>::neighbourPatchField() const
 template<class Type>
 void Foam::cyclicFvPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
@@ -183,7 +183,7 @@ void Foam::cyclicFvPatchField<Type>::updateInterfaceMatrix
     const labelUList& nbrFaceCells =
         cyclicPatch().cyclicPatch().neighbPatch().faceCells();
 
-    scalarField pnf(psiInternal, nbrFaceCells);
+    solveScalarField pnf(psiInternal, nbrFaceCells);
 
     // Transform according to the transformation tensors
     transformCoupleField(pnf, cmpt);
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H
index a9160e46bcb..9c4569c04b8 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -179,9 +179,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C
index 5df46501099..b1cbe8409d3 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2013-2017 OpenFOAM Foundation
@@ -215,9 +215,9 @@ Foam::cyclicACMIFvPatchField<Type>::nonOverlapPatchField() const
 template<class Type>
 void Foam::cyclicACMIFvPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
@@ -230,7 +230,7 @@ void Foam::cyclicACMIFvPatchField<Type>::updateInterfaceMatrix
     const labelUList& nbrFaceCellsCoupled =
         cpp.neighbPatch().faceCells();
 
-    scalarField pnf(psiInternal, nbrFaceCellsCoupled);
+    solveScalarField pnf(psiInternal, nbrFaceCellsCoupled);
 
     // Transform according to the transformation tensors
     transformCoupleField(pnf, cmpt);
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H
index 97fbc8621e6..f81705f9175 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2013-2016 OpenFOAM Foundation
@@ -203,9 +203,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C
index cb618992152..06755dd19a6 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -178,9 +178,9 @@ Foam::cyclicAMIFvPatchField<Type>::neighbourPatchField() const
 template<class Type>
 void Foam::cyclicAMIFvPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
@@ -189,14 +189,14 @@ void Foam::cyclicAMIFvPatchField<Type>::updateInterfaceMatrix
     const labelUList& nbrFaceCells =
         cyclicAMIPatch_.cyclicAMIPatch().neighbPatch().faceCells();
 
-    scalarField pnf(psiInternal, nbrFaceCells);
+    solveScalarField pnf(psiInternal, nbrFaceCells);
 
     // Transform according to the transformation tensors
     transformCoupleField(pnf, cmpt);
 
     if (cyclicAMIPatch_.applyLowWeightCorrection())
     {
-        scalarField pif(psiInternal, cyclicAMIPatch_.faceCells());
+        solveScalarField pif(psiInternal, cyclicAMIPatch_.faceCells());
         pnf = cyclicAMIPatch_.interpolate(pnf, pif);
     }
     else
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H
index 50f7c4f4ce7..c584ad99d18 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -184,9 +184,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C
index 03a0109ef36..91cc9bdcf98 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -133,9 +133,9 @@ Foam::jumpCyclicFvPatchField<Type>::patchNeighbourField() const
 template<class Type>
 void Foam::jumpCyclicFvPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H
index ce8805bd767..55ac8b0edfb 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -129,9 +129,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
@@ -152,9 +152,9 @@ public:
 template<>
 void jumpCyclicFvPatchField<scalar>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
@@ -164,9 +164,9 @@ void jumpCyclicFvPatchField<scalar>::updateInterfaceMatrix
 template<>
 void jumpCyclicFvPatchField<vector>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchFields.C
index 94d9822e68e..cd4708c9d45 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchFields.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclic/jumpCyclicFvPatchFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2018 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2018-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -41,21 +41,25 @@ namespace Foam
 template<>
 void Foam::jumpCyclicFvPatchField<Foam::scalar>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
 ) const
 {
-    scalarField pnf(this->size());
+    solveScalarField pnf(this->size());
 
     const labelUList& nbrFaceCells =
         this->cyclicPatch().neighbFvPatch().faceCells();
 
     // only apply jump to original field
-    if (&psiInternal == &this->primitiveField())
+    if
+    (
+        reinterpret_cast<const void*>(&psiInternal)
+     == reinterpret_cast<const void*>(&this->primitiveField())
+    )
     {
         Field<scalar> jf(this->jump());
 
@@ -88,15 +92,15 @@ void Foam::jumpCyclicFvPatchField<Foam::scalar>::updateInterfaceMatrix
 template<>
 void Foam::jumpCyclicFvPatchField<Foam::vector>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
 ) const
 {
-    scalarField pnf(this->size());
+    solveScalarField pnf(this->size());
 
     const labelUList& nbrFaceCells =
         this->cyclicPatch().neighbFvPatch().faceCells();
@@ -104,7 +108,11 @@ void Foam::jumpCyclicFvPatchField<Foam::vector>::updateInterfaceMatrix
     const Field<vector>& iField = this->primitiveField();
 
     // only apply jump to original field
-    if (&psiInternal == &(iField.component(cmpt).ref()))
+    if
+    (
+        reinterpret_cast<const void*>(&psiInternal)
+     == reinterpret_cast<const void*>(&(iField.component(cmpt).ref()))
+    )
     {
         Field<vector> jf(this->jump());
 
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C
index 182db1b9d25..15063306399 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012-2017 OpenFOAM Foundation
@@ -135,9 +135,9 @@ Foam::jumpCyclicAMIFvPatchField<Type>::patchNeighbourField() const
 template<class Type>
 void Foam::jumpCyclicAMIFvPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H
index 440b9978bee..8249c7744ed 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012-2016 OpenFOAM Foundation
@@ -132,9 +132,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
@@ -156,9 +156,9 @@ public:
 template<>
 void jumpCyclicAMIFvPatchField<scalar>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchFields.C
index 018342789e2..8284ca4f332 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchFields.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchFields.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012-2016 OpenFOAM Foundation
@@ -43,9 +43,9 @@ makePatchFieldTypeNames(jumpCyclicAMI);
 template<>
 void Foam::jumpCyclicAMIFvPatchField<scalar>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
@@ -54,12 +54,16 @@ void Foam::jumpCyclicAMIFvPatchField<scalar>::updateInterfaceMatrix
     const labelUList& nbrFaceCells =
         this->cyclicAMIPatch().cyclicAMIPatch().neighbPatch().faceCells();
 
-    scalarField pnf(psiInternal, nbrFaceCells);
+    solveScalarField pnf(psiInternal, nbrFaceCells);
 
     pnf = this->cyclicAMIPatch().interpolate(pnf);
 
     // only apply jump to original field
-    if (&psiInternal == &this->primitiveField())
+    if
+    (
+        reinterpret_cast<const void*>(&psiInternal)
+     == reinterpret_cast<const void*>(&this->primitiveField())
+    )
     {
         Field<scalar> jf(this->jump());
 
@@ -68,7 +72,11 @@ void Foam::jumpCyclicAMIFvPatchField<scalar>::updateInterfaceMatrix
             jf *= -1.0;
         }
 
-        pnf -= jf;
+        //pnf -= jf;
+        forAll(pnf, i)
+        {
+            pnf[i] -= jf[i];
+        }
     }
 
     // Transform according to the transformation tensors
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
index 1ebb924dec5..87053f0d965 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C
@@ -310,9 +310,9 @@ Foam::processorFvPatchField<Type>::snGrad
 template<class Type>
 void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
 (
-    scalarField&,
+    solveScalarField&,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField&,
     const direction,
     const Pstream::commsTypes commsType
@@ -371,9 +371,9 @@ void Foam::processorFvPatchField<Type>::initInterfaceMatrixUpdate
 template<class Type>
 void Foam::processorFvPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField&,
+    const solveScalarField&,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
@@ -415,9 +415,13 @@ void Foam::processorFvPatchField<Type>::updateInterfaceMatrix
     }
     else
     {
-        scalarField pnf
+        solveScalarField pnf
         (
-            procPatch_.compressedReceive<scalar>(commsType, this->size())()
+            procPatch_.compressedReceive<solveScalar>
+            (
+                commsType,
+                this->size()
+            )()
         );
 
         if (!std::is_arithmetic<Type>::value)
diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H
index 1163838e1ab..b9046414b6f 100644
--- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -88,10 +88,11 @@ class processorFvPatchField
             mutable label outstandingRecvRequest_;
 
             //- Scalar send buffer
-            mutable Field<scalar> scalarSendBuf_;
+            mutable solveScalarField scalarSendBuf_;
 
             //- Scalar receive buffer
-            mutable Field<scalar> scalarReceiveBuf_;
+            mutable solveScalarField scalarReceiveBuf_;
+
 
 public:
 
@@ -210,9 +211,9 @@ public:
             //- Initialise neighbour matrix update
             virtual void initInterfaceMatrixUpdate
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
@@ -221,9 +222,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
index 00ae2e2d183..e82c7a7d416 100644
--- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2011 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -49,6 +49,7 @@ SourceFiles
 #include "fvPatch.H"
 #include "DimensionedField.H"
 #include "fieldTypes.H"
+#include "scalarField.H"
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
index 8e0da9f59c1..f5dc7272820 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2011, 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2011, 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -28,6 +28,7 @@ License
 #include "LduMatrix.H"
 #include "diagTensorField.H"
 #include "profiling.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
@@ -173,25 +174,30 @@ Foam::SolverPerformance<Type> Foam::fvMatrix<Type>::solveSegregated
         // Use the initMatrixInterfaces and updateMatrixInterfaces to correct
         // bouCoeffsCmpt for the explicit part of the coupled boundary
         // conditions
-        initMatrixInterfaces
-        (
-            true,
-            bouCoeffsCmpt,
-            interfaces,
-            psiCmpt,
-            sourceCmpt,
-            cmpt
-        );
+        {
+            PrecisionAdaptor<solveScalar, scalar> sourceCmpt_ss(sourceCmpt);
+            ConstPrecisionAdaptor<solveScalar, scalar> psiCmpt_ss(psiCmpt);
 
-        updateMatrixInterfaces
-        (
-            true,
-            bouCoeffsCmpt,
-            interfaces,
-            psiCmpt,
-            sourceCmpt,
-            cmpt
-        );
+            initMatrixInterfaces
+            (
+                true,
+                bouCoeffsCmpt,
+                interfaces,
+                psiCmpt_ss(),
+                sourceCmpt_ss.constCast(),
+                cmpt
+            );
+
+            updateMatrixInterfaces
+            (
+                true,
+                bouCoeffsCmpt,
+                interfaces,
+                psiCmpt_ss(),
+                sourceCmpt_ss.constCast(),
+                cmpt
+            );
+        }
 
         solverPerformance solverPerf;
 
diff --git a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C
index 4b6e6ac15eb..1f72ec1fed8 100644
--- a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C
+++ b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2004-2010, 2016 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2017 OpenFOAM Foundation
@@ -28,6 +28,7 @@ License
 #include "fvScalarMatrix.H"
 #include "extrapolatedCalculatedFvPatchFields.H"
 #include "profiling.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
@@ -199,21 +200,24 @@ Foam::tmp<Foam::scalarField> Foam::fvMatrix<Foam::scalar>::residual() const
     scalarField boundaryDiag(psi_.size(), Zero);
     addBoundaryDiag(boundaryDiag, 0);
 
-    tmp<scalarField> tres
+    const scalarField& psif = psi_.primitiveField();
+    ConstPrecisionAdaptor<solveScalar, scalar> tpsi(psif);
+    const solveScalarField& psi = tpsi();
+
+    tmp<solveScalarField> tres
     (
         lduMatrix::residual
         (
-            psi_.primitiveField(),
-            source_ - boundaryDiag*psi_.primitiveField(),
+            psi,
+            source_ - boundaryDiag*psif,
             boundaryCoeffs_,
             psi_.boundaryField().scalarInterfaces(),
             0
         )
     );
-
-    addBoundarySource(tres.ref());
-
-    return tres;
+    ConstPrecisionAdaptor<scalar, solveScalar> tres_s(tres);
+    addBoundarySource(tres_s.constCast());
+    return tres_s;
 }
 
 
diff --git a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.C b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.C
index d85391f85d8..42bd8162db5 100644
--- a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.C
+++ b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2013 OpenFOAM Foundation
@@ -94,16 +94,16 @@ Foam::cyclicACMIGAMGInterfaceField::~cyclicACMIGAMGInterfaceField()
 
 void Foam::cyclicACMIGAMGInterfaceField::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
 ) const
 {
     // Get neighbouring field
-    scalarField pnf
+    solveScalarField pnf
     (
         cyclicACMIInterface_.neighbPatch().interfaceInternalField(psiInternal)
     );
diff --git a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.H b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.H
index 54619b13cbd..c4c5b764ce3 100644
--- a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.H
+++ b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicACMIGAMGInterfaceField/cyclicACMIGAMGInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2013 OpenFOAM Foundation
@@ -124,9 +124,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C
index 4846c224849..a7216ade354 100644
--- a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C
+++ b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -94,16 +94,16 @@ Foam::cyclicAMIGAMGInterfaceField::~cyclicAMIGAMGInterfaceField()
 
 void Foam::cyclicAMIGAMGInterfaceField::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
 ) const
 {
     // Get neighbouring field
-    scalarField pnf
+    solveScalarField pnf
     (
         cyclicAMIInterface_.neighbPatch().interfaceInternalField(psiInternal)
     );
diff --git a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.H b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.H
index 87eef60af7b..2bd73e53b02 100644
--- a/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.H
+++ b/src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -123,9 +123,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMILduInterfaceField/cyclicACMILduInterfaceField.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMILduInterfaceField/cyclicACMILduInterfaceField.C
index 414cd465395..5333f7ded60 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMILduInterfaceField/cyclicACMILduInterfaceField.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMILduInterfaceField/cyclicACMILduInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2013 OpenFOAM Foundation
@@ -46,7 +46,7 @@ Foam::cyclicACMILduInterfaceField::~cyclicACMILduInterfaceField()
 
 void Foam::cyclicACMILduInterfaceField::transformCoupleField
 (
-    scalarField& f,
+    solveScalarField& f,
     const direction cmpt
 ) const
 {
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMILduInterfaceField/cyclicACMILduInterfaceField.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMILduInterfaceField/cyclicACMILduInterfaceField.H
index 1b3b8f200e9..006329f0780 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMILduInterfaceField/cyclicACMILduInterfaceField.H
+++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMILduInterfaceField/cyclicACMILduInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2013 OpenFOAM Foundation
@@ -79,7 +79,7 @@ public:
         //- Transform given patch internal field
         void transformCoupleField
         (
-            scalarField& psiInternal,
+            solveScalarField& psiInternal,
             const direction cmpt
         ) const;
 };
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.C
index f414d508ff6..7acdea3dc68 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.C
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -46,7 +46,7 @@ Foam::cyclicAMILduInterfaceField::~cyclicAMILduInterfaceField()
 
 void Foam::cyclicAMILduInterfaceField::transformCoupleField
 (
-    scalarField& f,
+    solveScalarField& f,
     const direction cmpt
 ) const
 {
diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.H
index c8aefbb0301..8f40541b9bb 100644
--- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.H
+++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -92,7 +92,7 @@ public:
         //- Transform given patch internal field
         void transformCoupleField
         (
-            scalarField& psiInternal,
+            solveScalarField& psiInternal,
             const direction cmpt
         ) const;
 };
diff --git a/src/meshTools/regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledGAMGInterfaceField.H b/src/meshTools/regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledGAMGInterfaceField.H
index e27633cc076..13031281d8b 100644
--- a/src/meshTools/regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledGAMGInterfaceField.H
+++ b/src/meshTools/regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledGAMGInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -113,9 +113,9 @@ public:
             //- Interface matrix update
             virtual void updateInterfaceMatrix
             (
-                scalarField&,
+                solveScalarField&,
                 const bool add,
-                const scalarField&,
+                const solveScalarField&,
                 const scalarField&,
                 const direction,
                 const Pstream::commsTypes commsType
diff --git a/src/meshTools/regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledWallGAMGInterfaceField.H b/src/meshTools/regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledWallGAMGInterfaceField.H
index a137af8ffab..310bd53ea56 100644
--- a/src/meshTools/regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledWallGAMGInterfaceField.H
+++ b/src/meshTools/regionCoupled/GAMG/interfaceFields/regionCoupledGAMGInterfaceField/regionCoupledWallGAMGInterfaceField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2013 OpenFOAM Foundation
@@ -114,9 +114,9 @@ public:
             //- Interface matrix update
             virtual void updateInterfaceMatrix
             (
-                scalarField&,
+                solveScalarField&,
                 const bool add,
-                const scalarField&,
+                const solveScalarField&,
                 const scalarField&,
                 const direction,
                 const Pstream::commsTypes commsType
diff --git a/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.C b/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.C
index e24cd5c43ba..43545c4248f 100644
--- a/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.C
+++ b/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2004-2010, 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -84,20 +84,13 @@ calculatedProcessorGAMGInterfaceField
 {}
 
 
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-Foam::calculatedProcessorGAMGInterfaceField::
-~calculatedProcessorGAMGInterfaceField()
-{}
-
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
 void Foam::calculatedProcessorGAMGInterfaceField::initInterfaceMatrixUpdate
 (
-    scalarField&,
-    const bool,
-    const scalarField& psiInternal,
+    solveScalarField&,
+    const bool add,
+    const solveScalarField& psiInternal,
     const scalarField&,
     const direction,
     const Pstream::commsTypes commsType
@@ -147,9 +140,9 @@ void Foam::calculatedProcessorGAMGInterfaceField::initInterfaceMatrixUpdate
 
 void Foam::calculatedProcessorGAMGInterfaceField::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField&,
+    const solveScalarField&,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
@@ -189,9 +182,13 @@ void Foam::calculatedProcessorGAMGInterfaceField::updateInterfaceMatrix
     }
     else
     {
-        scalarField pnf
+        solveScalarField pnf
         (
-            procInterface_.compressedReceive<scalar>(commsType, coeffs.size())
+            procInterface_.compressedReceive<solveScalar>
+            (
+                commsType,
+                this->size()
+            )()
         );
         transformCoupleField(pnf, cmpt);
 
diff --git a/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.H b/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.H
index b93f91edfde..d759fc301b9 100644
--- a/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.H
+++ b/src/overset/lduPrimitiveProcessorInterface/GAMG/calculatedProcessorGAMGInterfaceField.H
@@ -74,10 +74,10 @@ class calculatedProcessorGAMGInterfaceField
             mutable label outstandingRecvRequest_;
 
             //- Scalar send buffer
-            mutable Field<scalar> scalarSendBuf_;
+            mutable solveScalarField scalarSendBuf_;
 
             //- Scalar receive buffer
-            mutable Field<scalar> scalarReceiveBuf_;
+            mutable solveScalarField scalarReceiveBuf_;
 
 
 
@@ -118,7 +118,7 @@ public:
 
 
     //- Destructor
-    virtual ~calculatedProcessorGAMGInterfaceField();
+    virtual ~calculatedProcessorGAMGInterfaceField() = default;
 
 
     // Member Functions
@@ -137,9 +137,9 @@ public:
             //- Initialise neighbour matrix update
             virtual void initInterfaceMatrixUpdate
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
@@ -148,9 +148,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/overset/lduPrimitiveProcessorInterface/calculatedProcessorFvPatchField.C b/src/overset/lduPrimitiveProcessorInterface/calculatedProcessorFvPatchField.C
index 413f4ee0d90..efcb764a713 100644
--- a/src/overset/lduPrimitiveProcessorInterface/calculatedProcessorFvPatchField.C
+++ b/src/overset/lduPrimitiveProcessorInterface/calculatedProcessorFvPatchField.C
@@ -213,9 +213,9 @@ void Foam::calculatedProcessorFvPatchField<Type>::evaluate
 template<class Type>
 void Foam::calculatedProcessorFvPatchField<Type>::initInterfaceMatrixUpdate
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
@@ -268,14 +268,13 @@ void Foam::calculatedProcessorFvPatchField<Type>::initInterfaceMatrixUpdate
 }
 
 
-
 template<class Type>
 void Foam::calculatedProcessorFvPatchField<Type>::addToInternalField
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
     const scalarField& coeffs,
-    const scalarField& vals
+    const solveScalarField& vals
 ) const
 {
     const labelUList& faceCells = this->procInterface_.faceCells();
@@ -300,9 +299,9 @@ void Foam::calculatedProcessorFvPatchField<Type>::addToInternalField
 template<class Type>
 void Foam::calculatedProcessorFvPatchField<Type>::updateInterfaceMatrix
 (
-    scalarField& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes commsType
diff --git a/src/overset/lduPrimitiveProcessorInterface/calculatedProcessorFvPatchField.H b/src/overset/lduPrimitiveProcessorInterface/calculatedProcessorFvPatchField.H
index 96d23137979..a4592860334 100644
--- a/src/overset/lduPrimitiveProcessorInterface/calculatedProcessorFvPatchField.H
+++ b/src/overset/lduPrimitiveProcessorInterface/calculatedProcessorFvPatchField.H
@@ -46,8 +46,6 @@ SourceFiles
 #define calculatedProcessorFvPatchField_H
 
 #include "lduPrimitiveProcessorInterface.H"
-//#include "lduInterfaceField.H"
-//#include "fvPatchField.H"
 #include "coupledFvPatchField.H"
 #include "processorLduInterfaceField.H"
 
@@ -82,10 +80,10 @@ protected:
             mutable Field<Type> receiveBuf_;
 
             //- Scalar send buffer
-            mutable Field<scalar> scalarSendBuf_;
+            mutable solveScalarField scalarSendBuf_;
 
             //- Scalar receive buffer
-            mutable Field<scalar> scalarReceiveBuf_;
+            mutable solveScalarField scalarReceiveBuf_;
 
             //- Outstanding request
             mutable label outstandingSendRequest_;
@@ -99,10 +97,10 @@ protected:
 
         void addToInternalField
         (
-            scalarField& result,
+            solveScalarField& result,
             const bool add,
             const scalarField& coeffs,
-            const scalarField& vals
+            const solveScalarField& vals
         ) const;
 
 
@@ -201,24 +199,17 @@ public:
             {
                 return pTraits<Type>::rank;
             }
- 
+
 
         // Access
 
-            //- Return true if this patch field is coupled. Our field supplies
-            //  coefficients to the fvMatrix so should behave as a
-            //  processorFvPatchField (in addBoundarySource it should not add
-            //  to the source)
+            //- Return true if this patch field is coupled.
+            //  Our field supplies coefficients to the fvMatrix so
+            //  should behave as a processorFvPatchField (in
+            //  addBoundarySource it should not add to the source)
             virtual bool coupled() const
             {
-                if (Pstream::parRun())
-                {
-                    return true;
-                }
-                else
-                {
-                    return false;
-                }
+                return Pstream::parRun();
             }
 
             //- Return neighbour field of internal field
@@ -239,9 +230,9 @@ public:
             //- Initialise neighbour matrix update
             virtual void initInterfaceMatrixUpdate
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
@@ -250,9 +241,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                scalarField& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C
index b792f9d2d0a..3d4ad1f217d 100644
--- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C
+++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012-2016 OpenFOAM Foundation
@@ -29,6 +29,7 @@ License
 #include "energyRegionCoupledFvPatchScalarField.H"
 #include "Time.H"
 #include "turbulentFluidThermoModel.H"
+#include "PrecisionAdaptor.H"
 
 // * * * * * * * * * * * * * Static Member Data  * * * * * * * * * * * * * * //
 
@@ -392,9 +393,9 @@ patchInternalTemperatureField() const
 
 void Foam::energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix
 (
-    Field<scalar>& result,
+    solveScalarField& result,
     const bool add,
-    const scalarField& psiInternal,
+    const solveScalarField& psiInternal,
     const scalarField& coeffs,
     const direction cmpt,
     const Pstream::commsTypes
@@ -404,7 +405,11 @@ void Foam::energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix
 
     scalarField myHE(this->size());
 
-    if (&psiInternal == &primitiveField())
+    if
+    (
+        reinterpret_cast<const void*>(&psiInternal)
+     == reinterpret_cast<const void*>(&primitiveField())
+    )
     {
         label patchi = this->patch().index();
         const scalarField& pp =  thermoPtr_->p().boundaryField()[patchi];
@@ -422,8 +427,10 @@ void Foam::energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix
         }
     }
 
+    ConstPrecisionAdaptor<solveScalar, scalar> tHE(myHE);
+
     // Multiply the field by coefficients and add into the result
-    this->addToInternalField(result, !add, coeffs, myHE);
+    this->addToInternalField(result, !add, coeffs, tHE());
 }
 
 
diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H
index d9870281454..98d3726c48b 100644
--- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H
+++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           |
+    \\  /    A nd           | Copyright (C) 2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2012-2016 OpenFOAM Foundation
@@ -222,9 +222,9 @@ public:
             //- Update result field based on interface functionality
             virtual void updateInterfaceMatrix
             (
-                Field<scalar>& result,
+                solveScalarField& result,
                 const bool add,
-                const scalarField& psiInternal,
+                const solveScalarField& psiInternal,
                 const scalarField& coeffs,
                 const direction cmpt,
                 const Pstream::commsTypes commsType
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C
index f93df6a2256..8ec2aa8e6e6 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C
@@ -658,7 +658,7 @@ void Foam::binaryTree<CompType, ThermoType>::balance()
         chemPoints[chemPointi++] = x;
         x = treeSuccessor(x);
     }
-    mean /= size_;
+    mean /= scalar(size_);
 
     //3) compute the variance for each space direction
     List<scalar> variance(n, Zero);
-- 
GitLab