Skip to content
Snippets Groups Projects
Commit 24d1e50f authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: LimitedScheme - corrected oriented flag. Fixes #493

parent 132c0e71
Branches
Tags
No related merge requests found
...@@ -37,18 +37,19 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter ...@@ -37,18 +37,19 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter
surfaceScalarField& limiterField surfaceScalarField& limiterField
) const ) const
{ {
const fvMesh& mesh = this->mesh(); typedef GeometricField<typename Limiter::phiType, fvPatchField, volMesh>
VolFieldType;
typedef GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>
GradVolFieldType;
tmp<GeometricField<typename Limiter::phiType, fvPatchField, volMesh>> const fvMesh& mesh = this->mesh();
tlPhi = LimitFunc<Type>()(phi);
const GeometricField<typename Limiter::phiType, fvPatchField, volMesh>& tmp<VolFieldType> tlPhi = LimitFunc<Type>()(phi);
lPhi = tlPhi(); const VolFieldType& lPhi = tlPhi();
tmp<GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>> tmp<GradVolFieldType> tgradc(fvc::grad(lPhi));
tgradc(fvc::grad(lPhi)); const GradVolFieldType& gradc = tgradc();
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 ...@@ -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 ...@@ -128,6 +128,8 @@ void Foam::LimitedScheme<Type, Limiter, LimitFunc>::calcLimiter
pLim = 1.0; pLim = 1.0;
} }
} }
limiterField.setOriented();
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment