boundaryRegion Class Reference

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

Inheritance diagram for boundaryRegion:
Collaboration diagram for boundaryRegion:

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 (const boundaryRegion &)=delete
 Disallow default bitwise copy construction. More...
 
 ~boundaryRegion ()
 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 UList< wordRe > &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 (const label size=128)
 Construct given initial size. More...
 
 Map (Istream &is)
 Construct from Istream. More...
 
 Map (const Map< dictionary > &map)
 Copy constructor. More...
 
 Map (Map< dictionary > &&map)
 Move constructor. More...
 
 Map (HashTable< dictionary, label, Hash< label >> &&map)
 Move constructor. More...
 
 Map (std::initializer_list< Tuple2< label, dictionary >> map)
 Construct from an initialiser list. More...
 
void operator= (const Map< dictionary > &map)
 
void operator= (Map< dictionary > &&map)
 
- Public Member Functions inherited from HashTable< T, Key, Hash >
 HashTable (const label size=128)
 Construct given initial table size. More...
 
 HashTable (Istream &, const label size=128)
 Construct from Istream. More...
 
 HashTable (const HashTable< T, Key, Hash > &)
 Copy constructor. More...
 
 HashTable (HashTable< T, Key, Hash > &&)
 Move constructor. More...
 
 HashTable (std::initializer_list< Tuple2< Key, T >>)
 Construct from an initialiser list. More...
 
 ~HashTable ()
 Destructor. More...
 
label capacity () const
 The size of the underlying table. More...
 
label size () const
 Return number of elements in table. More...
 
bool empty () const
 Return true if the hash table is empty. More...
 
bool found (const Key &) const
 Return true if hashedEntry is found in table. More...
 
iterator find (const Key &)
 Find and return an iterator set at the hashedEntry. More...
 
const_iterator find (const Key &) const
 Find and return an const_iterator set at the hashedEntry. More...
 
List< Key > toc () const
 Return the table of contents. More...
 
List< Key > sortedToc () const
 Return the table of contents as a sorted list. More...
 
OstreamprintInfo (Ostream &) const
 Print information. More...
 
bool insert (const Key &, const T &newElmt)
 Insert a new hashedEntry. More...
 
bool set (const Key &, const T &newElmt)
 Assign a new hashedEntry, overwriting existing entries. More...
 
bool erase (const iterator &)
 Erase a hashedEntry specified by given iterator. More...
 
bool erase (const Key &)
 Erase a hashedEntry specified by the given key. More...
 
label erase (const UList< Key > &)
 Remove entries given by the listed keys from this HashTable. More...
 
template<class AnyType , class AnyHash >
label erase (const HashTable< AnyType, Key, AnyHash > &)
 Remove entries given by the given keys from this HashTable. More...
 
void resize (const label newSize)
 Resize the hash table for efficiency. More...
 
void clear ()
 Clear all entries from table. More...
 
void clearStorage ()
 Clear the table entries and the table itself. More...
 
void shrink ()
 Shrink the allocated table to approx. twice number of elements. More...
 
void transfer (HashTable< T, Key, Hash > &)
 Transfer the contents of the argument table into this table. More...
 
Toperator[] (const Key &)
 Find and return a hashedEntry. More...
 
const Toperator[] (const Key &) const
 Find and return a hashedEntry. More...
 
Toperator() (const Key &)
 Find and return a hashedEntry, create it null if not present. More...
 
void operator= (const HashTable< T, Key, Hash > &)
 Assignment operator. More...
 
void operator= (HashTable< T, Key, Hash > &&)
 Move assignment operator. More...
 
void operator= (std::initializer_list< Tuple2< Key, T >>)
 Assignment to an initialiser list. More...
 
bool operator== (const HashTable< T, Key, Hash > &) const
 Equality. Hash tables are equal if the keys and values are equal. More...
 
bool operator!= (const HashTable< T, Key, Hash > &) const
 The opposite of the equality operation. Takes linear time. More...
 
iterator begin ()
 Iterator set to the beginning of the HashTable. More...
 
const_iterator cbegin () const
 const_iterator set to the beginning of the HashTable More...
 
const_iterator begin () const
 const_iterator set to the beginning of the HashTable More...
 
