49 const GeometricField<Type, fvPatchField, volMesh>& vsf,
55 const fvMesh& mesh = vsf.mesh();
57 tmp<GeometricField<GradType, fvPatchField, volMesh>> tlsGrad
59 new GeometricField<GradType, fvPatchField, volMesh>
76 extrapolatedCalculatedFvPatchField<GradType>::typeName
79 GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad.ref();
92 label ownFacei = own[facei];
93 label neiFacei = nei[facei];
95 Type deltaVsf = vsf[neiFacei] - vsf[ownFacei];
97 lsGrad[ownFacei] += ownLs[facei]*deltaVsf;
98 lsGrad[neiFacei] -= neiLs[facei]*deltaVsf;
107 vsf.boundaryField()[
patchi].patch().faceCells();
109 if (vsf.boundaryField()[
patchi].coupled())
111 const Field<Type> neiVsf
113 vsf.boundaryField()[
patchi].patchNeighbourField()
116 forAll(neiVsf, patchFacei)
118 lsGrad[faceCells[patchFacei]] +=
119 patchOwnLs[patchFacei]
120 *(neiVsf[patchFacei] - vsf[faceCells[patchFacei]]);
125 const fvPatchField<Type>& patchVsf = vsf.boundaryField()[
patchi];
127 forAll(patchVsf, patchFacei)
129 lsGrad[faceCells[patchFacei]] +=
130 patchOwnLs[patchFacei]
131 *(patchVsf[patchFacei] - vsf[faceCells[patchFacei]]);
137 lsGrad.correctBoundaryConditions();
fvsPatchField< vector > fvsPatchVectorField
#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.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Generic GeometricField class.
UList< label > labelUList
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Mesh data needed to do the Finite Volume discretisation.
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.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
U correctBoundaryConditions()
A class for managing temporary objects.