54 readOnStart_(
dict.getOrDefault(
"readOnStart", true)),
80 for (
const word& fieldName : fieldSet_)
83 auto* ptr = mesh_.getObjectPtr<
regIOobject>(fieldName);
91 << ptr->name() <<
" (" << ptr->type()
92 <<
") already in database - removing" <<
endl;
100 << ptr->name() <<
" (" << ptr->type()
101 <<
") already in database" <<
endl;
111 mesh_.time().timeName(),
123 loadField<scalar>(
io)
124 || loadField<vector>(
io)
125 || loadField<sphericalTensor>(
io)
126 || loadField<symmTensor>(
io)
127 || loadField<tensor>(
io)
134 <<
"readFields : failed to load " << fieldName <<
endl;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
@ REGISTER
Request registration (bool: true).
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
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.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
virtual bool read(const dictionary &dict)
Read and set the function object if its data have changed.
static bool postProcess
Global post-processing mode switch.
const fvMesh & mesh_
Reference to the fvMesh.
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
bool readOnStart_
Read immediately on construction (default: true).
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
readFields(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
wordList fieldSet_
Fields to load.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
bool loadField(const IOobject &io)
Forward to loadAndStore for supported types.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define DebugInfo
Report an information message using Foam::Info.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.