51 const GeometricField<Type, fvPatchField, volMesh>& vsf,
57 const fvMesh&
mesh = vsf.mesh();
59 tmp<GeometricField<GradType, fvPatchField, volMesh>> tlsGrad
61 new GeometricField<GradType, fvPatchField, volMesh>
73 extrapolatedCalculatedFvPatchField<GradType>::typeName
76 GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad.ref();
89 label ownFacei = own[facei];
90 label neiFacei = nei[facei];
92 Type deltaVsf = vsf[neiFacei] - vsf[ownFacei];
94 lsGrad[ownFacei] += ownLs[facei]*deltaVsf;
95 lsGrad[neiFacei] -= neiLs[facei]*deltaVsf;
99 forAll(vsf.boundaryField(), patchi)
104 vsf.boundaryField()[patchi].patch().faceCells();
106 if (vsf.boundaryField()[patchi].coupled())
108 const Field<Type> neiVsf
110 vsf.boundaryField()[patchi].patchNeighbourField()
113 forAll(neiVsf, patchFacei)
115 lsGrad[faceCells[patchFacei]] +=
116 patchOwnLs[patchFacei]
117 *(neiVsf[patchFacei] - vsf[faceCells[patchFacei]]);
122 const fvPatchField<Type>& patchVsf = vsf.boundaryField()[patchi];
124 forAll(patchVsf, patchFacei)
126 lsGrad[faceCells[patchFacei]] +=
127 patchOwnLs[patchFacei]
128 *(patchVsf[patchFacei] - vsf[faceCells[patchFacei]]);
134 lsGrad.correctBoundaryConditions();