Go to the documentation of this file.
40 namespace functionObjects
85 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n"
86 "-I$(LIB_SRC)/meshTools/lnInclude \\\n"
88 +
"\n\nLIB_LIBS = \\\n"
90 " -lfiniteVolume \\\n"
105 return "functionObject " +
name();
111 redirectFunctionObjectPtr_.clear();
137 updateLibrary(name_);
138 redirectFunctionObject();
147 if (!redirectFunctionObjectPtr_)
150 constructDict.
set(
"type", name_);
159 return *redirectFunctionObjectPtr_;
165 updateLibrary(name_);
166 return redirectFunctionObject().execute();
172 updateLibrary(name_);
173 return redirectFunctionObject().write();
179 updateLibrary(name_);
180 return redirectFunctionObject().end();
190 dict.readCompat<
word>(
"name", {{
"redirectType", 1706}}, name_);
232 codeExecute_.clear();
289 <<
"No critical \"code\" prefixed keywords found." <<
nl
290 <<
"Please check the code documentation for more details." <<
nl
294 updateLibrary(name_);
295 return redirectFunctionObject().read(
dict);
const string & libs() const
Return the code-libs.
A keyword and a list of tokens is an 'entry'.
void append(const std::string &str)
Add content to SHA1 hashing.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
A table of dynamically loaded libraries.
virtual const dictionary & codeDict() const
The dictionary to initialize the codeContext.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual bool write()
Called at each ++ or += of the time-loop.
A class for handling words, derived from Foam::string.
static autoPtr< functionObject > New(const word &name, const Time &runTime, const dictionary &dict)
Select from dictionary, based on its "type" entry.
Tools for handling dynamic code compilation.
const Time & time_
Reference to the time database.
virtual string description() const
Return a description (type + name) for the output.
Encapsulation of dynamic code dictionaries.
bool read(const char *buf, int32_t &val)
Same as readInt32.
Base class for function objects and boundary conditions using dynamic code that provides methods for ...
Virtual base class for function objects with a reference to Time.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A class for handling character strings derived from std::string.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
codedFunctionObject(const codedFunctionObject &)=delete
No copy construct.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
Abstract base-class for Time/database function objects.
virtual bool read(const dictionary &)
Read and set the function object if its data have changed.
void setCodeContext(const dictionary &dict)
Set code context from a dictionary.
static void inplaceExpand(string &code, const dictionary &dict)
Cleanup string and expand with dictionary parameters.
functionObject & redirectFunctionObject() const
Dynamically compiled functionObject.
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
word name(const complex &c)
Return string representation of complex.
virtual bool read(const dictionary &dict)
Read and set the function object if its data have changed.
virtual label startLineNumber() const =0
Return line number of first token in dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
Macros for easy insertion into run-time selection tables.
const string & options() const
Return the code-options.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
virtual bool end()
Called when Time::run() determines that the time-loop exits.
void setMakeOptions(const std::string &content)
Define contents for Make/options.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
virtual dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
defineTypeNameAndDebug(ObukhovLength, 0)
void readEntry(T &val) const
virtual bool execute()
Called at each ++ or += of the time-loop.
virtual void clearRedirect() const
Clear any redirected objects.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
static unsigned addLineDirective(string &code, label lineNum, const fileName &file)
Prefix a #line directive to code.