36namespace 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(),
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Generic templated field type.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
void correctBoundaryConditions()
Correct boundary field.
A primitive field of type <T> with automated input and output.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
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.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
wordHashSet selectionNames() const
Return the current field selection.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
virtual bool updateSelection()
Update the selection using current contents of obr_.
Writes solver information for a list of user-specified fields.
void createResidualField(const word &fieldName)
Create and store a residual field on the mesh database.
void writeFileHeader(Ostream &os)
Output file header information.
virtual bool execute()
Execute solverInfo.
virtual bool write()
Write solverInfo results.
solverFieldSelection fieldSet_
Names of operand fields.
virtual bool read(const dictionary &)
Read solverInfo settings.
Base class for writing single files from the function objects.
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.
bool writtenHeader_
Flag to identify whether the header has been written.
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.
virtual bool write(const bool valid=true) const
Write using setting from DB.
A class for handling words, derived from Foam::string.
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
#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.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.