syncObjects Class Reference

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

Inheritance diagram for syncObjects:
[legend]
Collaboration diagram for syncObjects:
[legend]

Public Member Functions

 TypeName ("syncObjects")
 Runtime type information. More...
 
 syncObjects (const word &name, const Time &runTime, const dictionary &dict)
 Construct from Time and dictionary. More...
 
virtual ~syncObjects ()=default
 Destructor. More...
 
const objectRegistryobr () const
 
const fileNameroot () const
 
virtual bool read (const dictionary &)
 Read the syncObjects data. More...
 
virtual bool execute ()
 Do nothing. More...
 
virtual bool write ()
 Write the registered objects. More...
 
- 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. More...
 
autoPtr< functionObjectclone () const
 Return clone. More...
 
virtual ~functionObject ()=default
 Destructor. More...
 
virtual const wordtype () const =0
 Runtime type information. More...
 
const wordname () const noexcept
 Return the name of this functionObject. More...
 
bool useNamePrefix () const noexcept
 Return the flag for adding a scoping name prefix. More...
 
bool useNamePrefix (bool on) noexcept
 Modify the flag for adding a scoping name prefix. More...
 
virtual bool execute (const label subIndex)
 Execute using the specified subIndex. More...
 
virtual bool end ()
 Called when Time::run() determines that the time-loop exits. More...
 
virtual bool adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true. More...
 
virtual bool filesModified () const
 Did any file get changed during execution? More...
 
virtual void updateMesh (const mapPolyMesh &mpm)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &mesh)
 Update for changes of mesh. More...
 

Protected Member Functions

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

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. More...
 
- Public Attributes inherited from functionObject
bool log
 Flag to write log into Info. More...
 
- Static Public Attributes inherited from functionObject
static int debug
 Flag to execute debug content. More...
 
static bool postProcess
 Global post-processing mode switch. More...
 
static bool defaultUseNamePrefix
 Global default for useNamePrefix. More...
 
static word outputPrefix
 Directory prefix. More...
 

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
Example of function object specification:
syncObjects1
{
    type        syncObjects;
    libs        ("libutilityFunctionObjects.so");
    ...

    // 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        "level0/level1/level2";
}

Where the entries comprise:

Property Description Required Default value
type type name: syncObjects yes
root relative location of data no ""
See also
Foam::functionObject
Source files

Definition at line 109 of file syncObjects.H.

Constructor & Destructor Documentation

◆ syncObjects()

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

Construct from Time and dictionary.

Definition at line 55 of file syncObjects.C.

References dict, and Foam::blockMeshTools::read().

Here is the call graph for this function:

◆ ~syncObjects()

virtual ~syncObjects ( )
virtualdefault

Destructor.

Member Function Documentation

◆ sync()

void sync ( )
protected

◆ TypeName()

TypeName ( "syncObjects"  )

Runtime type information.

◆ obr()

const objectRegistry& obr ( ) const
inline

Definition at line 162 of file syncObjects.H.

◆ root()

const fileName& root ( ) const
inline

Definition at line 167 of file syncObjects.H.

◆ read()

bool read ( const dictionary dict)
virtual

Read the syncObjects data.

Reimplemented from functionObject.

Definition at line 173 of file syncObjects.C.

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

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Do nothing.

Implements functionObject.

Definition at line 196 of file syncObjects.C.

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

Here is the call graph for this function:

◆ write()

bool write ( )
virtual

Write the registered objects.

Implements functionObject.

Definition at line 209 of file syncObjects.C.

References Foam::expressions::patchExpr::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: