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);
180 calcLimiter(phi, limiterField);
201 calcLimiter(phi, tlimiterField.
ref());
203 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.
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 scalar psiMax, const scalar psiMin)
bool foundObject(const word &name) const
Is the named Type found?
Class to create NVD/TVD limited weighting-factors.
virtual tmp< surfaceScalarField > limiter(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
volVectorField vectorField(fieldObject, mesh)
Generic GeometricField class.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
UList< label > labelUList
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
Calculate the gradient of the given field.
A class for handling words, derived from string.
volScalarField scalarField(fieldObject, mesh)
Internal & ref()
Return a reference to the dimensioned internal field.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Mesh data needed to do the Finite Volume discretisation.
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...
const word & name() const
Return name.
const Time & time() const
Return the top-level database.