template<class AnyType , class AnyHash >
Foam::label erase (const HashTable< AnyType, Key, AnyHash > &rhs)
 
- Public Member Functions inherited from HashTableCore
 HashTableCore ()
 Construct null. More...
 
 ClassName ("HashTable")
 Define template name and debug. More...
 

Additional Inherited Members

- Public Types inherited from Map< dictionary >
typedef HashTable< dictionary, label, Hash< label > >::iterator iterator
 
typedef HashTable< dictionary, label, Hash< label > >::const_iterator const_iterator
 
- Public Types inherited from HashTable< T, Key, Hash >
typedef T value_type
 Type of values the HashTable contains. More...
 
typedef Treference
 Type that can be used for storing into HashTable::value_type. More...
 
typedef const Tconst_reference
 Type that can be used for storing into constant. More...
 
typedef label size_type
 The type that can represent the size of a HashTable. More...
 
- Static Public Member Functions inherited from HashTableCore
static label canonicalSize (const label)
 Return a canonical (power-of-two) size. More...
 
static iteratorEnd cend ()
 iteratorEnd set to beyond the end of any HashTable More...
 
static iteratorEnd end ()
 iteratorEnd set to beyond the end of any HashTable More...
 
- Static Public Attributes inherited from HashTableCore
static const label maxTableSize
 Maximum allowable table size. More...
 

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 70 of file boundaryRegion.H.

Constructor & Destructor Documentation

◆ boundaryRegion() [1/3]

Construct null.

Definition at line 33 of file boundaryRegion.C.

◆ boundaryRegion() [2/3]

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

Construct read from registry, name. instance.

Definition at line 40 of file boundaryRegion.C.

References boundaryRegion::readDict().

Here is the call graph for this function:

◆ boundaryRegion() [3/3]

boundaryRegion ( const boundaryRegion )
delete

Disallow default bitwise copy construction.

◆ ~boundaryRegion()

Destructor.

Definition at line 54 of file boundaryRegion.C.

Member Function Documentation

◆ append()

Foam::label append ( const dictionary dict)

Append to the end, return index.

Definition at line 60 of file boundaryRegion.C.

References forAllConstIter(), and HashTable< T, Key, Hash >::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 139 of file boundaryRegion.C.

References forAllConstIter(), and word::null.

Referenced by boundaryRegion::boundaryType(), and boundaryRegion::rename().

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

◆ names() [1/2]

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

Return a Map of (id => name)

Definition at line 76 of file boundaryRegion.C.

References forAllConstIter(), HashTable< T, label, Hash< label > >::insert(), lookup(), and Foam::name().

Here is the call graph for this function:

◆ names() [2/2]

Foam::Map< Foam::word > names ( const UList< wordRe > &  patterns) const

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

Definition at line 98 of file boundaryRegion.C.

References Foam::findStrings(), forAllConstIter(), HashTable< T, label, Hash< label > >::insert(), lookup(), 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 122 of file boundaryRegion.C.

References forAllConstIter(), HashTable< T, label, Hash< label > >::insert(), and lookup().

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 158 of file boundaryRegion.C.

References boundaryRegion::findIndex(), HashTable< T, Key, Hash >::operator[](), and boundaryRegion::readDict().

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 173 of file boundaryRegion.C.

References HashTable< T, Key, Hash >::clear(), Foam::endl(), regIOobject::headerOk(), Foam::Info, IOobject::NO_WRITE, IOobject::READ_IF_PRESENT, and boundaryRegion::writeDict().

Referenced by boundaryRegion::boundaryRegion(), boundaryRegion::boundaryType(), STARCD::readAux(), and STARCD::STARCD().

Here is the call graph for this function:
Here is the caller 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 207 of file boundaryRegion.C.

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

Referenced by boundaryRegion::readDict().

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

◆ operator=() [1/2]

void operator= ( const boundaryRegion rhs)

Assignment.

Definition at line 240 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 246 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 254 of file boundaryRegion.C.

References dict, boundaryRegion::findIndex(), forAllConstIter(), Foam::Info, HashTable< T, label, Hash< label > >::insert(), dictionary::lookup(), Foam::nl, HashTable< T, Key, Hash >::operator[](), and dictionary::set().

Here is the call graph for this function:

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