mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Added support for limitWith scheme.
This commit is contained in:
@ -187,6 +187,7 @@ $(limitedSchemes)/Phi/Phi.C
|
||||
$(limitedSchemes)/filteredLinear/filteredLinear.C
|
||||
$(limitedSchemes)/filteredLinear2/filteredLinear2.C
|
||||
$(limitedSchemes)/filteredLinear3/filteredLinear3.C
|
||||
$(limitedSchemes)/limitWith/limitWith.C
|
||||
|
||||
multivariateSchemes = $(surfaceInterpolation)/multivariateSchemes
|
||||
$(multivariateSchemes)/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationSchemes.C
|
||||
|
||||
@ -22,9 +22,6 @@ License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
Abstract base class for surface interpolation schemes.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "limitedSurfaceInterpolationScheme.H"
|
||||
@ -39,7 +36,6 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
|
||||
|
||||
// Return weighting factors for scheme given by name in dictionary
|
||||
template<class Type>
|
||||
tmp<limitedSurfaceInterpolationScheme<Type> >
|
||||
limitedSurfaceInterpolationScheme<Type>::New
|
||||
@ -160,17 +156,14 @@ limitedSurfaceInterpolationScheme<Type>::~limitedSurfaceInterpolationScheme()
|
||||
template<class Type>
|
||||
tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& phi
|
||||
const GeometricField<Type, fvPatchField, volMesh>& phi,
|
||||
const surfaceScalarField& CDweights,
|
||||
tmp<surfaceScalarField> tLimiter
|
||||
) const
|
||||
{
|
||||
const fvMesh& mesh = this->mesh();
|
||||
|
||||
// Note that here the weights field is initialised as the limiter
|
||||
// from which the weight is calculated using the limiter value
|
||||
tmp<surfaceScalarField> tWeights(this->limiter(phi));
|
||||
surfaceScalarField& Weights = tWeights();
|
||||
|
||||
const surfaceScalarField& CDweights = mesh.surfaceInterpolation::weights();
|
||||
surfaceScalarField& Weights = tLimiter();
|
||||
|
||||
scalarField& pWeights = Weights.internalField();
|
||||
|
||||
@ -199,9 +192,22 @@ tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
|
||||
}
|
||||
}
|
||||
|
||||
return tWeights;
|
||||
return tLimiter;
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
tmp<surfaceScalarField> limitedSurfaceInterpolationScheme<Type>::weights
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& phi
|
||||
) const
|
||||
{
|
||||
return this->weights
|
||||
(
|
||||
phi,
|
||||
this->mesh().surfaceInterpolation::weights(),
|
||||
this->limiter(phi)
|
||||
);
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
|
||||
|
||||
@ -26,7 +26,7 @@ Class
|
||||
Foam::limitedSurfaceInterpolationScheme
|
||||
|
||||
Description
|
||||
Abstract base class for surface interpolation schemes.
|
||||
Abstract base class for limited surface interpolation schemes.
|
||||
|
||||
SourceFiles
|
||||
limitedSurfaceInterpolationScheme.C
|
||||
@ -119,7 +119,7 @@ public:
|
||||
{}
|
||||
|
||||
|
||||
//- Construct from mesh and Istream.
|
||||
//- Construct from mesh and Istream.
|
||||
// The name of the flux field is read from the Istream and looked-up
|
||||
// from the mesh objectRegistry
|
||||
limitedSurfaceInterpolationScheme
|
||||
@ -170,6 +170,15 @@ public:
|
||||
const GeometricField<Type, fvPatchField, volMesh>&
|
||||
) const = 0;
|
||||
|
||||
//- Return the interpolation weighting factors for the given field,
|
||||
// by limiting the given weights with the given limiter
|
||||
tmp<surfaceScalarField> weights
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
const surfaceScalarField& CDweights,
|
||||
tmp<surfaceScalarField> tLimiter
|
||||
) const;
|
||||
|
||||
//- Return the interpolation weighting factors for the given field
|
||||
virtual tmp<surfaceScalarField> weights
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user