36 typename Foam::outerProduct<Foam::vector, Type>::type,
43 const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf,
49 const fvMesh& mesh = ssf.mesh();
51 tmp<GeometricField<GradType, fvPatchField, volMesh>> tgGrad
53 new GeometricField<GradType, fvPatchField, volMesh>
70 extrapolatedCalculatedFvPatchField<GradType>::typeName
73 GeometricField<GradType, fvPatchField, volMesh>& gGrad = tgGrad.ref();
76 const labelUList& neighbour = mesh.neighbour();
79 Field<GradType>& igGrad = gGrad;
80 const Field<Type>& issf = ssf;
84 GradType Sfssf = Sf[facei]*issf[facei];
86 igGrad[owner[facei]] += Sfssf;
87 igGrad[neighbour[facei]] -= Sfssf;
93 mesh.boundary()[
patchi].faceCells();
97 const fvsPatchField<Type>& pssf = ssf.boundaryField()[
patchi];
101 igGrad[pFaceCells[facei]] += pSf[facei]*pssf[facei];
107 gGrad.correctBoundaryConditions();
118 typename Foam::outerProduct<Foam::vector, Type>::type,
125 const GeometricField<Type, fvPatchField, volMesh>& vsf,
131 tmp<GeometricField<GradType, fvPatchField, volMesh>> tgGrad
135 GeometricField<GradType, fvPatchField, volMesh>& gGrad = tgGrad.ref();
156 >::Boundary& gGradbf = gGrad.boundaryFieldRef();
#define forAll(list, i)
Loop across all elements in list.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
static tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > gradf(const GeometricField< Type, fvsPatchField, surfaceMesh > &, const word &name)
Return the gradient of the given field.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
volVectorField vectorField(fieldObject, mesh)
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Generic GeometricField class.
UList< label > labelUList
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.
Mesh data needed to do the Finite Volume discretisation.
U correctBoundaryConditions()
static void correctBoundaryConditions(const GeometricField< Type, fvPatchField, volMesh > &, GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > &)
Correct the boundary values of the gradient using the patchField.
const Mesh & mesh() const
Return mesh.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
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.