From d739b7e36f9d523571fb463a2f549f0ab825a01c Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Tue, 8 Jun 2021 14:59:38 +0100 Subject: [PATCH] finiteVolume: LimitedScheme: Correction when using "patchType" overrides --- .../limitedSchemes/LimitedScheme/LimitedScheme.C | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C index b636acf103..68576643cd 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitedScheme.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,6 +76,9 @@ void Foam::LimitedScheme::calcLimiter ); } + const typename GeometricField::Boundary& + bPhi = phi.boundaryField(); + surfaceScalarField::Boundary& bLim = limiterField.boundaryFieldRef(); @@ -83,7 +86,7 @@ void Foam::LimitedScheme::calcLimiter { scalarField& pLim = bLim[patchi]; - if (bLim[patchi].coupled()) + if (bPhi[patchi].coupled()) { const scalarField& pCDweights = CDweights.boundaryField()[patchi]; const scalarField& pFaceFlux =