Go to the documentation of this file.
170 #ifndef functionObjects_externalCoupled_H
171 #define functionObjects_externalCoupled_H
189 namespace functionObjects
196 class externalCoupled
198 public functionObjects::timeFunctionObject,
199 public externalFileCoupler
205 label calcFrequency_;
211 DynamicList<word> regionGroupNames_;
214 DynamicList<wordList> regionGroupRegions_;
217 HashTable<labelList> regionToGroups_;
220 DynamicList<wordRe> groupNames_;
223 DynamicList<wordList> groupReadFields_;
226 DynamicList<wordList> groupWriteFields_;
229 bool initialisedCoupling_;
235 static fileName groupDir
237 const fileName& commsDir,
238 const word& regionsName,
239 const wordRe& groupName
246 const UPtrList<const fvMesh>&
meshes,
247 const wordRe& groupName,
248 const word& fieldName
257 const word& fieldName
269 const label nColumns,
292 void performCoupling();
336 virtual bool execute(
const label subIndex);
345 virtual bool write();
void operator=(const externalCoupled &)=delete
virtual void readDataMaster()
virtual bool read(const dictionary &dict)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
A class for handling file names.
A class for managing temporary objects.
Virtual base class for function objects with a reference to Time.
Provides a simple file-based communication interface for explicit coupling with an external applicati...
virtual ~externalCoupled()=default
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual void removeDataMaster() const
virtual void writeDataMaster() const
A HashTable similar to std::unordered_map.
virtual void removeDataSlave() const
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Encapsulates the logic for coordinating between OpenFOAM and an external application.
const word & name() const noexcept
TypeName("externalCoupled")
externalCoupled(const word &name, const Time &runTime, const dictionary &dict)
static void writeGeometry(const UPtrList< const fvMesh > &meshes, const fileName &commsDir, const wordRe &groupName)
static word compositeName(const wordList &)
Database for solution data, solver performance and other reduced data.