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 const typename GeometricField<Type, fvPatchField, volMesh>::Boundary&
80 bPhi = phi.boundaryField();
82 surfaceScalarField::Boundary& bLim =
83 limiterField.boundaryFieldRef();
89 if (bPhi[
patchi].coupled())
93 this->faceFlux_.boundaryField()[
patchi];
95 const Field<typename Limiter::phiType> plPhiP
97 lPhi.boundaryField()[
patchi].patchInternalField()
99 const Field<typename Limiter::phiType> plPhiN
101 lPhi.boundaryField()[
patchi].patchNeighbourField()
103 const Field<typename Limiter::gradPhiType> pGradcP
105 gradc.boundaryField()[
patchi].patchInternalField()
107 const Field<typename Limiter::gradPhiType> pGradcN
109 gradc.boundaryField()[
patchi].patchNeighbourField()
139 template<
class Type,
class Limiter,
template<
class>
class LimitFunc>
148 const word limiterFieldName(
type() +
"Limiter(" + phi.
name() +
')');
150 if (this->
mesh().cache(
"limiter"))
171 mesh.objectRegistry::store(limiterField);
180 calcLimiter(phi, limiterField);
196 calcLimiter(phi, tlimiterField.
ref());
198 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 dimensionSet dimless
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)
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...