|
rheolef
6.3
|
#include <domain_indirect.h>


Public Types | |
| typedef domain_indirect_base_rep < distributed > | base |
| typedef base::size_type | size_type |
| typedef base::iterator_ioige | iterator_ioige |
| typedef base::const_iterator_ioige | const_iterator_ioige |
| typedef base::orientation_type | orientation_type |
Public Types inherited from rheolef::domain_indirect_base_rep< distributed > | |
| typedef array < geo_element_indirect, distributed > | base |
| typedef geo_element_indirect::size_type | size_type |
| typedef geo_element_indirect::orientation_type | orientation_type |
| typedef base::iterator | iterator_ioige |
| typedef base::const_iterator | const_iterator_ioige |
Public Member Functions | |
| domain_indirect_rep () | |
| template<class T > | |
| domain_indirect_rep (const geo_basic< T, distributed > &omega, const std::string &name, size_type map_dim, const communicator &comm, const std::vector< size_type > &ie_list) | |
| size_type | size () const |
| size_type | dis_size () const |
| const geo_element_indirect & | oige (size_type ioige) const |
| void | set_name (std::string name) |
| void | set_map_dimension (size_type map_dim) |
| std::string | name () const |
| size_type | map_dimension () const |
| const distributor & | ini_ownership () const |
| size_type | ioige2ini_dis_ioige (size_type ioige) const |
| size_type | ini_ioige2dis_ioige (size_type ini_ioige) const |
| template<class U > | |
| idiststream & | get (idiststream &ips, const geo_rep< U, distributed > &omega) |
| Implementation notes: | |
| template<class U > | |
| odiststream & | put (odiststream &ops, const geo_rep< U, distributed > &omega) const |
Public Member Functions inherited from rheolef::domain_indirect_base_rep< distributed > | |
| domain_indirect_base_rep () | |
| domain_indirect_base_rep (const std::string &name, size_type map_dim, const communicator &comm, const std::vector< size_type > &ie_list) | |
| void | resize (size_type n) |
| const_iterator_ioige | ioige_begin () const |
| iterator_ioige | ioige_begin () |
| const_iterator_ioige | ioige_end () const |
| iterator_ioige | ioige_end () |
Protected Attributes | |
| array< size_type, distributed > | _ioige2ini_dis_ioige |
| array< size_type, distributed > | _ini_ioige2dis_ioige |
Protected Attributes inherited from rheolef::domain_indirect_base_rep< distributed > | |
| std::string | _name |
| size_type | _map_dim |
Friends | |
| class | geo_rep |
Additional Inherited Members | |
Public Attributes inherited from std::array< T > | |
| T | elements |
| STL member. | |
Definition at line 122 of file domain_indirect.h.
Definition at line 126 of file domain_indirect.h.
Definition at line 127 of file domain_indirect.h.
Definition at line 128 of file domain_indirect.h.
| typedef base::const_iterator_ioige rheolef::domain_indirect_rep< distributed >::const_iterator_ioige |
Definition at line 129 of file domain_indirect.h.
Definition at line 130 of file domain_indirect.h.
|
inline |
Definition at line 172 of file domain_indirect.h.
| rheolef::domain_indirect_rep< distributed >::domain_indirect_rep | ( | const geo_basic< T, distributed > & | omega, |
| const std::string & | name, | ||
| size_type | map_dim, | ||
| const communicator & | comm, | ||
| const std::vector< size_type > & | ie_list | ||
| ) |
Definition at line 11 of file domain_indirect_mpi.cc.
|
inline |
Reimplemented from rheolef::domain_indirect_base_rep< distributed >.
Definition at line 143 of file domain_indirect.h.
|
inline |
Reimplemented from rheolef::domain_indirect_base_rep< distributed >.
Definition at line 144 of file domain_indirect.h.
|
inline |
Reimplemented from rheolef::domain_indirect_base_rep< distributed >.
Definition at line 146 of file domain_indirect.h.
|
inline |
Reimplemented from rheolef::domain_indirect_base_rep< distributed >.
Definition at line 149 of file domain_indirect.h.
|
inline |
Reimplemented from rheolef::domain_indirect_base_rep< distributed >.
Definition at line 150 of file domain_indirect.h.
|
inline |
Reimplemented from rheolef::domain_indirect_base_rep< distributed >.
Definition at line 151 of file domain_indirect.h.
|
inline |
Reimplemented from rheolef::domain_indirect_base_rep< distributed >.
Definition at line 152 of file domain_indirect.h.
|
inline |
Definition at line 155 of file domain_indirect.h.
|
inline |
Definition at line 156 of file domain_indirect.h.
|
inline |
Definition at line 157 of file domain_indirect.h.
| template idiststream & rheolef::domain_indirect_rep< distributed >::get | ( | idiststream & | ips, |
| const geo_rep< U, distributed > & | omega | ||
| ) |
Implementation notes:
The domain is implemented as an array of elements, e.g. edges or faces, but it could also be vertices or volume elements, for volumic domains. Says a domain of "geo_element" for simplicity. The orientation is important for boundaries or interfaces and the direction of the normal has a sense in domains. It is described as an array of a pair: an orientation and an index of geo_element, denoted in brief as "oige". The index part of the pair, in distributed environment, is denoted as "dis_ige". An index that navigates in this array of pair is denoted as ioige, a short name for an index of (a pair of) orientation and index of a geo_element.
1) Initial numbering ("ini")
The array of oige pairs that constitutes the domain contains "dis_noige" entries: this array is denoted as "ini_oige". Its distributor is denoted as ini_ioige_ownership, and constructed simply from dis_noige and the communicator obtained from the geometry omega. ini_dis_ige = ini_oige[ini_ioige].index
2) First renumbering ("ios")
Indexes of geo_element (the dis_ige part of the pair oige), that are read from the input file, may be changed to a new numbering: the geo_elements has been renumbered after the partition of the geometry. The new geo_element numbering is also used for computations, see e.g. the "space" class. The initial numbering is refered in the geometry omega as, e.g. ios_dis_iedg or ios_dis_ifac, says here ios_dis_ige. The new side numbering is obtained by: dis_ige = omega.ios_ige2dis_ige (ios_ige) There is a first drawback in distributed environment: this call is valid when ios_ige is local to the current processor, while only the global ios_dis_ige index is valid. The ios_ige are distributed according to ios_ige_ownership (e.g. ios_edge_ownership or ios_face_ownership), as specified in the geometry omega. Thus, the array of osig pairs may be fisrt re-distributed from ini_ioige_ownership to another distributor, denoted as ios_ioige_ownership, so that the index part of the pair matches the geo_element ios_ige_ownership distribution. After redistribution of the array of pairs, these pairs have been reordered, i.e. renumbered. The permutation and inverse permutation arrays are denoted by: ini_ioige2ios_dis_ioige, according to ini_ioige_ownership ios_ioige2ini_dis_ioige, according to ios_ioige_ownership Also, the initial "ini_oige" array elements are reordered and re-distributed in a new array denoted as "ios_oige". The index of geo_element part of an element writes: ios_dis_ige = ios_oige [ios_ioige].index It can be converted into the local geo_element numbering as "ios_ige" and is then suitable for the obtention of the new geo_element numbering used for computations dis_ige = omega.ios_ige2dis_ige (ios_ige)
3) Second renumbering (no prefix)
The dis_ige index obtained by this way refers to a geo_element that is not owned in general by the current processor. So, the array of pairs may be a second time redistributed accordingly to the renumbered geo_element, i.e. the "ige_ownership" distributor (e.g. edge_ownership or face_ownership), as specified by the geometry omega.
An array of pairs, containing the orientation and the new geo_element index "dis_ige" is created and denoted as "tmp_oige" : tmp_oige[ios_ioige] = pair(orient, dis_ige) Notice that this array is based on the ios_ige_ownership distributor. A new distribution follows the distribution of geo_elements and is denoted as "oige": oige[ioige] = pair(orient,dis_ige) such that the locally owned part of oige contains indexes of geo_elements that are also locally owned by the geometry. The permutation and inverse permutation arrays are denoted by: ios_ioige2dis_ioige, according to ios_ioige_ownership ioige2ios_dis_ioige, according to ioige_ownership
The "oige" array is stored directly in the class domain: domain is implemented as a derived class of the array class which represents "oige". Thus "oige" is unamed in the domain class.
4) Back to "ini" renumbering
In order to write domains into files with the initial ordering and indexes of geo_element, we also build the direct permutation and inverse permutation arrays:
for (ios_ioige=0..) { ini_dis_ioige = ios_ioige2ini_dis_ioige [ios_ioige] dis_ioige = ios_ioige2dis_ioige [ios_ioige] ini_ioige2dis_ioige.dis_entry (ini_dis_ioige) = dis_ioige ioige2ini_dis_ioige.dis_entry (dis_ioige = ini_dis_ioige } ioige2ini_dis_ioige.dis_entry_assembly() ini_ioige2dis_ioige.dis_entry_assembly()
5) Output domains
for (ioige=0...) ini_dis_ioige = ioige2ini_dis_ioige [ioige] orient = oige [ioige].orient ige = oige [ioige].index ios_dis_ige = omega.ige2ios_dis_ige (ige) ini_oige.dis_entry (ini_dis_ioige) = pair(orient, ios_dis_ige) } ini_oige.dis_entry_assembly ini_oige.put
Definition at line 161 of file domain_indirect_mpi.cc.
| template odiststream & rheolef::domain_indirect_rep< distributed >::put | ( | odiststream & | ops, |
| const geo_rep< U, distributed > & | omega | ||
| ) | const |
Definition at line 244 of file domain_indirect_mpi.cc.
|
friend |
Definition at line 167 of file domain_indirect.h.
|
protected |
Definition at line 168 of file domain_indirect.h.
|
protected |
Definition at line 169 of file domain_indirect.h.