Loading...
Searching...
No Matches
syncObjects Class Reference

Copies content of local objectRegistry to all processors. More...

#include <syncObjects.H>

Inheritance diagram for syncObjects:
Collaboration diagram for syncObjects:

Public Member Functions

 TypeName ("syncObjects")
 Runtime type information.
 syncObjects (const word &name, const Time &runTime, const dictionary &dict)
 Construct from name, Time and dictionary.
virtual ~syncObjects ()=default
 Destructor.
const objectRegistryobr () const
const fileNameroot () const
virtual bool read (const dictionary &)
 Read the function-object dictionary.
virtual bool execute ()
 Execute the function-object operations (no-op).
virtual bool write ()
 Write the function-object results.
Public Member Functions inherited from functionObject
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix)
 Construct from components.
autoPtr< functionObjectclone () const
 Return clone.
virtual ~functionObject ()=default
 Destructor.
virtual const wordtype () const =0
 Runtime type information.
const wordname () const noexcept
 Return the name of this functionObject.
bool useNamePrefix () const noexcept
 Return the flag for adding a scoping name prefix.
bool useNamePrefix (bool on) noexcept
 Modify the flag for adding a scoping name prefix.
virtual bool execute (const label subIndex)
 Execute using the specified subIndex.
virtual bool end ()
 Called when Time::run() determines that the time-loop exits.
virtual bool adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true.
virtual bool filesModified () const
 Did any file get changed during execution?
virtual void updateMesh (const mapPolyMesh &mpm)
 Update for changes of mesh.
virtual void movePoints (const polyMesh &mesh)
 Update for changes of mesh.

Protected Member Functions

void sync ()
 Do all: synchronise all IOFields and objectRegistry.
Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 Return a scoped (prefixed) name.

Additional Inherited Members

Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 Select from dictionary, based on its "type" entry.
Public Attributes inherited from functionObject
bool log
 Flag to write log into Info.
Static Public Attributes inherited from functionObject
static int debug
 Flag to execute debug content.
static bool postProcess
 Global post-processing mode switch.
static bool defaultUseNamePrefix
 Global default for useNamePrefix.
static word outputPrefix
 Directory prefix.

Detailed Description

Copies content of local objectRegistry to all processors.

Currently only supports IOFields. It is used to distribute IOFields from different processors/regions/worlds when doing loose coupling. To be used in combination with 'mapped' boundary conditions.

Usage
Minimal example by using system/controlDict.functions:
syncObjectsFO
{
    // Mandatory entries
    type            syncObjects;
    libs            (utilityFunctionObjects);
    ...

    // Optional entries
    // Where is data located relative to runTime. Given as a filename
    // with every '/' indicating a sub-objectRegistry w.r.t. runTime.
    // Local data is under <root>/send/processorXXX. After execution
    // (potentially remote) data will be under the corresponding
    // <root>/receive/processorYYY objectRegistry.
    root            <fileName>;  // "level0/level1/level2";

    // Inherited entries
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: syncObjects word yes -
libs Library name: utilityFunctionObjects word yes -
root Relative location of data fileName no -

The inherited entries are elaborated in:

Source files

Definition at line 120 of file syncObjects.H.

Constructor & Destructor Documentation

◆ syncObjects()

syncObjects ( const word & name,
const Time & runTime,
const dictionary & dict )

Construct from name, Time and dictionary.

Definition at line 47 of file syncObjects.C.

References dict, functionObject::functionObject(), functionObject::name(), read(), and runTime.

Here is the call graph for this function:

◆ ~syncObjects()

virtual ~syncObjects ( )
virtualdefault

Destructor.

Member Function Documentation

◆ sync()

◆ TypeName()

TypeName ( "syncObjects" )

Runtime type information.

References dict, functionObject::name(), and runTime.

Here is the call graph for this function:

◆ obr()

const objectRegistry & obr ( ) const
inline

Definition at line 189 of file syncObjects.H.

◆ root()

const fileName & root ( ) const
inline

Definition at line 194 of file syncObjects.H.

◆ read()

bool read ( const dictionary & dict)
virtual

Read the function-object dictionary.

Reimplemented from functionObject.

Definition at line 160 of file syncObjects.C.

References functionObject::debug, dict, Foam::endl(), fileName::null, Foam::Pout, functionObject::read(), sync(), and Foam::type().

Referenced by syncObjects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

bool execute ( )
virtual

Execute the function-object operations (no-op).

Implements functionObject.

Definition at line 183 of file syncObjects.C.

References functionObject::debug, Foam::endl(), Foam::Pout, sync(), and Foam::type().

Here is the call graph for this function:

◆ write()

bool write ( )
virtual

Write the function-object results.

Implements functionObject.

Definition at line 196 of file syncObjects.C.

References functionObject::debug, Foam::endl(), Foam::Pout, and Foam::type().

Here is the call graph for this function:

The documentation for this class was generated from the following files: