45 const GeometricField<Type, fvPatchField, volMesh>& vsf,
50 typedef GeometricField<GradType, fvPatchField, volMesh> GradFieldType;
51 typedef GeometricField<GradType, fvsPatchField, surfaceMesh>
53 typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfFieldType;
56 const SurfFieldType& ssf = tssf.cref();
58 tmp<GradFieldType> tgGrad = fv::gaussGrad<Type>::gradf(ssf,
name);
59 GradFieldType& gGrad = tgGrad.ref();
65 vsf.mesh().relaxField(
"grad(" + vsf.name() +
")",
relax);
67 for (label i = 0; i < nIter_; ++i)
71 tmp<SurfFieldType> tcorr = skv() & tsgGrad;
73 tcorr.ref().dimensions().reset(vsf.dimensions());
78 gGrad *= (1.0 -
relax);
79 gGrad +=
relax*fv::gaussGrad<Type>::gradf(tcorr + ssf,
name);
83 gGrad = fv::gaussGrad<Type>::gradf(tcorr + ssf,
name);
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
cellMask correctBoundaryConditions()
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
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.
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.
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.
A class for managing temporary objects.