openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Public Member Functions | List of all members
SF::overlapping_layout< T > Class Template Reference

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_container.h>

Inheritance diagram for SF::overlapping_layout< T >:
Collaboration diagram for SF::overlapping_layout< T >:

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...
 
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...
 
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...
 
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...
 
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...
 

Detailed Description

template<class T>
class SF::overlapping_layout< T >

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 197 of file SF_container.h.

Constructor & Destructor Documentation

◆ overlapping_layout()

template<class T>
SF::overlapping_layout< T >::overlapping_layout ( )
inline

Non-parameterized constructor. Use assign() to initialize later.

Definition at line 618 of file SF_parallel_layout.h.

Member Function Documentation

◆ algebraic_layout()

template<class T>
const vector<T>& SF::overlapping_layout< T >::algebraic_layout ( ) const
inline

Getter function for the global algebraic node layout.

Returns
A vector holding the displacements between the local algebraic sizes.

Definition at line 675 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ algebraic_nodes()

template<class T>
const vector<T>& SF::overlapping_layout< T >::algebraic_nodes ( ) const
inline

Getter function for the local indices forming the local algebraic node set.

Returns
A vector holding local indices w.r.t. the DD domain.

Definition at line 665 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ assign()

template<class T>
void SF::overlapping_layout< T >::assign ( const vector< T > &  idx,
MPI_Comm  comm 
)
inline

Initialization function.

It generates the parallel layout from the overlapping sets global node indices forming the different local domains.

Parameters
idxVector of global indices forming the local DD domain. Usually the reference numbering should be used.
commThe MPI communicator for parallel communication.

Definition at line 630 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ interface()

template<class T>
const vector<T>& SF::overlapping_layout< T >::interface ( ) const
inline

Retrieve the local indices of the subdomain interfaces.

The local indices are with respect to the global index set "nod" used during initialization.

Returns
The interface indices.

Definition at line 655 of file SF_parallel_layout.h.

◆ layout()

template<class T>
const vector<T>& SF::overlapping_layout< T >::layout ( ) const
inline

Return the the overlapping layout.

Returns
A vector holding the displacements between the local overlapping sizes.

Definition at line 684 of file SF_parallel_layout.h.

◆ localize_algebraic()

template<class T>
T SF::overlapping_layout< T >::localize_algebraic ( const T  global_idx,
const vector< T > &  global_alg_nbr,
const int  rank 
)
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)

Parameters
global_idxThe global index to localize
global_alg_nbrThe numbering w.r.t. we localize
rankProcess rank
Returns
Either the local index, or -1 if the global index is not on the local partition

Definition at line 699 of file SF_parallel_layout.h.

◆ num_algebraic_idx()

template<class T>
size_t SF::overlapping_layout< T >::num_algebraic_idx ( ) const
inline

Retrieve the number of local algebraic indices.

Definition at line 725 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ num_global_idx()

template<class T>
size_t SF::overlapping_layout< T >::num_global_idx ( ) const
inline

Retrieve the global number of indices.

Definition at line 715 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ num_local_idx()

template<class T>
size_t SF::overlapping_layout< T >::num_local_idx ( ) const
inline

Retrieve the local number of indices.

Definition at line 720 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ reduce()

template<class T>
template<class V >
void SF::overlapping_layout< T >::reduce ( vector< V > &  ndat,
const char *  op 
) const
inline

Compute a reduction on overlapping data.

Template Parameters
VValue type. Usually int, double or float.
Parameters
ndatVector of parallel overlapping data.
opReduction operation string. Must be either "min", "max" or "sum".

Definition at line 739 of file SF_parallel_layout.h.

Here is the caller graph for this function:

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