38#ifndef PureUpwindFitScheme_H
39#define PureUpwindFitScheme_H
54template<
class Type,
class Polynomial,
class Stencil>
55class PureUpwindFitScheme
64 const scalar linearLimitFactor_;
67 const scalar centralWeight_;
73 PureUpwindFitScheme(
const PureUpwindFitScheme&) =
delete;
76 void operator=(
const PureUpwindFitScheme&) =
delete;
97 linearLimitFactor_(readScalar(is)),
111 linearLimitFactor_(readScalar(is)),
125 virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh>>
128 const GeometricField<Type, fvPatchField, volMesh>& vf
149 return stencil.weightedSum(this->
faceFlux_, vf, fo, fn);
162#define makePureUpwindFitSurfaceInterpolationTypeScheme\
170typedef PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL> \
171 PureUpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_; \
172defineTemplateTypeNameAndDebugWithName \
173 (PureUpwindFitScheme##TYPE##POLYNOMIAL##STENCIL##_, #SS, 0); \
175surfaceInterpolationScheme<TYPE>::addMeshConstructorToTable \
176<PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>> \
177 add##SS##STENCIL##TYPE##MeshConstructorToTable_; \
179surfaceInterpolationScheme<TYPE>::addMeshFluxConstructorToTable \
180<PureUpwindFitScheme<TYPE, POLYNOMIAL, STENCIL>> \
181 add##SS##STENCIL##TYPE##MeshFluxConstructorToTable_;
183#define makePureUpwindFitSurfaceInterpolationScheme(SS, POLYNOMIAL, STENCIL) \
185makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,scalar) \
186makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,vector) \
187makePureUpwindFitSurfaceInterpolationTypeScheme \
194makePureUpwindFitSurfaceInterpolationTypeScheme \
201makePureUpwindFitSurfaceInterpolationTypeScheme(SS,POLYNOMIAL,STENCIL,tensor)
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static FOAM_NO_DANGLING_REFERENCE const cellCellStencilObject & New(const fvMesh &mesh, Args &&... args)
Upwind biased fit surface interpolation scheme that applies an explicit correction to upwind.
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
TypeName("PureUpwindFitScheme")
Runtime type information.
PureUpwindFitScheme(const fvMesh &mesh, Istream &is)
Construct from mesh and Istream.
virtual tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > correction(const GeometricField< Type, fvPatchField, volMesh > &vf) const
Return the explicit correction to the face-interpolate.
PureUpwindFitScheme(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &is)
Construct from mesh, faceFlux and Istream.
Data for the quadratic fit correction interpolation scheme to be used with upwind biased stencil.
const List< scalarList > & owncoeffs() const
Return reference to owner fit coefficients.
const List< scalarList > & neicoeffs() const
Return reference to neighbour fit coefficients.
Creates upwind stencil by shifting a centred stencil to upwind and downwind faces and optionally remo...
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > weightedSum(const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &fld, const List< List< scalar > > &ownWeights, const List< List< scalar > > &neiWeights) const
Sum vol field contributions to create face values.
Mesh data needed to do the Finite Volume discretisation.
const surfaceScalarField & faceFlux_
const fvMesh & mesh() const
Return mesh reference.
A class for managing temporary objects.
Upwind differencing scheme class.
upwind(const fvMesh &mesh, const surfaceScalarField &faceFlux)
Construct from faceFlux.
A class for handling words, derived from Foam::string.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.