36 namespace functionObjects
82 if (executeCalls_.empty() && endCalls_.empty() && writeCalls_.empty())
85 <<
"no executeCalls, endCalls or writeCalls defined." 91 <<
"Executing user-supplied system calls is not enabled by " 92 <<
"default because of " <<
nl 93 <<
"security issues. If you trust the case you can enable this " 94 <<
"facility by " <<
nl 95 <<
"adding to the InfoSwitches setting in the system controlDict:" 97 <<
" allowSystemOperations 1" <<
nl <<
nl 98 <<
"The system controlDict is either" <<
nl <<
nl 99 <<
" ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict" <<
nl <<
nl 101 <<
" $WM_PROJECT_DIR/etc/controlDict" <<
nl <<
nl 111 forAll(executeCalls_, callI)
133 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.
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
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.
defineTypeNameAndDebug(Qdot, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
virtual bool read(const dictionary &)
Read the system calls.
systemCall(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool end()
Execute the "endCalls" at the final time-loop.
int system(const std::string &command)
Execute the specified command.