finiteVolume: LimitedScheme: Correction when using "patchType" overrides

This commit is contained in:
Will Bainbridge
2021-06-08 14:59:38 +01:00
parent e6ce04f070
commit d739b7e36f

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -76,6 +76,9 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter
); );
} }
const typename GeometricField<Type, fvPatchField, volMesh>::Boundary&
bPhi = phi.boundaryField();
surfaceScalarField::Boundary& bLim = surfaceScalarField::Boundary& bLim =
limiterField.boundaryFieldRef(); limiterField.boundaryFieldRef();
@ -83,7 +86,7 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter
{ {
scalarField& pLim = bLim[patchi]; scalarField& pLim = bLim[patchi];
if (bLim[patchi].coupled()) if (bPhi[patchi].coupled())
{ {
const scalarField& pCDweights = CDweights.boundaryField()[patchi]; const scalarField& pCDweights = CDweights.boundaryField()[patchi];
const scalarField& pFaceFlux = const scalarField& pFaceFlux =