boundaryRegion Class Reference

The boundaryRegion persistent data saved as a Map<dictionary>. More...

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

Public Member Functions

 boundaryRegion ()
 Construct null. More...
 
 boundaryRegion (const objectRegistry &, const word &name="boundaryRegion", const fileName &instance="constant")
 Construct read from registry, name. instance. More...
 
 ~boundaryRegion ()=default
 Destructor. More...
 
label append (const dictionary &)
 Append to the end, return index. More...
 
label findIndex (const word &name) const
 Return index corresponding to patch 'name'. More...
 
Map< wordnames () const
 Return a Map of (id => name) More...
 
Map< wordnames (const wordRes &patterns) const
 Return a Map of (id => names) selected by patterns. More...
 
Map< wordboundaryTypes () const
 Return a Map of (id => type) More...
 
word boundaryType (const word &name) const
 Return BoundaryType corresponding to patch 'name'. More...
 
void readDict (const objectRegistry &, const word &name="boundaryRegion", const fileName &instance="constant")
 Read constant/boundaryRegion. More...
 
void writeDict (const objectRegistry &, const word &name="boundaryRegion", const fileName &instance="constant") const
 Write constant/boundaryRegion for later reuse. More...
 
void operator= (const boundaryRegion &)
 Assignment. More...
 
void operator= (const Map< dictionary > &)
 Assign from Map<dictionary> More...
 
void rename (const dictionary &)
 Rename regions. More...
 
- Public Member Functions inherited from Map< dictionary >
 Map ()
 Default construct with default table capacity. More...
 
 Map (const label size)
 Construct with given initial table capacity. More...
 
 Map (Istream &is)
 Construct from Istream with default table capacity. More...
 
 Map (const this_type &map)
 Copy construct. More...
 
 Map (this_type &&map)
 Move construct. More...
 
 Map (std::initializer_list< std::pair< label, dictionary >> map)
 Construct from an initializer list. More...
 
void operator= (const this_type &rhs)
 Copy assignment. More...
 
void operator= (this_type &&rhs)
 Move assignment. More...
 
void operator= (const this_type &rhs)
 Copy assign. More...
 
void operator= (std::initializer_list< std::pair< Key, dictionary >> rhs)
 Copy assign from an initializer list. More...
 
void operator= (this_type &&rhs)
 Move assign. More...
 

Additional Inherited Members

- Public Types inherited from Map< dictionary >
typedef Map< dictionarythis_type
 The template instance used for this Map. More...
 
typedef HashTable< dictionary, label, Hash< label > > parent_type
 The template instance used for the parent HashTable. More...
 
using iterator = typename parent_type::iterator
 
using const_iterator = typename parent_type::const_iterator
 

Detailed Description

The boundaryRegion persistent data saved as a Map<dictionary>.

The meshReader supports boundaryRegion information.

The constant/boundaryRegion file is an IOMap<dictionary> that is used to save the information persistently. It contains the boundaryRegion information of the following form:

    (
        INT
        {
            BoundaryType    WORD;
            Label           WORD;
        }
        ...
    )
Source files

Definition at line 72 of file boundaryRegion.H.

Constructor & Destructor Documentation

◆ boundaryRegion() [1/2]

Construct null.

Definition at line 35 of file boundaryRegion.C.

◆ boundaryRegion() [2/2]

boundaryRegion ( const objectRegistry registry,
const word name = "boundaryRegion",
const fileName instance = "constant" 
)

Construct read from registry, name. instance.

Definition at line 42 of file boundaryRegion.C.

References Foam::name().

Here is the call graph for this function:

◆ ~boundaryRegion()

~boundaryRegion ( )
default

Destructor.

Member Function Documentation

◆ append()

Foam::label append ( const dictionary dict)

Append to the end, return index.

Definition at line 56 of file boundaryRegion.C.

References dict, forAllConstIters(), and insert().

Here is the call graph for this function:

◆ findIndex()

Foam::label findIndex ( const word name) const

Return index corresponding to patch 'name'.

returns -1 if not found

Definition at line 135 of file boundaryRegion.C.

References forAllConstIters(), Foam::name(), and word::null.

Here is the call graph for this function:

◆ names() [1/2]

Foam::Map< Foam::word > names ( ) const

Return a Map of (id => name)

Definition at line 72 of file boundaryRegion.C.

References forAllConstIters(), and Foam::name().

Here is the call graph for this function:

◆ names() [2/2]

Foam::Map< Foam::word > names ( const wordRes patterns) const

Return a Map of (id => names) selected by patterns.

Definition at line 94 of file boundaryRegion.C.

References forAllConstIters(), wordRes::match(), and Foam::name().

Here is the call graph for this function:

◆ boundaryTypes()

Foam::Map< Foam::word > boundaryTypes ( ) const

Return a Map of (id => type)

Definition at line 118 of file boundaryRegion.C.

References forAllConstIters().

Here is the call graph for this function:

◆ boundaryType()

Foam::word boundaryType ( const word name) const

Return BoundaryType corresponding to patch 'name'.

Definition at line 154 of file boundaryRegion.C.

References Foam::findIndex().

Here is the call graph for this function:

◆ readDict()

void readDict ( const objectRegistry registry,
const word name = "boundaryRegion",
const fileName instance = "constant" 
)

Read constant/boundaryRegion.

Definition at line 169 of file boundaryRegion.C.

References clear(), Foam::endl(), regIOobject::headerOk(), Foam::Info, Foam::name(), IOobject::NO_WRITE, and IOobject::READ_IF_PRESENT.

Here is the call graph for this function:

◆ writeDict()

void writeDict ( const objectRegistry registry,
const word name = "boundaryRegion",
const fileName instance = "constant" 
) const

Write constant/boundaryRegion for later reuse.

Definition at line 203 of file boundaryRegion.C.

References Foam::endl(), Foam::Info, Foam::name(), IOobject::name(), IOobject::NO_READ, IOobject::NO_WRITE, IOobject::note(), IOobject::objectPath(), os(), and IOobject::writeHeader().

Here is the call graph for this function:

◆ operator=() [1/2]

void operator= ( const boundaryRegion rhs)

Assignment.

Definition at line 236 of file boundaryRegion.C.

References Map< T >::operator=().

Here is the call graph for this function:

◆ operator=() [2/2]

void operator= ( const Map< dictionary > &  rhs)

Assign from Map<dictionary>

Definition at line 242 of file boundaryRegion.C.

References Map< T >::operator=().

Here is the call graph for this function:

◆ rename()

void rename ( const dictionary mapDict)

Rename regions.

each dictionary entry is a single word:

    newPatchName    originalName;

Definition at line 250 of file boundaryRegion.C.

References dict, Foam::findIndex(), forAllConstIters(), dictionary::get(), Foam::Info, Foam::nl, and dictionary::set().

Here is the call graph for this function:

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