The boundaryRegion persistent data saved as a Map<dictionary>. More...
#include <conversion/boundaryRegion.H>
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
{
BoundaryTypeWORD;
Label WORD;
}
...
)
Definition at line 71 of file boundaryRegion.H.
Inheritance diagram for boundaryRegion:
Collaboration diagram for boundaryRegion:Public Member Functions | |
| boundaryRegion () | |
| Construct null. | |
| boundaryRegion (const objectRegistry &, const word &name="boundaryRegion", const fileName &instance="constant") | |
| Construct read from registry, name. instance. | |
| ~boundaryRegion () | |
| Destructor. | |
| label | append (const dictionary &) |
| Append to the end, return index. | |
| label | findIndex (const word &name) const |
| Return index corresponding to patch 'name'. | |
| Map< word > | names () const |
| Return a Map of (id => name) | |
| Map< word > | names (const List< wordRe > &patterns) const |
| Return a Map of (id => names) selected by patterns. | |
| Map< word > | boundaryTypes () const |
| Return a Map of (id => type) | |
| word | boundaryType (const word &name) const |
| Return BoundaryType corresponding to patch 'name'. | |
| void | readDict (const objectRegistry &, const word &name="boundaryRegion", const fileName &instance="constant") |
| Read constant/boundaryRegion. | |
| void | writeDict (const objectRegistry &, const word &name="boundaryRegion", const fileName &instance="constant") const |
| Write constant/boundaryRegion for later reuse. | |
| void | operator= (const boundaryRegion &) |
| Assignment. | |
| void | operator= (const Map< dictionary > &) |
| Assign from Map<dictionary> | |
| void | rename (const dictionary &) |
| Rename regions. | |
Public Member Functions inherited from Map< dictionary > | |
| Map (const label size=128) | |
| Construct given initial size. | |
| Map (Istream &is) | |
| Construct from Istream. | |
| Map (const Map< dictionary > &map) | |
| Construct as copy. | |
| Map (const Xfer< Map< dictionary > > &map) | |
| Construct by transferring the parameter contents. | |
| Map (const Xfer< HashTable< dictionary, label, Hash< label > > > &map) | |
| Construct by transferring the parameter contents. | |
Public Member Functions inherited from HashTable< dictionary, label, Hash< label > > | |
| bool | set (const label &, const dictionary &newElmt) |
| Assign a new hashedEntry, overwriting existing entries. | |
| HashTable (const label size=128) | |
| Construct given initial table size. | |
| HashTable (Istream &, const label size=128) | |
| Construct from Istream. | |
| HashTable (const HashTable< dictionary, label, Hash< label > > &) | |
| Construct as copy. | |
| HashTable (const Xfer< HashTable< dictionary, label, Hash< label > > > &) | |
| Construct by transferring the parameter contents. | |
| ~HashTable () | |
| label | size () const |
| Return number of elements in table. | |
| bool | empty () const |
| Return true if the hash table is empty. | |
| bool | found (const label &) const |
| Return true if hashedEntry is found in table. | |
| iterator | find (const label &) |
| Find and return an iterator set at the hashedEntry. | |
| const_iterator | find (const label &) const |
| Find and return an const_iterator set at the hashedEntry. | |
| List< label > | toc () const |
| Return the table of contents. | |
| List< label > | sortedToc () const |
| Return the table of contents as a sorted list. | |
| Ostream & | printInfo (Ostream &) const |
| Print information. | |
| bool | insert (const label &, const dictionary &newElmt) |
| Insert a new hashedEntry. | |
| bool | erase (const iterator &) |
| Erase an hashedEntry specified by given iterator. | |
| bool | erase (const label &) |
| Erase an hashedEntry specified by given key if in table. | |
| label | erase (const UList< label > &) |
| Remove entries given by the listed keys from this HashTable. | |
| label | erase (const HashTable< AnyType, label, AnyHash > &) |
| Remove entries given by the given keys from this HashTable. | |
| void | resize (const label newSize) |
| Resize the hash table for efficiency. | |
| void | clear () |
| Clear all entries from table. | |
| void | clearStorage () |
| Clear the table entries and the table itself. | |
| void | transfer (HashTable< dictionary, label, Hash< label > > &) |
| Transfer the contents of the argument table into this table. | |
| Xfer< HashTable< dictionary, label, Hash< label > > > | xfer () |
| Transfer contents to the Xfer container. | |
| dictionary & | operator[] (const label &) |
| Find and return an hashedEntry. | |
| const dictionary & | operator[] (const label &) const |
| Find and return an hashedEntry. | |
| dictionary & | operator() (const label &) |
| Find and return an hashedEntry, create it null if not present. | |
| void | operator= (const HashTable< dictionary, label, Hash< label > > &) |
| Assignment. | |
| bool | operator== (const HashTable< dictionary, label, Hash< label > > &) const |
| Equality. Two hash tables are equal if all contents of first are. | |
| bool | operator!= (const HashTable< dictionary, label, Hash< label > > &) const |
| The opposite of the equality operation. Takes linear time. | |
| iterator | begin () |
| iterator set to the begining of the HashTable | |
| const_iterator | begin () const |
| const_iterator set to the beginning of the HashTable | |
| const iterator & | end () |
| iterator set to beyond the end of the HashTable | |
| const const_iterator & | end () const |
| const_iterator set to beyond the end of the HashTable | |
| const_iterator | cbegin () const |
| const_iterator set to the beginning of the HashTable | |
| const const_iterator & | cend () const |
| const_iterator set to beyond the end of the HashTable | |
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< dictionary, label, Hash< label > > | |
| typedef dictionary | value_type |
| Type of values the HashTable contains. | |
| typedef dictionary & | reference |
| Type that can be used for storing into HashTable::value_type. | |
| typedef const dictionary & | const_reference |
| Type that can be used for storing into constant. | |
| typedef label | size_type |
| The type that can represent the size of a HashTable. | |
| boundaryRegion | ( | ) |
Construct null.
Definition at line 33 of file boundaryRegion.C.
| 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.
| ~boundaryRegion | ( | ) |
Destructor.
Definition at line 54 of file boundaryRegion.C.
| Foam::label append | ( | const dictionary & | dict | ) |
Append to the end, return index.
Definition at line 60 of file boundaryRegion.C.
References forAllConstIter, and insert().
| 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.
| 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(), and Foam::name().
| Foam::Map< Foam::word > names | ( | const List< 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(), and Foam::name().
| Foam::Map< Foam::word > boundaryTypes | ( | ) | const |
Return a Map of (id => type)
Definition at line 122 of file boundaryRegion.C.
References forAllConstIter, and HashTable< T, label, Hash< label > >::insert().
| Foam::word boundaryType | ( | const word & | name | ) | const |
Return BoundaryType corresponding to patch 'name'.
Definition at line 158 of file boundaryRegion.C.
References Foam::findIndex().
| 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 clear(), Foam::endl(), IOobject::headerOk(), Foam::Info, IOobject::NO_WRITE, and IOobject::READ_IF_PRESENT.
| 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().
| void operator= | ( | const boundaryRegion & | rhs | ) |
Assignment.
Definition at line 240 of file boundaryRegion.C.
References HashTable< T, label, Hash< label > >::operator=().
| void operator= | ( | const Map< dictionary > & | rhs | ) |
Assign from Map<dictionary>
Definition at line 246 of file boundaryRegion.C.
References HashTable< T, label, Hash< label > >::operator=().
| 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 DLListBase::empty(), Foam::findIndex(), forAllConstIter, Foam::Info, HashTable< T, label, Hash< label > >::insert(), dictionary::lookup(), Foam::nl, and dictionary::set().