|
openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
|
The overlapping_layout class contains the algorithms related to managing overlapping parallel index sets, such as the indexing of the nodes, faces or edges of a distributed mesh. More...
#include <SF_parallel_layout.h>
Public Member Functions | |
| overlapping_layout () | |
| Non-parameterized constructor. Use assign() to initialize later. More... | |
| void | assign (const vector< T > &idx, MPI_Comm comm) |
| Initialization function. More... | |
| const vector< T > & | interface () const |
| Retrieve the local indices of the subdomain interfaces. More... | |
| const vector< T > & | algebraic_nodes () const |
| Getter function for the local indices forming the local algebraic node set. More... | |
| void | permute_algebraic_nodes (const vector< T > &perm_nod) |
| Reorder the local algebraic node set. More... | |
| const vector< T > & | algebraic_layout () const |
| Getter function for the global algebraic node layout. More... | |
| const vector< T > & | layout () const |
| Return the the overlapping layout. More... | |
| T | localize_algebraic (const T global_idx, const vector< T > &global_alg_nbr, const int rank) |
| map a global (REF_NBR, reference numbering) index to local algebraic (non-overlapping) indexing w.r.t. the provided global_alg_nbr numbering (usually PETSC_NBR, PETSc numbering) More... | |
| size_t | num_global_idx () const |
| Retrieve the global number of indices. More... | |
| size_t | num_local_idx () const |
| Retrieve the local number of indices. More... | |
| size_t | num_algebraic_idx () const |
| Retrieve the number of local algebraic indices. More... | |
| template<class V > | |
| void | reduce (vector< V > &ndat, const char *op) const |
| Compute a reduction on overlapping data. More... | |
Public Member Functions inherited from SF::parallel_layout< T > | |
| void | globalize (vector< T > &lvec) const |
| Globalize local indices. More... | |
| T | globalize (const T lidx) const |
| Globalize local indices. More... | |
| void | localize (vector< T > &gvec) const |
| Localize global indices. More... | |
| template<class V > | |
| void | localize (vector< T > &gidx, vector< V > &gdat) const |
| Localize global indices and associated data. More... | |
| T | localize (T gidx) const |
| void | assign (const vector< T > &idx) |
| Assign a parallel distributed index set that defines the parallel layout. More... | |
Additional Inherited Members | |
Protected Attributes inherited from SF::parallel_layout< T > | |
| vector< T > | _l2g |
| The global indices of the local DD domain. Also serves as the local-to-global map. More... | |
| hashmap::unordered_map< T, T > | _g2l |
| The global-to-local map for the DD domain. More... | |
The overlapping_layout class contains the algorithms related to managing overlapping parallel index sets, such as the indexing of the nodes, faces or edges of a distributed mesh.
Definition at line 363 of file SF_parallel_layout.h.
|
inline |
Non-parameterized constructor. Use assign() to initialize later.
Definition at line 607 of file SF_parallel_layout.h.
|
inline |
Getter function for the global algebraic node layout.
Definition at line 685 of file SF_parallel_layout.h.
|
inline |
Getter function for the local indices forming the local algebraic node set.
The list is ascending by default, but permute_algebraic_nodes() may reorder it to express an alternative algebraic numbering, so callers must not rely on it being sorted. What always holds is that position i corresponds to the i-th local slot of the PETSc vectors built from this layout.
Definition at line 659 of file SF_parallel_layout.h.
|
inline |
Initialization function.
It generates the parallel layout from the overlapping sets global node indices forming the different local domains.
| idx | Vector of global indices forming the local DD domain. Usually the reference numbering should be used. |
| comm | The MPI communicator for parallel communication. |
Definition at line 619 of file SF_parallel_layout.h.
|
inline |
Retrieve the local indices of the subdomain interfaces.
The local indices are with respect to the global index set "nod" used during initialization.
Definition at line 644 of file SF_parallel_layout.h.
|
inline |
Return the the overlapping layout.
Definition at line 694 of file SF_parallel_layout.h.
|
inline |
map a global (REF_NBR, reference numbering) index to local algebraic (non-overlapping) indexing w.r.t. the provided global_alg_nbr numbering (usually PETSC_NBR, PETSc numbering)
| global_idx | The global index to localize |
| global_alg_nbr | The numbering w.r.t. we localize |
| rank | Process rank |
Definition at line 709 of file SF_parallel_layout.h.
|
inline |
Retrieve the number of local algebraic indices.
Definition at line 735 of file SF_parallel_layout.h.
|
inline |
Retrieve the global number of indices.
Definition at line 725 of file SF_parallel_layout.h.
|
inline |
Retrieve the local number of indices.
Definition at line 730 of file SF_parallel_layout.h.
|
inline |
Reorder the local algebraic node set.
An alternative algebraic ordering is expressed by permuting this list rather than by handing out permuted indices, because the position a node has here is what addresses the local PETSc arrays. Keeping the two in step is what lets a renumbering stay invisible to everything that consumes algebraic_nodes().
| perm_nod | The same node set in the desired order. |
Definition at line 674 of file SF_parallel_layout.h.
|
inline |
Compute a reduction on overlapping data.
| V | Value type. Usually int, double or float. |
| ndat | Vector of parallel overlapping data. |
| op | Reduction operation string. Must be either "min", "max" or "sum". |
Definition at line 749 of file SF_parallel_layout.h.