Provides a general interface to enable dynamic code compilation. More...
Public Member Functions | |
TypeName ("coded") | |
Runtime type information. More... | |
codedFunctionObject (const word &name, const Time &time, const dictionary &dict) | |
Construct from Time and dictionary. More... | |
codedFunctionObject (const codedFunctionObject &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~codedFunctionObject () |
Destructor. More... | |
virtual bool | execute () |
Called at each ++ or += of the time-loop. More... | |
virtual bool | write () |
Called at each ++ or += of the time-loop. More... | |
virtual bool | end () |
Called when Time::run() determines that the time-loop exits. More... | |
virtual bool | read (const dictionary &) |
Read and set the function object if its data have changed. More... | |
void | operator= (const codedFunctionObject &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from functionObject | |
ClassName ("functionObject") | |
virtual const word & | type () const =0 |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict)) | |
functionObject (const word &name) | |
Construct from components. More... | |
autoPtr< functionObject > | clone () const |
Return clone. More... | |
functionObject (const functionObject &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~functionObject () |
Destructor. More... | |
const word & | name () const |
Return the name of this functionObject. More... | |
virtual bool | executeAtStart () const |
Return true if the functionObject should be executed at the start. More... | |
virtual bool | setTimeStep () |
Called by Time::setDeltaT(). Allows the functionObject to override. More... | |
virtual scalar | timeToNextWrite () |
Called by Time::adjustTimeStep(). Allows the functionObject to. More... | |
virtual void | updateMesh (const mapPolyMesh &mpm) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &mesh) |
Update for changes of mesh. More... | |
void | operator= (const functionObject &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from CodedBase< functionObject > | |
CodedBase () | |
Construct null. More... | |
CodedBase (const dictionary &dict) | |
Construct from dictionary. More... | |
CodedBase (const CodedBase< functionObject > &cb) | |
Copy constructor. More... | |
virtual | ~CodedBase () |
Destructor. More... | |
virtual const word & | codeName () const |
Name of the dynamically generated CodedType. More... | |
virtual const dictionary & | codeDict () const |
Get the dictionary to initialize the codeContext. More... | |
void | writeCode (Ostream &os) const |
Public Member Functions inherited from codedBase | |
ClassName ("codedBase") | |
Runtime type information. More... | |
codedBase () | |
Construct null. More... | |
codedBase (const codedBase &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~codedBase () |
Destructor. More... | |
void | operator= (const codedBase &)=delete |
Disallow default bitwise assignment. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from functionObject | |
static autoPtr< functionObject > | New (const word &name, const Time &, const dictionary &) |
Select from dictionary, based on its "type" entry. More... | |
Public Attributes inherited from functionObject | |
Switch | log |
Switch write log to Info. More... | |
Switch | executeAtStart_ |
Switch write log to Info. More... | |
Static Public Attributes inherited from functionObject | |
static bool | postProcess |
Global post-processing mode switch. More... | |
Static Public Attributes inherited from CodedBase< functionObject > | |
static const word | codeTemplateC |
Name of the C code template to be used. More... | |
static const word | codeTemplateH |
Name of the H code template to be used. More... | |
Protected Member Functions inherited from codedBase | |
void | updateLibrary () const |
Update library as required. More... | |
Provides a general interface to enable dynamic code compilation.
codeInclude | : | include files |
codeOptions | : | include paths; inserted into EXE_INC in Make/options |
codeLibs | : | link line; inserted into LIB_LIBS in Make/options |
codeData | : | c++; local member data (null constructed); |
localCode | : | c++; local static functions; |
codeRead | : | c++; upon functionObject::read(); |
codeExecute | : | c++; upon functionObject::execute(); |
codeWrite | : | c++; upon functionObject::write() |
codeEnd | : | c++; upon functionObject::end(); |
Example of function object specification:
difference { libs ("libutilityFunctionObjects.so"); type coded; // Name of on-the-fly generated functionObject name writeMagU; codeWrite #{ // Lookup U const volVectorField& U = mesh().lookupObject<volVectorField>("U"); // Write mag(U)().write(); #}; }
Definition at line 121 of file codedFunctionObject.H.
codedFunctionObject | ( | const word & | name, |
const Time & | time, | ||
const dictionary & | dict | ||
) |
Construct from Time and dictionary.
Definition at line 115 of file codedFunctionObject.C.
References Foam::read().
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 131 of file codedFunctionObject.C.
References functionObject::New(), and dictionary::set().
TypeName | ( | "coded" | ) |
Runtime type information.
|
virtual |
Called at each ++ or += of the time-loop.
postProcess overrides the usual executeControl behaviour and forces execution (used in post-processing mode)
Implements functionObject.
Definition at line 155 of file codedFunctionObject.C.
|
virtual |
Called at each ++ or += of the time-loop.
postProcess overrides the usual writeControl behaviour and forces writing always (used in post-processing mode)
Implements functionObject.
Definition at line 162 of file codedFunctionObject.C.
|
virtual |
Called when Time::run() determines that the time-loop exits.
By default it simply calls execute().
Reimplemented from functionObject.
Definition at line 169 of file codedFunctionObject.C.
|
virtual |
Read and set the function object if its data have changed.
Reimplemented from functionObject.
Definition at line 176 of file codedFunctionObject.C.
|
delete |
Disallow default bitwise assignment.