Executes system calls, entered in the form of a string lists. More...
Public Member Functions | |
TypeName ("systemCall") | |
Runtime type information. More... | |
systemCall (const word &name, const Time &runTime, const dictionary &dict) | |
Construct from Time and dictionary. More... | |
systemCall (const systemCall &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~systemCall () |
Destructor. More... | |
virtual bool | read (const dictionary &) |
Read the system calls. More... | |
virtual bool | execute () |
Execute the "executeCalls" at each time-step. More... | |
virtual bool | end () |
Execute the "endCalls" at the final time-loop. More... | |
virtual bool | write () |
Write, execute the "writeCalls". More... | |
void | operator= (const systemCall &)=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 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... | |
Protected Attributes | |
stringList | executeCalls_ |
List of calls to execute - every step. More... | |
stringList | endCalls_ |
List of calls to execute when exiting the time-loop. More... | |
stringList | writeCalls_ |
List of calls to execute - write steps. 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... | |
Executes system calls, entered in the form of a string lists.
Calls can be made at the following points in the calculation:
Example of function object specification:
systemCall1 { type systemCall; libs ("libutilityFunctionObjects.so"); ... executeCalls ( "echo execute" ); writeCalls ( "echo \*\*\* writing data \*\*\*" ); endCalls ( "echo \*\*\* writing .bashrc \*\*\*" "cat ~/.bashrc" "echo \*\*\* done \*\*\*" ); }
Property | Description | Required | Default value |
---|---|---|---|
type | type name: systemCall | yes | |
executeCalls | list of calls on execute | yes | |
writeCalls | list of calls on write | yes | |
endCalls | list of calls on end | yes |
systemCall
function object, the allowSystemOperations
must be set to '1'; otherwise, system calls will not be allowed.Definition at line 124 of file systemCall.H.
systemCall | ( | const word & | name, |
const Time & | runTime, | ||
const dictionary & | dict | ||
) |
Construct from Time and dictionary.
Definition at line 53 of file systemCall.C.
References Foam::read().
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 70 of file systemCall.C.
TypeName | ( | "systemCall" | ) |
Runtime type information.
|
virtual |
Read the system calls.
Reimplemented from functionObject.
Definition at line 76 of file systemCall.C.
References dynamicCode::allowSystemOperations, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, dictionary::readIfPresent(), and WarningInFunction.
|
virtual |
Execute the "executeCalls" at each time-step.
Implements functionObject.
Definition at line 109 of file systemCall.C.
References forAll, and Foam::system().
|
virtual |
Execute the "endCalls" at the final time-loop.
Reimplemented from functionObject.
Definition at line 120 of file systemCall.C.
References forAll, and Foam::system().
|
virtual |
Write, execute the "writeCalls".
Implements functionObject.
Definition at line 131 of file systemCall.C.
References forAll, and Foam::system().
|
delete |
Disallow default bitwise assignment.
|
protected |
List of calls to execute - every step.
Definition at line 133 of file systemCall.H.
|
protected |
List of calls to execute when exiting the time-loop.
Definition at line 136 of file systemCall.H.
|
protected |
List of calls to execute - write steps.
Definition at line 139 of file systemCall.H.