36 template<
class Type,
class Limiter,
template<
class>
class LimitFunc>
39 const GeometricField<Type, fvPatchField, volMesh>&
phi,
43 typedef GeometricField<typename Limiter::phiType, fvPatchField, volMesh>
46 typedef GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>
51 tmp<VolFieldType> tlPhi = LimitFunc<Type>()(
phi);
52 const VolFieldType& lPhi = tlPhi();
54 tmp<GradVolFieldType> tgradc(
fvc::grad(lPhi));
55 const GradVolFieldType& gradc = tgradc();
64 scalarField& pLim = limiterField.primitiveFieldRef();
68 label own = owner[face];
69 label nei = neighbour[face];
74 this->faceFlux_[face],
83 surfaceScalarField::Boundary& bLim = limiterField.boundaryFieldRef();
91 const scalarField& pCDweights = CDweights.boundaryField()[patchi];
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()
113 vectorField pd(CDweights.boundaryField()[patchi].patch().delta());
135 limiterField.setOriented();
141 template<
class Type,
class Limiter,
template<
class>
class LimitFunc>
150 const word limiterFieldName(
type() +
"Limiter(" +
phi.name() +
')');
152 if (this->
mesh().cache(
"limiter"))
163 mesh.time().timeName(),
173 regIOobject::store(fldptr);
175 auto& limiterField = *fldptr;
177 calcLimiter(
phi, limiterField);
194 calcLimiter(
phi, tlimiterField.ref());
196 return tlimiterField;
Class to create NVD/TVD limited weighting-factors.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Generic GeometricField class.
const dimensionSet dimless
Dimensionless.
tmp< areaScalarField > limiter(const areaScalarField &phi)
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
Calculate the gradient of the given field.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual tmp< surfaceScalarField > limiter(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
Mesh data needed to do the Finite Volume discretisation.
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Defines the attributes of an object for which implicit objectRegistry management is supported...
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)