From 0c33cbc91112add9119fb92b463ab46ad019ebee Mon Sep 17 00:00:00 2001
From: Sergio Ferraris <sergio@alex.opencfd.co.uk>
Date: Thu, 14 Nov 2013 10:46:35 +0000
Subject: [PATCH] BUG: Fixing bug in map distribute to
 thermalBaffle1DFvPatchScalarField

---
 .../thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
index adc14b03ebc..45565764ef2 100644
--- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C
@@ -317,6 +317,8 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
     int oldTag = UPstream::msgType();
     UPstream::msgType() = oldTag+1;
 
+    const mapDistribute& mapDist = this->mappedPatchBase::map();
+
     const label patchi = patch().index();
 
     const label nbrPatchi = samplePolyPatch().index();
@@ -354,8 +356,9 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
         scalarField myKDelta(patch().deltaCoeffs()*kappaw);
 
         // nrb properties
-        const fvPatchScalarField& nbrTp =
+        scalarField nbrTp =
             turbModel.thermo().T().boundaryField()[nbrPatchi];
+        mapDist.distribute(nbrTp);
 
         // solid properties
         scalarField kappas(patch().size(), 0.0);
-- 
GitLab