BUG: cellReduce: use boundary values. Fixes #3255

This commit is contained in:
mattijs 2024-11-07 15:55:09 +00:00
parent b73de97f97
commit 791796c67f

View File

@ -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;