35 template<
class Type,
class Stencil>
42 const VolField<Type>& vtf,
48 const fvMesh& mesh = vtf.mesh();
56 tmp<VolField<GradType>> tlsGrad
68 extrapolatedCalculatedFvPatchField<GradType>::typeName
71 VolField<GradType>& lsGrad = tlsGrad.ref();
72 Field<GradType>& lsGradIf = lsGrad;
74 const extendedCentredCellToCellStencil& stencil = lsv.stencil();
75 const List<List<label>>& stencilAddr = stencil.stencil();
76 const List<List<vector>>& lsvs = lsv.vectors();
80 List<Type> flatVtf(stencil.map().constructSize(),
Zero);
85 flatVtf[celli] = vtf[celli];
91 const fvPatchField<Type>& ptf = vtf.boundaryField()[
patchi];
95 - mesh.nInternalFaces()
100 flatVtf[nCompact++] = ptf[i];
105 stencil.map().distribute(flatVtf);
109 forAll(stencilAddr, celli)
111 const labelList& compactCells = stencilAddr[celli];
112 const List<vector>& lsvc = lsvs[celli];
116 lsGradIf[celli] += lsvc[i]*flatVtf[compactCells[i]];
121 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)
List< label > labelList
A List of labels.
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
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.