mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: LimitedScheme - corrected oriented flag. Fixes #493
This commit is contained in:
@ -37,18 +37,19 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter
|
|||||||
surfaceScalarField& limiterField
|
surfaceScalarField& limiterField
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
typedef GeometricField<typename Limiter::phiType, fvPatchField, volMesh>
|
||||||
|
VolFieldType;
|
||||||
|
|
||||||
|
typedef GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>
|
||||||
|
GradVolFieldType;
|
||||||
|
|
||||||
const fvMesh& mesh = this->mesh();
|
const fvMesh& mesh = this->mesh();
|
||||||
|
|
||||||
tmp<GeometricField<typename Limiter::phiType, fvPatchField, volMesh>>
|
tmp<VolFieldType> tlPhi = LimitFunc<Type>()(phi);
|
||||||
tlPhi = LimitFunc<Type>()(phi);
|
const VolFieldType& lPhi = tlPhi();
|
||||||
|
|
||||||
const GeometricField<typename Limiter::phiType, fvPatchField, volMesh>&
|
tmp<GradVolFieldType> tgradc(fvc::grad(lPhi));
|
||||||
lPhi = tlPhi();
|
const GradVolFieldType& gradc = tgradc();
|
||||||
|
|
||||||
tmp<GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>>
|
|
||||||
tgradc(fvc::grad(lPhi));
|
|
||||||
const GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>&
|
|
||||||
gradc = tgradc();
|
|
||||||
|
|
||||||
const surfaceScalarField& CDweights = mesh.surfaceInterpolation::weights();
|
const surfaceScalarField& CDweights = mesh.surfaceInterpolation::weights();
|
||||||
|
|
||||||
@ -76,8 +77,7 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaceScalarField::Boundary& bLim =
|
surfaceScalarField::Boundary& bLim = limiterField.boundaryFieldRef();
|
||||||
limiterField.boundaryFieldRef();
|
|
||||||
|
|
||||||
forAll(bLim, patchi)
|
forAll(bLim, patchi)
|
||||||
{
|
{
|
||||||
@ -128,6 +128,8 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter
|
|||||||
pLim = 1.0;
|
pLim = 1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
limiterField.setOriented();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user