33 template<
class Type,
class Limiter,
template<
class>
class LimitFunc>
36 const GeometricField<Type, fvPatchField, volMesh>& phi,
40 const fvMesh& mesh = this->
mesh();
42 tmp<GeometricField<typename Limiter::phiType, fvPatchField, volMesh>>
43 tlPhi = LimitFunc<Type>()(phi);
45 const GeometricField<typename Limiter::phiType, fvPatchField, volMesh>&
48 tmp<GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>>
50 const GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>&
56 const labelUList& neighbour = mesh.neighbour();
60 scalarField& pLim = limiterField.primitiveFieldRef();
64 label own = owner[face];
65 label nei = neighbour[face];
70 this->faceFlux_[face],
79 surfaceScalarField::Boundary& bLim =
80 limiterField.boundaryFieldRef();
86 if (bLim[
patchi].coupled())
90 this->faceFlux_.boundaryField()[
patchi];
92 const Field<typename Limiter::phiType> plPhiP
94 lPhi.boundaryField()[
patchi].patchInternalField()
96 const Field<typename Limiter::phiType> plPhiN
98 lPhi.boundaryField()[
patchi].patchNeighbourField()
100 const Field<typename Limiter::gradPhiType> pGradcP
102 gradc.boundaryField()[
patchi].patchInternalField()
104 const Field<typename Limiter::gradPhiType> pGradcN
106 gradc.boundaryField()[
patchi].patchNeighbourField()
136 template<
class Type,
class Limiter,
template<
class>
class LimitFunc>
145 const word limiterFieldName(
type() +
"Limiter(" + phi.
name() +
')');
147 if (this->
mesh().cache(
"limiter"))
168 mesh.objectRegistry::store(limiterField);
177 calcLimiter(phi, limiterField);
193 calcLimiter(phi, tlimiterField.
ref());
195 return tlimiterField;
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
Class to create NVD/TVD limited weighting-factors.
T & ref() const
Return non-const reference or generate a fatal error.
Type & lookupObjectRef(const word &name) const
Lookup and return the object reference of the given Type.
bool foundObject(const word &name) const
Is the named Type found?
volVectorField vectorField(fieldObject, mesh)
Generic GeometricField class.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const Time & time() const
Return the top-level database.
UList< label > labelUList
Calculate the gradient of the given field.
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
void limiter(scalarField &allLambda, const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phiBD, const surfaceScalarField &phiCorr, const SpType &Sp, const SuType &Su, const PsiMaxType &psiMax, const PsiMinType &psiMin)
A class for handling words, derived from string.
virtual tmp< surfaceScalarField > limiter(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
volScalarField scalarField(fieldObject, mesh)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Mesh data needed to do the Finite Volume discretisation.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...