38 const SurfaceField<Type>& ssf,
44 const fvMesh&
mesh = ssf.mesh()();
46 tmp<VolField<GradType>> tgGrad
61 VolField<GradType>& gGrad = tgGrad.ref();
67 Field<GradType>& igGrad = gGrad;
68 const Field<Type>& issf = ssf;
72 GradType Sfssf = Sf[facei]*issf[facei];
74 igGrad[owner[facei]] += Sfssf;
75 igGrad[neighbour[facei]] -= Sfssf;
83 const fvsPatchField<Type>& pssf = ssf.boundaryField()[
patchi];
87 igGrad[pFaceCells[facei]] += pSf[facei]*pssf[facei];
93 gGrad.correctBoundaryConditions();
106 const VolField<Type>& vsf,
112 tmp<VolField<GradType>> tgGrad
116 VolField<GradType>& gGrad = tgGrad.ref();
#define forAll(list, i)
Loop across all elements in list.
const GeoMesh & mesh() const
Return mesh.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const DimensionedField< scalar, fvMesh > & V() const
Return cell volumes.
const labelUList & owner() const
Internal face owner.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const surfaceVectorField & Sf() const
Return cell face area vectors.
const labelUList & neighbour() const
Internal face neighbour.
static tmp< VolField< typename outerProduct< vector, Type >::type > > gradf(const SurfaceField< Type > &, const word &name)
Return the gradient of the given field.
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.
static void correctBoundaryConditions(const VolField< Type > &, VolField< typename outerProduct< vector, Type >::type > &)
Correct the boundary values of the gradient using the patchField.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
A class for managing temporary objects.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
volVectorField vectorField(fieldObject, mesh)
U correctBoundaryConditions()
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
const dimensionSet & dimLength
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
UList< label > labelUList
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.