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