49 const GeometricField<Type, fvPatchField, volMesh>& vsf,
55 const fvMesh& mesh = vsf.mesh();
57 tmp<GeometricField<GradType, fvPatchField, volMesh>> tlsGrad
69 extrapolatedCalculatedFvPatchField<GradType>::typeName
72 GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad.ref();
85 label ownFacei = own[facei];
86 label neiFacei = nei[facei];
88 Type deltaVsf = vsf[neiFacei] - vsf[ownFacei];
90 lsGrad[ownFacei] += ownLs[facei]*deltaVsf;
91 lsGrad[neiFacei] -= neiLs[facei]*deltaVsf;
100 vsf.boundaryField()[
patchi].patch().faceCells();
102 if (vsf.boundaryField()[
patchi].coupled())
104 const Field<Type> neiVsf
106 vsf.boundaryField()[
patchi].patchNeighbourField()
109 forAll(neiVsf, patchFacei)
111 lsGrad[faceCells[patchFacei]] +=
112 patchOwnLs[patchFacei]
113 *(neiVsf[patchFacei] - vsf[faceCells[patchFacei]]);
118 const fvPatchField<Type>& patchVsf = vsf.boundaryField()[
patchi];
120 forAll(patchVsf, patchFacei)
122 lsGrad[faceCells[patchFacei]] +=
123 patchOwnLs[patchFacei]
124 *(patchVsf[patchFacei] - vsf[faceCells[patchFacei]]);
130 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.
rDeltaT correctBoundaryConditions()
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
Mesh data needed to do the Finite Volume discretisation.
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
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)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
A class for managing temporary objects.