35 namespace functionObjects
51 Foam::functionObjects::systemCall::systemCall
81 if (executeCalls_.empty() && endCalls_.empty() && writeCalls_.empty())
84 <<
"no executeCalls, endCalls or writeCalls defined." 90 <<
"Executing user-supplied system calls is not enabled by " 91 <<
"default because of " <<
nl 92 <<
"security issues. If you trust the case you can enable this " 93 <<
"facility by " <<
nl 94 <<
"adding to the InfoSwitches setting in the system controlDict:" 96 <<
" allowSystemOperations 1" <<
nl <<
nl 97 <<
"The system controlDict is either" <<
nl <<
nl 98 <<
" ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict" <<
nl <<
nl 100 <<
" $WM_PROJECT_DIR/etc/controlDict" <<
nl <<
nl 110 forAll(executeCalls_, callI)
132 forAll(writeCalls_, callI)
#define forAll(list, i)
Loop across all elements in list.
virtual ~systemCall()
Destructor.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool write()
Write, execute the "writeCalls".
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base-class for Time/database function objects.
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 &)
virtual bool execute()
Execute the "executeCalls" at each time-step.
A class for handling words, derived from string.
static int allowSystemOperations
Flag if system operations are allowed.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual bool read(const dictionary &)
Read the system calls.
virtual bool end()
Execute the "endCalls" at the final time-loop.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, add, dictionary)
int system(const std::string &command)
Execute the specified command.