36 namespace functionObjects
79 parallel_ =
dict.lookupOrDefault(
"parallel",
false);
81 dict.readIfPresent(
"executeCalls", executeCalls_);
82 dict.readIfPresent(
"endCalls", endCalls_);
83 dict.readIfPresent(
"writeCalls", writeCalls_);
85 if (executeCalls_.empty() && endCalls_.empty() && writeCalls_.empty())
88 <<
"no executeCalls, endCalls or writeCalls defined."
94 <<
"Executing user-supplied system calls is not enabled by "
95 <<
"default because of " <<
nl
96 <<
"security issues. If you trust the case you can enable this "
97 <<
"facility by " <<
nl
98 <<
"adding to the InfoSwitches setting in the system controlDict:"
100 <<
" allowSystemOperations 1" <<
nl <<
nl
101 <<
"The system controlDict is either" <<
nl <<
nl
102 <<
" ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict" <<
nl <<
nl
104 <<
" $WM_PROJECT_DIR/etc/controlDict" <<
nl <<
nl
116 forAll(executeCalls_, callI)
144 forAll(writeCalls_, callI)
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
A list of keyword definitions, which are a keyword followed by any number of values (e....
static int allowSystemOperations
Flag if system operations are allowed.
Abstract base-class for Time/database functionObjects.
Executes system calls, entered in the form of a string lists.
virtual ~systemCall()
Destructor.
systemCall(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool execute()
Execute the "executeCalls" at each time-step.
virtual bool write()
Write, execute the "writeCalls".
virtual bool end()
Execute the "endCalls" at the final time-loop.
virtual bool read(const dictionary &)
Read the system calls.
Writes run time, CPU time and clock time and optionally the CPU and clock times per time step.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
defineTypeNameAndDebug(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
int system(const std::string &command)
Execute the specified command.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.