170 #ifndef Foam_functionObjects_externalCoupled_H 171 #define Foam_functionObjects_externalCoupled_H 189 namespace functionObjects
196 class externalCoupled
198 public functionObjects::timeFunctionObject,
199 public externalFileCoupler
204 label calcFrequency_;
210 DynamicList<word> regionGroupNames_;
213 DynamicList<wordList> regionGroupRegions_;
216 HashTable<labelList> regionToGroups_;
219 DynamicList<wordRe> groupNames_;
222 DynamicList<wordList> groupReadFields_;
225 DynamicList<wordList> groupWriteFields_;
228 bool initialisedCoupling_;
234 static fileName groupDir
236 const fileName& commsDir,
237 const word& regionsName,
238 const wordRe& groupName
245 const UPtrList<const fvMesh>&
meshes,
246 const wordRe& groupName,
247 const word& fieldName
256 const word& fieldName
269 const label nColumns,
288 void performCoupling();
332 virtual bool execute(
const label subIndex);
341 virtual bool write();
virtual bool end()
Called when Time::run() determines that the time-loop exits.
virtual bool read(const dictionary &dict)
Read and set the function object if its data have changed.
virtual bool write()
Write, currently a no-op.
A class for handling file names.
virtual bool execute()
Called at each ++ or += of the time-loop.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
static string patchKey
Name of patch key, e.g. '// Patch:' when looking for start of patch data.
static void writeGeometry(const UPtrList< const fvMesh > &meshes, const fileName &commsDir, const wordRe &groupName)
Write geometry for the group as region/patch.
Provides a simple file-based communication interface for explicit coupling with an external applicati...
virtual void removeDataSlave() const
Remove data files written by slave (external code)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const word & name() const noexcept
Return the name of this functionObject.
externalCoupled(const word &name, const Time &runTime, const dictionary &dict)
Construct given time and dictionary.
TypeName("externalCoupled")
Runtime type information.
A class for handling words, derived from Foam::string.
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
bool log
Flag to write log into Info.
virtual void removeDataMaster() const
Remove data files written by master (OpenFOAM)
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
virtual void writeDataMaster() const
Write data files (all regions, all fields) from master (OpenFOAM)
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
virtual ~externalCoupled()=default
Destructor.
void operator=(const externalCoupled &)=delete
No copy assignment.
virtual void readDataMaster()
Read data files (all regions, all fields) on master (OpenFOAM)
static word compositeName(const wordList &)
Create single name by appending words (in sorted order), separated by '_'.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...