92 #ifndef externalFileCoupler_H 93 #define externalFileCoupler_H 137 unsigned waitInterval_;
enum Time::stopAtControls waitForMaster() const
Wait for master to complete.
virtual ~externalFileCoupler()
Destructor.
enum Time::stopAtControls waitForSlave() const
Wait for slave to complete.
Encapsulates the logic for coordinating between OpenFOAM and an external application.
A class for handling file names.
enum Time::stopAtControls useSlave(const bool wait=false) const
Remove lock file to indicate that the external program is in charge.
bool slaveFirst() const
External application provides initial values.
runState
The run state (ie, who is currently in charge)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
The master (OpenFOAM) is in charge.
bool initialized() const
True if state has been initialized.
virtual void readDataMaster()
Read data files on master (OpenFOAM).
void shutdown() const
Generate status=done in lock (only when run-state = master)
virtual void removeDataMaster() const
Remove data files written by master (OpenFOAM)
The slave (external program) is in charge.
A class for handling words, derived from Foam::string.
enum Time::stopAtControls useMaster(const bool wait=false) const
Create lock file to indicate that OpenFOAM is in charge.
static word lockName
Name of the lock file.
fileName resolveFile(const word &file) const
Return the file path in the communications directory.
fileName lockFile() const
Return the file path to the lock file.
externalFileCoupler()
Construct using standard defaults.
bool readDict(const dictionary &dict)
Read communication settings from dictionary.
virtual void writeDataMaster() const
Write data files from master (OpenFOAM)
const fileName & commDirectory() const
Return the file path to the base communications directory.
virtual void readDataSlave()
Read data files on slave (external program).
virtual void removeDataSlave() const
Remove data files written by slave (external program)
stopAtControls
Stop-run control options, which are primarily used when altering the stopAt condition.
void removeDirectory() const
Remove files written by OpenFOAM.
TypeName("externalFileCoupler")
Runtime type information.
virtual void writeDataSlave() const
Write data files from slave (external program)