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.
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.
tmp< surfaceScalarField > interpolate(const RhoType &rho)
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.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
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.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
U correctBoundaryConditions()
const Mesh & mesh() const
Return mesh.
A class for managing temporary objects.