46 const GeometricField<Type, fvsPatchField, surfaceMesh>& ssf,
51 typedef GeometricField<GradType, fvPatchField, volMesh> GradFieldType;
53 const fvMesh&
mesh = ssf.mesh();
55 tmp<GradFieldType> tgGrad
72 GradFieldType& gGrad = tgGrad.ref();
78 Field<GradType>& igGrad = gGrad;
79 const Field<Type>& issf = ssf;
83 const GradType Sfssf = Sf[facei]*issf[facei];
85 igGrad[owner[facei]] += Sfssf;
86 igGrad[neighbour[facei]] -= Sfssf;
92 mesh.boundary()[patchi].faceCells();
96 const fvsPatchField<Type>& pssf = ssf.boundaryField()[patchi];
100 igGrad[pFaceCells[facei]] += pSf[facei]*pssf[facei];
106 gGrad.correctBoundaryConditions();
124 const GeometricField<Type, fvPatchField, volMesh>& vsf,
129 typedef GeometricField<GradType, fvPatchField, volMesh> GradFieldType;
131 tmp<GradFieldType> tgGrad
135 GradFieldType& gGrad = tgGrad.ref();
153 auto& gGradbf = gGrad.boundaryFieldRef();
161 vsf.
mesh().Sf().boundaryField()[patchi]
162 / vsf.
mesh().magSf().boundaryField()[patchi]
165 gGradbf[patchi] +=
n *
168 - (
n & gGradbf[patchi])
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
cellMask correctBoundaryConditions()
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 calculated using Gauss' theorem on the given surface field...
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Generic GeometricField class.
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
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 for optional caching.
Mesh data needed to do the Finite Volume discretisation.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const Mesh & mesh() const noexcept
Return mesh.
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 snGrad functions.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
const word extrapolatedCalculatedType
A combined zero-gradient and calculated patch field type.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
static constexpr const zero Zero
Global zero (0)