68 void Foam::codedFunctionObject::prepare
71 const dynamicCodeContext& context
74 dynCode.setFilterVariable(
"typeName", codeName());
77 dynCode.addCompileFile(codeTemplateC(
"codedFunctionObject"));
80 dynCode.addCopyFile(codeTemplateH(
"codedFunctionObject"));
85 dynCode.setFilterVariable(
"verbose",
"true");
86 Info<<
"compile " << codeName() <<
" sha1: " 87 << context.sha1() <<
endl;
91 dynCode.setMakeOptions
94 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" 95 "-I$(LIB_SRC)/meshTools/lnInclude \\\n" 97 +
"\n\nLIB_LIBS = \\\n" 99 +
" -lfiniteVolume \\\n" 100 +
" -lmeshTools \\\n" 106 void Foam::codedFunctionObject::clearRedirect()
const 108 redirectFunctionObjectPtr_.clear();
139 if (!redirectFunctionObjectPtr_.valid())
142 constructDict.
set(
"type", codeName());
151 return redirectFunctionObjectPtr_();
158 return redirectFunctionObject().execute();
165 return redirectFunctionObject().write();
172 return redirectFunctionObject().end();
179 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...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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.
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.