81 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" 82 "-I$(LIB_SRC)/meshTools/lnInclude \\\n" 84 +
"\n\nLIB_LIBS = \\\n" 86 +
" -lfiniteVolume \\\n" 95 return const_cast<Time&
>(time_).libs();
101 return "functionObject " +
name();
107 redirectFunctionObjectPtr_.clear();
119 Foam::codedFunctionObject::codedFunctionObject
133 updateLibrary(name_);
134 redirectFunctionObject();
148 if (!redirectFunctionObjectPtr_.valid())
151 constructDict.
set(
"type", name_);
160 return redirectFunctionObjectPtr_();
166 updateLibrary(name_);
167 return redirectFunctionObject().execute();
173 updateLibrary(name_);
174 return redirectFunctionObject().write();
180 updateLibrary(name_);
181 return redirectFunctionObject().end();
188 if (dict.
found(
"redirectType"))
190 dict.
lookup(
"redirectType") >> name_;
194 dict.
lookup(
"name") >> name_;
228 readPtr->startLineNumber(),
246 execPtr->startLineNumber(),
264 writePtr->startLineNumber(),
282 endPtr->startLineNumber(),
287 if(!dataPtr && !readPtr && !execPtr && !writePtr && !endPtr)
292 ) <<
"No critical \"code\" prefixed keywords were found." 293 <<
" Please check the code documentation for more details." 297 updateLibrary(name_);
298 return redirectFunctionObject().read(dict);
functionObject & redirectFunctionObject() const
Dynamically compiled functionObject.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual bool read(const dictionary &)
Read and set the function object if its data have changed.
const entry * lookupEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
A list of keyword definitions, which are a keyword followed by any number of values (e...
void setMakeOptions(const std::string &content)
Define contents for Make/options.
static void addLineDirective(string &, const label lineNum, const fileName &name)
Helper: add #line directive.
virtual label startLineNumber() const =0
Return line number of first token in dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void clearRedirect() const
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
Abstract base-class for Time/database function objects.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual const dictionary & codeDict() const
Macros for easy insertion into run-time selection tables.
virtual dlLibraryTable & libs() const
Get the loaded dynamic libraries.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
string trim(const string &)
Return string trimmed of leading and trailing whitespace.
bool read(const char *, int32_t &)
const fileName & name() const
Return the dictionary name.
A class for handling words, derived from string.
virtual bool end()
Called when Time::run() determines that the time-loop exits.
Base class for function objects and boundary conditions using dynamic code.
A table of dynamically loaded libraries.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
word name(const complex &)
Return a string representation of a complex.
virtual ~codedFunctionObject()
Destructor.
const string & libs() const
Return the code-libs.
Tools for handling dynamic code compilation.
Encapsulation of dynamic code dictionaries.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
string & inplaceExpand(string &, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
Inplace expand occurrences of variables according to the mapping.
const string & options() const
Return the code-options.
static autoPtr< functionObject > New(const word &name, const Time &, const dictionary &)
Select from dictionary, based on its "type" entry.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
virtual bool execute()
Called at each ++ or += of the time-loop.
void set(entry *)
Assign a new entry, overwrite any existing entry.
virtual bool write()
Called at each ++ or += of the time-loop.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
virtual string description() const
virtual ITstream & stream() const =0
Return token stream if this entry is a primitive entry.
A class for handling character strings derived from std::string.
A keyword and a list of tokens is an 'entry'.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.