35 namespace functionObjects
51 Foam::functionObjects::writeObjects::writeObjects
66 exclusiveWriting_(
false),
83 if (dict.
found(
"field"))
85 objectNames_.setSize(1);
86 dict.
lookup(
"field") >> objectNames_[0];
88 else if (dict.
found(
"fields"))
90 dict.
lookup(
"fields") >> objectNames_;
94 dict.
lookup(
"objects") >> objectNames_;
113 if (!obr_.time().writeTime())
115 obr_.time().writeTimeDict();
125 allNames.append(names);
130 <<
"Object " << objectNames_[i] <<
" not found in " 131 <<
"database. Available objects:" << nl << obr_.sortedToc()
143 if (exclusiveWriting_)
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write the registered objects.
A list of keyword definitions, which are a keyword followed by any number of values (e...
void size(const label)
Override size to be inconsistent with allocated storage.
static word defaultRegion
Return the default region name.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base-class for Time/database function objects.
writeOption writeOpt() const
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
bool read(const char *, int32_t &)
A class for handling words, derived from string.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
word name(const complex &)
Return a string representation of a complex.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
#define WarningInFunction
Report a warning using Foam::Warning.
addToRunTimeSelectionTable(functionObject, blendingFactor, dictionary)
virtual bool write() const
Write using setting from DB.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
Registry of regIOobjects.
virtual bool execute()
Do nothing.
virtual ~writeObjects()
Destructor.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual bool read(const dictionary &)
Read the writeObjects data.
const word & name() const
Return name.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.