33 bool Foam::functionObjects::blendingFactor::calcBF()
40 const VolField<Type>& field = lookupObject<VolField<Type>>(
fieldName_);
42 const word divScheme(
"div(" + phiName_ +
',' +
fieldName_ +
')');
47 tmp<fv::convectionScheme<Type>> cs =
50 const fv::gaussConvectionScheme<Type>& gcs =
51 refCast<const fv::gaussConvectionScheme<Type>>(cs());
53 const surfaceInterpolationScheme<Type>& interpScheme =
56 if (!
isA<blendedSchemeBase<Type>>(interpScheme))
59 << interpScheme.typeName <<
" is not a blended scheme"
64 const blendedSchemeBase<Type>& blendedScheme =
65 refCast<const blendedSchemeBase<Type>>(interpScheme);
66 tmp<surfaceScalarField> factorf(blendedScheme.blendingFactor(field));
word resultName_
Name of result field.
const word fieldName_
Name of field to process.
const fvMesh & mesh_
Reference to the fvMesh.
bool foundObject(const word &fieldName) const
Find field in the objectRegistry.
bool store(const tmp< ObjectType > &tfield)
Store the given field in the objectRegistry.
const fvSchemes & schemes() const
Return the fvSchemes.
ITstream & div(const word &name) const
static tmp< convectionScheme< Type > > New(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &schemeData)
Return a pointer to a new convectionScheme created on freestore.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Construct a volume field from a surface field using a combine operator.
tmp< VolField< Type > > cellReduce(const SurfaceField< Type > &, const CombineOp &cop, const Type &nullValue=pTraits< Type >::zero)
errorManipArg< error, int > exit(error &err, const int errNo=1)
SurfaceField< scalar > surfaceScalarField
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.