From b0403a268e9837d1c20248f7ee427242a1dbbc69 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Wed, 11 Sep 2013 13:17:51 +0100
Subject: [PATCH] BUG: fixedPressure: map value as well as gradient

---
 .../fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C
index c6e55ef2a06..3894a5c3e45 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C
@@ -53,8 +53,12 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField
     fixedGradientFvPatchScalarField(p, iF),
     curTimeIndex_(-1)
 {
+    // Map value. Set unmapped values and overwrite with mapped ptf
+    fvPatchField<scalar>::operator=(patchInternalField());
+    map(ptf, mapper);
+    // Map gradient. Set unmapped values and overwrite with mapped ptf
     gradient() = 0.0;
-    map(gradient(), mapper);
+    gradient().map(ptf.gradient(), mapper);
 }
 
 
-- 
GitLab