39 functionObject* ptr = 0;
44 if (fnd != indices_.
end())
49 ptr = this->
set(oldIndex, 0).ptr();
74 execution_(execution),
90 parentDict_(parentDict),
91 execution_(execution),
117 region =
args[
"region"];
181 functionsPtr->read();
226 if (
operator[](oi).executeAtStart())
228 ok = operator[](oi).execute() && ok;
229 ok = operator[](oi).write() && ok;
251 ok = operator[](oi).execute() && ok;
252 ok = operator[](oi).write() && ok;
273 ok = operator[](oi).end() && ok;
283 scalar result = vGreat;
294 result =
min(result,
operator[](oi).timeToNextAction());
305 updated_ = execution_;
314 const entry* entryPtr = parentDict_.lookupEntryPtr
332 <<
"'functions' entry is not a dictionary"
342 functionObject::dictionaryConstructorTablePtr_
345 newPtrs.
setSize(functionsDict.size());
346 newDigs.
setSize(functionsDict.size());
350 const word& key = iter().keyword();
352 if (!iter().isDict())
357 <<
"Entry " << key <<
" is not a dictionary" <<
endl;
376 if (newDigs[nFunc] != digests_[oldIndex])
412 objPtr = foPtr.
ptr();
423 newPtrs.
set(nFunc, objPtr);
424 newIndices.
insert(key, nFunc);
435 digests_.transfer(newDigs);
436 indices_.transfer(newIndices);
455 operator[](oi).movePoints(mesh);
467 operator[](oi).topoChange(map);
479 operator[](oi).mapMesh(map);
491 operator[](oi).distribute(map);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
friend class iterator
Declare friendship with the iterator.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void setSize(const label)
Reset size of List.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
void clear()
Clear the PtrList, i.e. set size to zero deleting all the.
void transfer(PtrList< T > &)
Transfer the contents of the argument PtrList into this PtrList.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Extract command arguments and options from the supplied argc and argv parameters.
const string & commandLine() const
Return the command line string.
bool optionFound(const word &opt) const
Return true if the named option is found.
IStringStream optionLookup(const word &opt) const
Return an IStringStream from the named option.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
T * ptr()
Return object pointer for reuse.
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
void set(T *)
Set pointer to that given.
A keyword and a list of tokens is a 'dictionaryEntry'.
A list of keyword definitions, which are a keyword followed by any number of values (e....
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
static const dictionary null
Null dictionary.
SHA1Digest digest() const
Return the SHA1 digest of the dictionary contents.
bool open(const fileName &libName, const bool verbose=true)
Open the named library, optionally with warnings if problems occur.
A keyword and a list of tokens is an 'entry'.
virtual bool isDict() const
Return true if this entry is a dictionary.
virtual const dictionary & dict() const =0
Return dictionary if this entry is a dictionary.
static fileName functionObjectDictPath
Default relative path to the directory structure.
List of function objects with start(), execute() and end() functions that is called for each object.
static autoPtr< functionObjectList > New(const argList &args, const Time &runTime, dictionary &controlDict)
Construct and return a functionObjectList for an application.
virtual ~functionObjectList()
Destructor.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual void movePoints(const polyMesh &mesh)
Update topology using the given map.
label findObjectID(const word &name) const
Find the ID of a given function object by name.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
bool start()
Called at the start of the time-loop.
functionObjectList(const Time &runTime, const bool execution=true)
Construct from Time and the execution setting.
void clear()
Clear the list of function objects.
scalar timeToNextAction()
Return the time to the next write.
bool execute()
Called at each ++ or += of the time-loop.
virtual void topoChange(const polyTopoChangeMap &map)
Update topology using the given map.
bool end()
Called when Time::run() determines that the time-loop exits.
bool read()
Read and set the function objects if their data have changed.
Abstract base-class for Time/database functionObjects.
static autoPtr< functionObject > New(const word &name, const Time &, const dictionary &)
Select from dictionary, based on its "type" entry.
virtual bool read(const dictionary &)
Read and set the functionObject if its data have changed.
General time control for functionObjects.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Mesh consisting of general polyhedral cells.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
static const word null
An empty word.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dlLibraryTable libs
Table of loaded dynamic libraries.
bool read(const char *, int32_t &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool readConfigFile(const word &configType, const string &argString, dictionary &parentDict, const fileName &configFilesPath, const Pair< string > &contextTypeAndValue, const word ®ion=word::null)
Read the specified configuration file.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
word name(const complex &)
Return a string representation of a complex.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
Foam::argList args(argc, argv)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable