Go to the documentation of this file.
37 namespace functionObjects
58 bool Foam::functionObjects::blendingFactor::calc()
60 bool processed =
false;
62 processed = processed || calcScheme<scalar>();
63 processed = processed || calcScheme<vector>();
84 writeFileHeader(file());
85 setResultName(typeName,
"");
99 zeroGradientFvPatchScalarField::typeName
102 store(resultName_, indicatorPtr);
112 phiName_ =
dict.getOrDefault<
word>(
"phi",
"phi");
115 dict.getCheckOrDefault
119 [&](
const scalar tol){
return (tol > 0) && (tol < 1); }
134 lookupObject<volScalarField>(resultName_);
137 label nCellsScheme1 = 0;
138 label nCellsScheme2 = 0;
139 label nCellsBlended = 0;
140 for (
const auto i : indicator)
146 else if (i > (1 - tolerance_))
160 Log <<
" scheme 1 cells : " << nCellsScheme1 <<
nl
161 <<
" scheme 2 cells : " << nCellsScheme2 <<
nl
162 <<
" blended cells : " << nCellsBlended <<
nl
165 writeCurrentTime(file());
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
static constexpr const zero Zero
Global zero (0)
bool read(const char *buf, int32_t &val)
Same as readInt32.
blendingFactor(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool read(const dictionary &dict)
Read the fieldExpression data.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool write()
Write the blendingFactor.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual bool read(const dictionary &dict)
Read.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
word name(const complex &c)
Return string representation of complex.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
virtual void writeFileHeader(Ostream &os) const
Write the file header.
virtual bool read(const dictionary &)
Read the blendingFactor data.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
defineTypeNameAndDebug(ObukhovLength, 0)
Base class for writing single files from the function objects.
virtual bool write()
Write the result field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.