From 0c113bfaf53d5e5bc8ddffc3ad2a5d83943fdb47 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 22 Jun 2016 17:06:40 +0100 Subject: [PATCH] Bugfix: volPointInterpolation across coupled boundaries. Vuko Vukcevic --- .../pointPatchInterpolate.C | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C index 80c528898..dda87346b 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C @@ -64,7 +64,7 @@ void pointPatchInterpolation::interpolate forAll(bm, patchi) { - if (!isA(bm[patchi]) && bm[patchi].coupled()) + if (!isA(bm[patchi]) && !bm[patchi].coupled()) { pointPatchField& ppf = pf.boundaryField()[patchi]; @@ -110,6 +110,28 @@ void pointPatchInterpolation::interpolate } } + // Add missing contributions across the coupled boundaries. The weights are + // constructed and normalised by correctly taking into account their + // contributions from the other side, so we need to add the field + // contributions from the other side. VV, 21/June/2016. + forAll(pf.boundaryField(), patchi) + { + if (pf.boundaryField()[patchi].coupled()) + { + pf.boundaryField()[patchi].initAddField(); + } + } + + forAll(pf.boundaryField(), patchi) + { + if (pf.boundaryField()[patchi].coupled()) + { + pf.boundaryField()[patchi].addField + ( + pf.internalField() + ); + } + } // Correct patch-patch boundary points by interpolation "around" corners const labelListList& PointFaces = fvMesh_.pointFaces();