Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
domain_indirect_rep< distributed >

Detailed Description

Definition at line 229 of file domain_indirect.h.

+ Inheritance diagram for domain_indirect_rep< distributed >:

Public Types

typedef domain_indirect_base_rep< distributedbase
 
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 domain_indirect_base_rep< distributed >
typedef disarray< geo_element_indirect, distributedbase
 
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 Types inherited from disarray< T, M, A >
typedef M memory_type
 
typedef disarray_rep< T, sequential, Arep
 
typedef rep::base::size_type size_type
 
typedef rep::base::iterator iterator
 
typedef rep::base::const_iterator const_iterator
 

Public Member Functions

 domain_indirect_rep ()
 
template<class T >
 domain_indirect_rep (const geo_abstract_rep< T, distributed > &omega, const std::string &name, size_type map_dim, const communicator &comm, const std::vector< size_type > &ie_list)
 
template<class T >
void init_ios (const geo_abstract_rep< T, distributed > &omega)
 
template<class T >
void build_union (const geo_basic< T, distributed > &omega, const domain_indirect_rep< distributed > &a, const domain_indirect_rep< distributed > &b)
 
size_type size () const
 
size_type dis_size () const
 
const geo_element_indirectoige (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
 
bool is_broken () const
 
void set_broken (bool b)
 
const distributorini_ownership () const
 
size_type ioige2ini_dis_ioige (size_type ioige) const
 
size_type ini_ioige2dis_ioige (size_type ini_ioige) const
 
template<class U >
idiststreamget (idiststream &ips, const geo_rep< U, distributed > &omega)
 domain_indirect_rep<mpi> i/o in format version 2
 
template<class U >
odiststreamput (odiststream &ops, const geo_rep< U, distributed > &omega) const
 
- Public Member Functions inherited from 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)
 
void build_from_list (const std::string &name, size_type map_dim, const communicator &comm, const std::vector< size_type > &ie_list)
 
void build_union (const domain_indirect_base_rep< distributed > &a, const domain_indirect_base_rep< distributed > &b)
 
size_type size () const
 
size_type dis_size () const
 
const_iterator_ioige ioige_begin () const
 
iterator_ioige ioige_begin ()
 
const_iterator_ioige ioige_end () const
 
iterator_ioige ioige_end ()
 
const geo_element_indirectoige (size_type ioige) const
 
std::string name () const
 
size_type map_dimension () const
 
void set_name (std::string name)
 
void set_map_dimension (size_type map_dim)
 
bool is_broken () const
 
void set_broken (bool b)
 

Protected Attributes

disarray< size_type, distributed_ioige2ini_dis_ioige
 
disarray< size_type, distributed_ini_ioige2dis_ioige
 
- Protected Attributes inherited from domain_indirect_base_rep< distributed >
std::string _name
 
size_type _map_dim
 
bool _is_broken
 

Member Typedef Documentation

◆ base

Definition at line 234 of file domain_indirect.h.

◆ size_type

Definition at line 235 of file domain_indirect.h.

◆ iterator_ioige

Definition at line 236 of file domain_indirect.h.

◆ const_iterator_ioige

◆ orientation_type

Definition at line 238 of file domain_indirect.h.

Constructor & Destructor Documentation

◆ domain_indirect_rep() [1/2]

Definition at line 297 of file domain_indirect.h.

◆ domain_indirect_rep() [2/2]

template<class T >
domain_indirect_rep ( const geo_abstract_rep< T, distributed > &  omega,
const std::string &  name,
size_type  map_dim,
const communicator comm,
const std::vector< size_type > &  ie_list 
)

Definition at line 305 of file domain_indirect.h.

Member Function Documentation

◆ init_ios()

template<class T >
void init_ios ( const geo_abstract_rep< T, distributed > &  omega)

Definition at line 35 of file domain_indirect_mpi.cc.

◆ build_union()

template<class T >
void build_union ( const geo_basic< T, distributed > &  omega,
const domain_indirect_rep< distributed > &  a,
const domain_indirect_rep< distributed > &  b 
)

Definition at line 321 of file domain_indirect.h.

◆ size()

size_type size ( ) const

Definition at line 264 of file domain_indirect.h.

◆ dis_size()

size_type dis_size ( ) const

Definition at line 265 of file domain_indirect.h.

◆ oige()

const geo_element_indirect & oige ( size_type  ioige) const

Definition at line 267 of file domain_indirect.h.

◆ set_name()

void set_name ( std::string  name)

Definition at line 270 of file domain_indirect.h.

◆ set_map_dimension()

void set_map_dimension ( size_type  map_dim)

Definition at line 271 of file domain_indirect.h.

◆ name()

std::string name ( ) const

Definition at line 272 of file domain_indirect.h.

◆ map_dimension()

size_type map_dimension ( ) const

Definition at line 273 of file domain_indirect.h.

◆ is_broken()

bool is_broken ( ) const

Definition at line 274 of file domain_indirect.h.

◆ set_broken()

void set_broken ( bool  b)

Definition at line 275 of file domain_indirect.h.

◆ ini_ownership()

const distributor & ini_ownership ( ) const

Definition at line 279 of file domain_indirect.h.

◆ ioige2ini_dis_ioige()

size_type ioige2ini_dis_ioige ( size_type  ioige) const

Definition at line 280 of file domain_indirect.h.

◆ ini_ioige2dis_ioige()

size_type ini_ioige2dis_ioige ( size_type  ini_ioige) const

Definition at line 281 of file domain_indirect.h.

◆ get()

template<class U >
template idiststream & get ( idiststream ips,
const geo_rep< U, distributed > &  omega 
)

domain_indirect_rep<mpi> i/o in format version 2

Implementation notes:

The domain is implemented as a disarray 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 a disarray 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 disarray 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 disarray of oige pairs that constitutes the domain contains "dis_noige" entries: this disarray 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 disarray 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 disarray of pairs, these pairs have been reordered, i.e. renumbered. The permutation and inverse permutation disarrays 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" disarray elements are reordered and re-distributed in a new disarray 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 disarray 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.

A disarray 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 disarray 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 disarrays are denoted by: ios_ioige2dis_ioige, according to ios_ioige_ownership ioige2ios_dis_ioige, according to ioige_ownership

The "oige" disarray is stored directly in the class domain: domain is implemented as a derived class of the disarray class which represents "oige". Thus "oige" is unnamed 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 disarrays:

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 193 of file domain_indirect_mpi.cc.

◆ put()

template<class U >
template odiststream & put ( odiststream ops,
const geo_rep< U, distributed > &  omega 
) const

Definition at line 296 of file domain_indirect_mpi.cc.

Member Data Documentation

◆ _ioige2ini_dis_ioige

disarray<size_type,distributed> _ioige2ini_dis_ioige
protected

Definition at line 293 of file domain_indirect.h.

◆ _ini_ioige2dis_ioige

disarray<size_type,distributed> _ini_ioige2dis_ioige
protected

Definition at line 294 of file domain_indirect.h.


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