mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: optionally limit systemCall function-object to master only (closes #729)
This commit is contained in:
29
tutorials/IO/systemCall/system/systemCall
Normal file
29
tutorials/IO/systemCall/system/systemCall
Normal file
@ -0,0 +1,29 @@
|
||||
// -*- C++ -*-
|
||||
// An example of using systemCall
|
||||
system
|
||||
{
|
||||
type systemCall;
|
||||
libs ("libutilityFunctionObjects.so");
|
||||
|
||||
// Execute on the master process only
|
||||
master true;
|
||||
|
||||
executeCalls
|
||||
(
|
||||
"echo execute: shell $$"
|
||||
);
|
||||
|
||||
writeCalls
|
||||
(
|
||||
"echo \*\*\* writing data \*\*\*"
|
||||
);
|
||||
|
||||
endCalls
|
||||
(
|
||||
"echo \*\*\* end of run \*\*\*"
|
||||
"grep application system/controlDict"
|
||||
"echo \*\*\* done \*\*\*"
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user