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();
158 <<
" into " << gGrad.name() <<
endl;
165 const auto tssf(tinterpScheme_().
interpolate(vsf));
166 const auto& ssf = tssf();
175 const GradType Sfssf = Sf[facei]*issf[facei];
177 igGrad[owner[facei]] += Sfssf;
178 igGrad[neighbour[facei]] -= Sfssf;
184 mesh.boundary()[patchi].faceCells();
192 igGrad[pFaceCells[facei]] += pSf[facei]*pssf[facei];
198 gGrad.correctBoundaryConditions();
214 auto& gGradbf = gGrad.boundaryFieldRef();
222 vsf.
mesh().Sf().boundaryField()[patchi]
223 / vsf.
mesh().magSf().boundaryField()[patchi]
226 gGradbf[patchi] +=
n *
229 - (
n & gGradbf[patchi])
const word & name() const noexcept
Return the object name.
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()
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
Generic dimensioned Type 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.
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 & dimensions() const noexcept
Return dimensions.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Mesh data needed to do the Finite Volume discretisation.
const Mesh & mesh() const noexcept
Return const reference to mesh.
#define DebugPout
Report an information message using Foam::Pout.
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.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
static constexpr const zero Zero
Global zero (0)