diff --git a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C index 73488db5a097d0daa06bd8c03fbfdf0db11be40d..ce6f13b961c6127d3253e7809be8924212c0ed6e 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2024 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -71,15 +72,27 @@ Foam::fvc::cellReduce forAll(own, i) { - label celli = own[i]; + const label celli = own[i]; cop(result[celli], ssf[i]); } forAll(nbr, i) { - label celli = nbr[i]; + const label celli = nbr[i]; cop(result[celli], ssf[i]); } + forAll(mesh.boundary(), patchi) + { + const auto& pFaceCells = mesh.boundary()[patchi].faceCells(); + const auto& pssf = ssf.boundaryField()[patchi]; + + forAll(pssf, i) + { + const label celli = pFaceCells[i]; + cop(result[celli], pssf[i]); + } + } + result.correctBoundaryConditions(); return tresult;