37namespace functionObjects
58bool Foam::functionObjects::blendingFactor::calc()
60 bool processed =
false;
62 processed = processed || calcScheme<scalar>();
63 processed = processed || calcScheme<vector>();
99 zeroGradientFvPatchScalarField::typeName
112 phiName_ =
dict.getOrDefault<
word>(
"phi",
"phi");
115 dict.getCheckOrDefault
119 [](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());
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual bool read()
Re-read model coefficients if they have changed.
The TAB Method for Numerical Calculation of Spray Droplet Breakup.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Computes blending factor as an indicator about which of the schemes is active across the domain.
virtual void writeFileHeader(Ostream &os) const
Write the file header.
virtual bool write()
Write the blendingFactor.
virtual bool read(const dictionary &)
Read the blendingFactor data.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
word resultName_
Name of result field.
virtual bool write()
Write the result field.
void setResultName(const word &typeName, const word &defaultArg)
Set the name of result field.
const fvMesh & mesh_
Reference to the fvMesh.
bool store(word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
Store the field in the (sub) objectRegistry under the given name.
const Time & time_
Reference to the time database.
Base class for writing single files from the function objects.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual OFstream & file()
Return access to the file (if only 1)
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
const dimensionSet dimless
Dimensionless.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)