39namespace functionObjects
55void Foam::functionObjects::writeDictionary::writeHeader()
67void Foam::functionObjects::writeDictionary::checkDictionary
69 const dictionary&
dict,
73 const auto digest(
dict.digest());
75 if (digests_[dicti] != digest)
77 digests_[dicti] = digest;
87bool Foam::functionObjects::writeDictionary::tryDirectory
103 if (
dictIO.typeHeaderOk<IOdictionary>(
true))
105 checkDictionary(IOdictionary(
dictIO), dicti);
141 digests_.resize(dictNames_.size());
144 Info<<
type() <<
' ' <<
name() <<
": monitoring dictionaries:" <<
nl;
149 if (dictNames_.empty())
159bool 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;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
static Ostream & writeDivider(Ostream &os)
Write the standard file section divider.
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.
static word controlDictName
The default control dictionary name (normally "controlDict")
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
const word & name() const noexcept
Return the name of this functionObject.
virtual const word & type() const =0
Runtime type information.
Specialization of Foam::functionObject for a region and providing a reference to the region Foam::obj...
Reports dictionary contents on change.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the selected dictionaries.
virtual bool read(const dictionary &)
Read the writeDictionary data.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const word dictName("faMeshDefinition")
static void writeHeader(Ostream &os, const word &fieldName)
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
HashSet< word, Hash< word > > wordHashSet
A HashSet of words, uses string hasher.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.