diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H index da72d52859d7b54b87117ffa74ae5c18461d36ad..6dc51cc79083f3f2b08c69aff82e5f60a0d2c6a4 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMax/localMax.H @@ -138,14 +138,6 @@ public: ); GeometricField<Type, fvsPatchField, surfaceMesh>& vff = tvff.ref(); - typename GeometricField<Type, fvsPatchField, surfaceMesh>:: - Boundary& vffbf = vff.boundaryFieldRef(); - - forAll(vffbf, patchi) - { - vffbf[patchi] = vf.boundaryField()[patchi]; - } - const labelUList& own = mesh.owner(); const labelUList& nei = mesh.neighbour(); @@ -154,6 +146,33 @@ public: vff[facei] = max(vf[own[facei]], vf[nei[facei]]); } + typename GeometricField<Type, fvsPatchField, surfaceMesh>:: + Boundary& bff = vff.boundaryFieldRef(); + + forAll(bff, patchi) + { + const fvPatchField<Type>& pf = vf.boundaryField()[patchi]; + Field<Type>& pff = bff[patchi]; + + if (pf.coupled()) + { + tmp<Field<Type>> tpif(pf.patchInternalField()); + const Field<Type>& pif = tpif(); + + tmp<Field<Type>> tpnf(pf.patchNeighbourField()); + const Field<Type>& pnf = tpnf(); + + forAll(pff, i) + { + pff[i] = max(pif[i], pnf[i]); + } + } + else + { + pff = pf; + } + } + return tvff; } }; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H index 35c53ee660491d4900a83cd9c746bdb0ebf901c5..48f008ae7a1baedb74a1a2f4c631ff8fa5d668cc 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/localMin/localMin.H @@ -138,14 +138,6 @@ public: ); GeometricField<Type, fvsPatchField, surfaceMesh>& vff = tvff.ref(); - typename GeometricField<Type, fvsPatchField, surfaceMesh>:: - Boundary& vffbf = vff.boundaryFieldRef(); - - forAll(vffbf, patchi) - { - vffbf[patchi] = vf.boundaryField()[patchi]; - } - const labelUList& own = mesh.owner(); const labelUList& nei = mesh.neighbour(); @@ -154,6 +146,33 @@ public: vff[facei] = minMod(vf[own[facei]], vf[nei[facei]]); } + typename GeometricField<Type, fvsPatchField, surfaceMesh>:: + Boundary& bff = vff.boundaryFieldRef(); + + forAll(bff, patchi) + { + const fvPatchField<Type>& pf = vf.boundaryField()[patchi]; + Field<Type>& pff = bff[patchi]; + + if (pf.coupled()) + { + tmp<Field<Type>> tpif(pf.patchInternalField()); + const Field<Type>& pif = tpif(); + + tmp<Field<Type>> tpnf(pf.patchNeighbourField()); + const Field<Type>& pnf = tpnf(); + + forAll(pff, i) + { + pff[i] = minMod(pif[i], pnf[i]); + } + } + else + { + pff = pf; + } + } + return tvff; } };