Go to the documentation of this file.
36 namespace functionObjects
66 writeFileHeader<scalar>(
os, fieldName);
67 writeFileHeader<vector>(
os, fieldName);
68 writeFileHeader<sphericalTensor>(
os, fieldName);
69 writeFileHeader<symmTensor>(
os, fieldName);
70 writeFileHeader<tensor>(
os, fieldName);
84 if (!writeResidualFields_)
89 const word residualName
102 mesh_.time().timeName(),
112 residualFieldNames_.insert(residualName);
129 residualFieldNames_(),
130 writeResidualFields_(
false),
143 initialised_ =
false;
145 fieldSet_.read(
dict);
147 writeResidualFields_ =
dict.getOrDefault(
"writeResidualFields",
false);
149 residualFieldNames_.clear();
164 writeFileHeader(file());
166 if (writeResidualFields_)
168 for (
const word& fieldName : fieldSet_.selectionNames())
170 initialiseResidualField<scalar>(fieldName);
171 initialiseResidualField<vector>(fieldName);
172 initialiseResidualField<sphericalTensor>(fieldName);
173 initialiseResidualField<symmTensor>(fieldName);
174 initialiseResidualField<tensor>(fieldName);
181 writeCurrentTime(file());
183 for (
const word& fieldName : fieldSet_.selectionNames())
185 updateSolverInfo<scalar>(fieldName);
186 updateSolverInfo<vector>(fieldName);
187 updateSolverInfo<sphericalTensor>(fieldName);
188 updateSolverInfo<symmTensor>(fieldName);
189 updateSolverInfo<tensor>(fieldName);
200 for (
const word& residualName : residualFieldNames_)
202 const auto* residualPtr =
212 mesh_.time().timeName(),
224 residual.correctBoundaryConditions();
virtual bool updateSelection()
Update the selection using current contents of obr_.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual bool read(const dictionary &)
Read solverInfo settings.
A class for handling words, derived from Foam::string.
virtual OFstream & file()
Return access to the file (if only 1)
A primitive field of type <T> with automated input and output.
bool writtenHeader_
Flag to identify whether the header has been written.
static constexpr const zero Zero
Global zero (0)
bool read(const char *buf, int32_t &val)
Same as readInt32.
Ostream & endl(Ostream &os)
Add newline and flush stream.
wordHashSet selectionNames() const
Return the current field selection.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual void writeBreak(Ostream &os) const
Write a break marker to the stream.
virtual bool execute()
Execute solverInfo.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
solverInfo(const solverInfo &)=delete
No copy construct.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
void writeFileHeader(Ostream &os)
Output file header information.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
virtual bool write()
Write solverInfo results.
solverFieldSelection fieldSet_
Names of operand fields.
defineTypeNameAndDebug(ObukhovLength, 0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Base class for writing single files from the function objects.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
void createResidualField(const word &fieldName)
Create and store a residual field on the mesh database.
const dimensionSet dimless
Dimensionless.