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);
118 phiName_ =
dict.lookupOrDefault<
word>(
"phi",
"phi");
123 dict.readIfPresent(
"tolerance", tolerance_)
124 && (tolerance_ < 0 || tolerance_ > 1)
128 <<
"tolerance must be in the range 0 to 1. Supplied value: "
144 lookupObject<volScalarField>(resultName_);
147 label nCellsScheme1 = 0;
148 label nCellsScheme2 = 0;
149 label nCellsBlended = 0;
152 scalar i = indicator[celli];
158 else if (i > (1 - tolerance_))
172 Log <<
" scheme 1 cells : " << nCellsScheme1 <<
nl
173 <<
" scheme 2 cells : " << nCellsScheme2 <<
nl
174 <<
" blended cells : " << nCellsBlended <<
nl
177 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.
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.
addToRunTimeSelectionTable(functionObject, add, dictionary)
#define forAll(list, i)
Loop across all elements in list.
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)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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 ~blendingFactor()
Destructor.
errorManipArg< error, int > exit(error &err, const int errNo=1)
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
Base class for field expression function objects.
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
functionObject base class for writing single files
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.
#define Log
Report write to Foam::Info if the local log switch is true.