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

The base class for parallel layouts. More...

#include <SF_parallel_layout.h>

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

Public Member Functions

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

Protected Attributes

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::parallel_layout< T >

The base class for parallel layouts.

It provides the basic index localization and globalization functionality.

Template Parameters
TInteger type.

Definition at line 235 of file SF_parallel_layout.h.

Member Function Documentation

◆ assign()

template<class T>
void SF::parallel_layout< T >::assign ( const vector< T > &  idx)
inline

Assign a parallel distributed index set that defines the parallel layout.

Parameters
idxAn vector holding the global indices of the local domain.

Definition at line 359 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ globalize() [1/2]

template<class T>
void SF::parallel_layout< T >::globalize ( vector< T > &  lvec) const
inline

Globalize local indices.

Indices that cannot be mapped will be removed.

Parameters
lvecThe indices to globalize.
Precondition
lvec contains local indices.
Postcondition
lvec contains global indices.

Definition at line 254 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ globalize() [2/2]

template<class T>
T SF::parallel_layout< T >::globalize ( const T  lidx) const
inline

Globalize local indices.

Indices that cannot be mapped will be removed.

Parameters
lvecThe indices to globalize.
Precondition
lvec contains local indices.
Postcondition
lvec contains global indices.

Definition at line 276 of file SF_parallel_layout.h.

◆ localize() [1/3]

template<class T>
void SF::parallel_layout< T >::localize ( vector< T > &  gvec) const
inline

Localize global indices.

Indices that cannot be mapped will be removed.

Parameters
gvecThe indices to localize.
Precondition
gvec contains global indices.
Postcondition
gvec contains local indices.

Definition at line 297 of file SF_parallel_layout.h.

Here is the caller graph for this function:

◆ localize() [2/3]

template<class T>
template<class V >
void SF::parallel_layout< T >::localize ( vector< T > &  gidx,
vector< V > &  gdat 
) const
inline

Localize global indices and associated data.

Indices and data that cannot be mapped will be removed.

Template Parameters
VValue type. Can be anything with a proper '=' operator.
Parameters
gidxThe indices to localize.
gdatThe data to localize.
Precondition
gidx contains global indices and gdat the associated data.
Postcondition
gidx contains local indices and gdat the associated data.

Definition at line 326 of file SF_parallel_layout.h.

◆ localize() [3/3]

template<class T>
T SF::parallel_layout< T >::localize ( gidx) const
inline

Definition at line 345 of file SF_parallel_layout.h.

Member Data Documentation

◆ _g2l

template<class T>
hashmap::unordered_map<T, T> SF::parallel_layout< T >::_g2l
protected

The global-to-local map for the DD domain.

Definition at line 241 of file SF_parallel_layout.h.

◆ _l2g

template<class T>
vector<T> SF::parallel_layout< T >::_l2g
protected

The global indices of the local DD domain. Also serves as the local-to-global map.

Definition at line 239 of file SF_parallel_layout.h.


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