From e057421f519e9a47fa4346fb361f222d28bf31b7 Mon Sep 17 00:00:00 2001
From: sergio <sergio>
Date: Fri, 21 Dec 2012 14:23:50 +0000
Subject: [PATCH] ENH: Taking out energyRegionCoupledFvPatchField.H from
 heThermo.C to avoid recursive dependency with thermo and turbulence libraries

---
 src/Allwmake                                               | 2 --
 .../regionCoupledLduInterface/regionCoupledLduInterface.C  | 7 ++++---
 src/thermophysicalModels/basic/heThermo/heThermo.C         | 5 ++---
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/Allwmake b/src/Allwmake
index 1809dad242f..1a78e00b4aa 100755
--- a/src/Allwmake
+++ b/src/Allwmake
@@ -61,8 +61,6 @@ wmake $makeType topoChangerFvMesh
 wmake $makeType ODE
 wmake $makeType randomProcesses
 
-# ThermophysicalModels needs regionCoupled
-wmakeLnInclude regionCoupled
 thermophysicalModels/Allwmake $*
 transportModels/Allwmake $*
 turbulenceModels/Allwmake $*
diff --git a/src/meshTools/regionCoupled/patches/regionCoupledLduInterface/regionCoupledLduInterface.C b/src/meshTools/regionCoupled/patches/regionCoupledLduInterface/regionCoupledLduInterface.C
index f8cb75729a7..fbc831dc612 100644
--- a/src/meshTools/regionCoupled/patches/regionCoupledLduInterface/regionCoupledLduInterface.C
+++ b/src/meshTools/regionCoupled/patches/regionCoupledLduInterface/regionCoupledLduInterface.C
@@ -26,9 +26,10 @@ License
 #include "regionCoupledLduInterface.H"
 
 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-defineTypeNameAndDebug(Foam::regionCoupledLduInterface, 0);
-
+namespace Foam
+{
+defineTypeNameAndDebug(regionCoupledLduInterface, 0);
+}
 
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C
index aaa7aa6da35..5f49a4ba752 100644
--- a/src/thermophysicalModels/basic/heThermo/heThermo.C
+++ b/src/thermophysicalModels/basic/heThermo/heThermo.C
@@ -32,7 +32,6 @@ License
 #include "fixedJumpAMIFvPatchFields.H"
 #include "energyJumpFvPatchScalarField.H"
 #include "energyJumpAMIFvPatchScalarField.H"
-#include "energyRegionCoupledFvPatchScalarField.H"
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
@@ -103,9 +102,9 @@ Foam::wordList Foam::heThermo<BasicThermo, MixtureType>::heBoundaryTypes()
         {
             hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName;
         }
-        else if (isA<energyRegionCoupledFvPatchScalarField>(tbf[patchi]))
+        else if (tbf[patchi].type() == "energyRegionCoupledFvPatchScalarField")
         {
-            hbt[patchi] = energyRegionCoupledFvPatchScalarField::typeName;
+            hbt[patchi] = "energyRegionCoupledFvPatchScalarField";
         }
     }
 
-- 
GitLab