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();
63 for (label i = 0; i < nIter_; ++i)
67 tmp<SurfFieldType> tcorr = skv() & tsgGrad;
69 tcorr.ref().dimensions().reset(vsf.dimensions());
71 if (vsf.mesh().relaxField(
"grad(" + vsf.name() +
")"))
74 vsf.mesh().fieldRelaxationFactor(
"grad(" + vsf.name() +
")");
77 gGrad *= (1.0 -
relax);
78 gGrad +=
relax*fv::gaussGrad<Type>::gradf(tcorr + ssf,
name);
82 gGrad = fv::gaussGrad<Type>::gradf(tcorr + ssf,
name);
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
cellMask correctBoundaryConditions()
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.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Mesh data needed to do the Finite Volume discretisation.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for 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.