39 namespace functionObjects
55 void Foam::functionObjects::writeDictionary::writeHeader()
67 void Foam::functionObjects::writeDictionary::checkDictionary
69 const dictionary&
dict,
73 const auto digest(
dict.digest());
75 if (digests_[dicti] != digest)
77 digests_[dicti] = digest;
87 bool Foam::functionObjects::writeDictionary::tryDirectory
103 if (
dictIO.typeHeaderOk<IOdictionary>(
true))
105 checkDictionary(IOdictionary(
dictIO), dicti);
116 Foam::functionObjects::writeDictionary::writeDictionary
141 digests_.resize(dictNames_.size());
144 Info<<
type() <<
' ' <<
name() <<
": monitoring dictionaries:" <<
nl;
149 if (dictNames_.empty())
159 bool Foam::functionObjects::writeDictionary::performCheck()
167 const auto* dictptr =
168 obr_.cfindObject<IOdictionary>(dictNames_[dicti],
true);
172 checkDictionary(*dictptr, dicti);
179 checkDictionary(obr_.time().controlDict(), dicti);
185 tryDirectory(obr_.time().timeName(), dicti)
186 || tryDirectory(obr_.time().constant(), dicti)
187 || tryDirectory(obr_.time().system(), dicti)
194 Info<<
" Unable to locate dictionary " 195 << dictNames_[dicti] <<
nl <<
nl;
Specialization of Foam::functionObject for a region and providing a reference to the region Foam::obj...
defineTypeNameAndDebug(ObukhovLength, 0)
virtual bool read(const dictionary &)
Read the writeDictionary data.
static void writeHeader(Ostream &os, const word &fieldName)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
constexpr char nl
The newline '\n' character (0x0a)
const word dictName("faMeshDefinition")
Ostream & endl(Ostream &os)
Add newline and flush stream.
static Ostream & writeDivider(Ostream &os)
Write the standard file section divider.
Ignore writing from objectRegistry::writeObject()
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
const word & name() const noexcept
Return the name of this functionObject.
bool read(const char *buf, int32_t &val)
Same as readInt32.
#define forAll(list, i)
Loop across all elements in list.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
virtual const word & type() const =0
Runtime type information.
HashSet< word, Hash< word > > wordHashSet
A HashSet of words, uses string hasher.
static word controlDictName
The default control dictionary name (normally "controlDict")
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
virtual bool write()
Write the selected dictionaries.
virtual bool execute()
Execute, currently does nothing.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual bool read(const dictionary &dict)
Read optional controls.
Do not request registration (bool: false)