35 template<
class Type,
class Stencil>
47 const GeometricField<Type, fvPatchField, volMesh>& vtf,
53 const fvMesh&
mesh = vtf.mesh();
61 tmp<GeometricField<GradType, fvPatchField, volMesh> > tlsGrad
63 new GeometricField<GradType, fvPatchField, volMesh>
78 pTraits<GradType>::zero
80 zeroGradientFvPatchField<GradType>::typeName
83 GeometricField<GradType, fvPatchField, volMesh>& lsGrad = tlsGrad();
84 Field<GradType>& lsGradIf = lsGrad;
86 const extendedCentredCellToCellStencil& stencil = lsv.stencil();
92 List<Type> flatVtf(stencil.map().constructSize(), pTraits<Type>::zero);
97 flatVtf[celli] = vtf[celli];
103 const fvPatchField<Type>& ptf = vtf.boundaryField()[
patchi];
107 -
mesh.nInternalFaces()
112 flatVtf[nCompact++] = ptf[i];
117 stencil.map().distribute(flatVtf);
121 forAll(stencilAddr, celli)
123 const labelList& compactCells = stencilAddr[celli];
128 lsGradIf[celli] += lsvc[i]*flatVtf[compactCells[i]];
133 lsGrad.correctBoundaryConditions();