35 template<
class Type,
class Limiter,
template<
class>
class LimitFunc>
38 const GeometricField<Type, fvPatchField, volMesh>&
phi,
42 typedef GeometricField<typename Limiter::phiType, fvPatchField, volMesh>
45 typedef GeometricField<typename Limiter::gradPhiType, fvPatchField, volMesh>
50 tmp<VolFieldType> tlPhi = LimitFunc<Type>()(
phi);
51 const VolFieldType& lPhi = tlPhi();
53 tmp<GradVolFieldType> tgradc(
fvc::grad(lPhi));
54 const GradVolFieldType& gradc = tgradc();
63 scalarField& pLim = limiterField.primitiveFieldRef();
67 label own = owner[face];
68 label nei = neighbour[face];
73 this->faceFlux_[face],
82 surfaceScalarField::Boundary& bLim = limiterField.boundaryFieldRef();
88 if (bLim[patchi].coupled())
90 const scalarField& pCDweights = CDweights.boundaryField()[patchi];
92 this->faceFlux_.boundaryField()[patchi];
94 const Field<typename Limiter::phiType> plPhiP
96 lPhi.boundaryField()[patchi].patchInternalField()
98 const Field<typename Limiter::phiType> plPhiN
100 lPhi.boundaryField()[patchi].patchNeighbourField()
102 const Field<typename Limiter::gradPhiType> pGradcP
104 gradc.boundaryField()[patchi].patchInternalField()
106 const Field<typename Limiter::gradPhiType> pGradcN
108 gradc.boundaryField()[patchi].patchNeighbourField()
112 vectorField pd(CDweights.boundaryField()[patchi].patch().delta());
134 limiterField.setOriented();
140 template<
class Type,
class Limiter,
template<
class>
class LimitFunc>
149 const word limiterFieldName(
type() +
"Limiter(" +
phi.name() +
')');
151 if (this->
mesh().cache(
"limiter"))
162 mesh.time().timeName(),
172 mesh.objectRegistry::store(limiterField);
178 calcLimiter(
phi, limiterField);
191 mesh.time().timeName(),
199 calcLimiter(
phi, tlimiterField.ref());
201 return tlimiterField;