44 const VolField<Type>& vsf,
50 const fvMesh& mesh = vsf.mesh();
52 tmp<VolField<GradType>> tlsGrad
64 extrapolatedCalculatedFvPatchField<GradType>::typeName
67 VolField<GradType>& lsGrad = tlsGrad.ref();
80 label ownFacei = own[facei];
81 label neiFacei = nei[facei];
83 Type deltaVsf = vsf[neiFacei] - vsf[ownFacei];
85 lsGrad[ownFacei] += ownLs[facei]*deltaVsf;
86 lsGrad[neiFacei] -= neiLs[facei]*deltaVsf;
95 vsf.boundaryField()[
patchi].patch().faceCells();
97 if (vsf.boundaryField()[
patchi].coupled())
99 const Field<Type> neiVsf
101 vsf.boundaryField()[
patchi].patchNeighbourField()
104 forAll(neiVsf, patchFacei)
106 lsGrad[faceCells[patchFacei]] +=
107 patchOwnLs[patchFacei]
108 *(neiVsf[patchFacei] - vsf[faceCells[patchFacei]]);
113 const fvPatchField<Type>& patchVsf = vsf.boundaryField()[
patchi];
115 forAll(patchVsf, patchFacei)
117 lsGrad[faceCells[patchFacei]] +=
118 patchOwnLs[patchFacei]
119 *(patchVsf[patchFacei] - vsf[faceCells[patchFacei]]);
125 lsGrad.correctBoundaryConditions();
#define forAll(list, i)
Loop across all elements in list.
Generic GeometricField class.
virtual tmp< VolField< typename outerProduct< vector, Type >::type > > calcGrad(const VolField< Type > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad.
A class for managing temporary objects.
U correctBoundaryConditions()
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimLength
SurfaceField< vector > surfaceVectorField
UList< label > labelUList
fvsPatchField< vector > fvsPatchVectorField
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.