Go to the documentation of this file.
33 template<
class Type,
class Limiter>
44 template<
class Type,
class Limiter>
63 template<
class Type,
class Limiter>
75 const GeometricField<Type, fvPatchField, volMesh>& vsf,
79 const fvMesh&
mesh = vsf.mesh();
85 > tGrad = basicGradScheme_().calcGrad(vsf,
name);
105 Field<Type> maxVsf(vsf.primitiveField());
106 Field<Type> minVsf(vsf.primitiveField());
110 label own = owner[facei];
111 label nei = neighbour[facei];
113 const Type& vsfOwn = vsf[own];
114 const Type& vsfNei = vsf[nei];
116 maxVsf[own] =
max(maxVsf[own], vsfNei);
117 minVsf[own] =
min(minVsf[own], vsfNei);
119 maxVsf[nei] =
max(maxVsf[nei], vsfOwn);
120 minVsf[nei] =
min(minVsf[nei], vsfOwn);
124 const typename GeometricField<Type, fvPatchField, volMesh>::Boundary& bsf =
129 const fvPatchField<Type>& psf = bsf[patchi];
134 const Field<Type> psfNei(psf.patchNeighbourField());
138 label own = pOwner[pFacei];
139 const Type& vsfNei = psfNei[pFacei];
141 maxVsf[own] =
max(maxVsf[own], vsfNei);
142 minVsf[own] =
min(minVsf[own], vsfNei);
149 label own = pOwner[pFacei];
150 const Type& vsfNei = psf[pFacei];
152 maxVsf[own] =
max(maxVsf[own], vsfNei);
153 minVsf[own] =
min(minVsf[own], vsfNei);
163 const Field<Type> maxMinVsf((1.0/k_ - 1.0)*(maxVsf - minVsf));
171 Field<Type>
limiter(vsf.primitiveField().size(), pTraits<Type>::one);
175 label own = owner[facei];
176 label nei = neighbour[facei];
184 (Cf[facei] -
C[own]) &
g[own]
193 (Cf[facei] -
C[nei]) &
g[nei]
200 const vectorField& pCf = Cf.boundaryField()[patchi];
204 label own = pOwner[pFacei];
211 ((pCf[pFacei] -
C[own]) &
g[own])
218 Info<<
"gradient limiter for: " << vsf.name()
225 g.correctBoundaryConditions();
int debug
Static debugging option.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
A class for managing temporary objects.
Type gAverage(const FieldField< Field, Type > &f)
Mesh data needed to do the Finite Volume discretisation.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
Field< vector > vectorField
Specialisation of Field<T> for vector.
cellMask correctBoundaryConditions()
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const uniformDimensionedVectorField & g
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > calcGrad(const GeometricField< Type, fvPatchField, volMesh > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad.
Type gMin(const FieldField< Field, Type > &f)
UList< label > labelUList
A UList of labels.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Generic GeometricField class.
tmp< areaScalarField > limiter(const areaScalarField &phi)
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
Type gMax(const FieldField< Field, Type > &f)
cellLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.