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