multiRegion Class Reference

Wrapper that clones the supplied function object for each region. More...

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

Public Member Functions

 TypeName ("multiRegion")
 Runtime type information. More...
 
 multiRegion (const word &name, const Time &runTime, const dictionary &dict)
 Construct from Time and dictionary. More...
 
virtual ~multiRegion ()=default
 Destructor. More...
 
virtual bool read (const dictionary &dict)
 Read the controls. More...
 
virtual bool execute ()
 Execute, currently does nothing. More...
 
virtual bool write ()
 Write the multiRegion. More...
 
- Public Member Functions inherited from timeFunctionObject
 timeFunctionObject (const word &name, const Time &runTime)
 Construct from Time. More...
 
virtual ~timeFunctionObject ()=default
 Destructor. More...
 
const Timetime () const
 Return time database. More...
 
objectRegistrystoredObjects ()
 
const objectRegistrystoredObjects () const
 
- 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

 multiRegion (const multiRegion &)=delete
 No copy construct. More...
 
void operator= (const multiRegion &)=delete
 No copy assignment. More...
 
- Protected Member Functions inherited from timeFunctionObject
void clearOutputObjects (const wordList &objNames)
 Remove specified items from "functionObjectObjects". More...
 
 timeFunctionObject (const timeFunctionObject &)=delete
 No copy construct. More...
 
void operator= (const timeFunctionObject &)=delete
 No copy assignment. More...
 
- Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 Return a scoped (prefixed) name. More...
 

Protected Attributes

PtrList< functionObjectfunctions_
 List of cloned objects (1 per region) More...
 
- Protected Attributes inherited from timeFunctionObject
const Timetime_
 Reference to the time database. 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

Wrapper that clones the supplied function object for each region.

Simplifies the setup of identical post-processing requirements for multi-region cases. Applies the supplied function to all regions by default.

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

    function
    {
        // Actual object specification
        type    fieldMinMax;
        libs    (fieldFunctionObjects);
        fields  (<field1> ... <fieldN>);
    }

    // Optional entries
    regions     (region1 region2);
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: multiRegion word yes -
libs Library name: utilityFunctionObjects word yes -
function Function object sub-dictionary dict yes -
regions List of region names wordList no all
See also
Source files

Definition at line 123 of file multiRegion.H.

Constructor & Destructor Documentation

◆ multiRegion() [1/2]

multiRegion ( const multiRegion )
protecteddelete

No copy construct.

◆ multiRegion() [2/2]

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

Construct from Time and dictionary.

Definition at line 54 of file multiRegion.C.

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

Here is the call graph for this function:

◆ ~multiRegion()

virtual ~multiRegion ( )
virtualdefault

Destructor.

Member Function Documentation

◆ operator=()

void operator= ( const multiRegion )
protecteddelete

No copy assignment.

◆ TypeName()

TypeName ( "multiRegion"  )

Runtime type information.

◆ read()

bool read ( const dictionary dict)
virtual

Read the controls.

Reimplemented from functionObject.

Definition at line 68 of file multiRegion.C.

References dictionary::add(), dict, Foam::endl(), timeControl::entriesPresent(), f(), multiRegion::functions_, Foam::Info, wordRes::match(), functionObject::name(), functionObject::New(), Foam::nl, functionObject::read(), regionName, PtrList< T >::resize(), IOobject::scopedName(), PtrList< T >::set(), objectRegistry::sortedNames(), timeFunctionObject::time_, functionObject::type(), and WarningInFunction.

Here is the call graph for this function:

◆ execute()

bool execute ( )
virtual

Execute, currently does nothing.

Implements functionObject.

Definition at line 143 of file multiRegion.C.

References f().

Here is the call graph for this function:

◆ write()

bool write ( )
virtual

Write the multiRegion.

Implements functionObject.

Definition at line 156 of file multiRegion.C.

References f().

Here is the call graph for this function:

Member Data Documentation

◆ functions_

PtrList<functionObject> functions_
protected

List of cloned objects (1 per region)

Definition at line 132 of file multiRegion.H.

Referenced by multiRegion::read().


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