162#ifndef Foam_functionObjects_externalCoupled_H
163#define Foam_functionObjects_externalCoupled_H
190 public functionObjects::timeFunctionObject,
191 public externalFileCoupler
196 label calcFrequency_;
202 DynamicList<word> regionGroupNames_;
205 DynamicList<wordList> regionGroupRegions_;
208 HashTable<labelList> regionToGroups_;
211 DynamicList<wordRe> groupNames_;
214 DynamicList<wordList> groupReadFields_;
217 DynamicList<wordList> groupWriteFields_;
220 bool initialisedCoupling_;
226 static fileName groupDir
228 const fileName& commsDir,
229 const word& regionsName,
230 const wordRe& groupName
237 const UPtrList<const fvMesh>&
meshes,
238 const wordRe& groupName,
239 const word& fieldName
248 const word& fieldName
261 const label nColumns,
280 void performCoupling();
324 virtual bool execute(
const label subIndex);
333 virtual bool write();
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A HashTable similar to std::unordered_map.
Input from file stream as an ISstream, normally using std::ifstream for the actual input.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
const word & name() const noexcept
Return the name of this functionObject.
bool log
Flag to write log into Info.
Provides a simple file-based communication interface for explicit coupling with an external applicati...
externalCoupled(const externalCoupled &)=delete
No copy construct.
virtual void writeDataMaster() const
Write data files (all regions, all fields) from master (OpenFOAM).
virtual void removeDataSlave() const
Remove data files written by slave (external code).
void operator=(const externalCoupled &)=delete
No copy assignment.
static string patchKey
Name of patch key, e.g. '// Patch:' when looking for start of patch data.
virtual bool read(const dictionary &dict)
Read and set the function object if its data have changed.
TypeName("externalCoupled")
Runtime type information.
virtual void readDataMaster()
Read data files (all regions, all fields) on master (OpenFOAM).
virtual ~externalCoupled()=default
Destructor.
virtual void removeDataMaster() const
Remove data files written by master (OpenFOAM).
externalCoupled(const word &name, const Time &runTime, const dictionary &dict)
Construct given time and dictionary.
virtual bool execute()
Called at each ++ or += of the time-loop.
virtual bool write()
Write, currently a no-op.
virtual bool end()
Called when Time::run() determines that the time-loop exits.
static word compositeName(const wordList &)
Create single name by appending words (in sorted order), separated by '_'.
Virtual base class for function objects with a reference to Time.
Mesh data needed to do the Finite Volume discretisation.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
A class for handling words, derived from Foam::string.
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
List< word > wordList
List of word.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.