69 void Foam::codedFunctionObject::prepare
72 const dynamicCodeContext& context
75 dynCode.setFilterVariable(
"typeName", codeName());
78 dynCode.addCompileFile(codeTemplateC(
"codedFunctionObject"));
81 dynCode.addCopyFile(codeTemplateH(
"codedFunctionObject"));
86 dynCode.setFilterVariable(
"verbose",
"true");
87 Info<<
"compile " << codeName() <<
" sha1: " 88 << context.sha1() <<
endl;
92 dynCode.setMakeOptions
95 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" 96 "-I$(LIB_SRC)/meshTools/lnInclude \\\n" 98 +
"\n\nLIB_LIBS = \\\n" 100 +
" -lfiniteVolume \\\n" 101 +
" -lmeshTools \\\n" 107 void Foam::codedFunctionObject::clearRedirect()
const 109 redirectFunctionObjectPtr_.clear();
140 if (!redirectFunctionObjectPtr_.valid())
143 constructDict.
set(
"type", codeName());
152 return redirectFunctionObjectPtr_();
159 return redirectFunctionObject().fields();
166 return redirectFunctionObject().execute();
173 return redirectFunctionObject().write();
180 return redirectFunctionObject().end();
187 return redirectFunctionObject().read(dict);
virtual bool read(const dictionary &)
Read and set the function object if its data have changed.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Ostream & endl(Ostream &os)
Add newline and flush stream.
codedFunctionObject(const word &name, const Time &time, const dictionary &dict)
Construct from Time and dictionary.
Abstract base-class for Time/database functionObjects.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
virtual wordList fields() const
Return the list of fields required.
bool read(const char *, int32_t &)
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.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
virtual ~codedFunctionObject()
Destructor.
static autoPtr< functionObject > New(const word &name, const Time &, const dictionary &)
Select from dictionary, based on its "type" entry.
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.