LifeV
BlockEpetra_Map Class Reference

This class handles block access to parallel monolithic Vectors with an underling block structure. More...

#include <BlockEpetra_Map.hpp>

+ Collaboration diagram for BlockEpetra_Map:

Public Member Functions

void showMe ()
 Print debug info. More...
 

Private Member Functions

void build ()
 

Private Attributes

UInt M_nBlocks
 
std::vector< UIntM_myLocalOffsets
 
mapPtr_Type M_monolithicMap
 
mapPtrContainer_Type M_blockMap
 
mapPtrContainer_Type M_blockShiftedMap
 

Friends

class BlockEpetra_MultiVector
 
typedef Operators::LinearOperatorAlgebra::comm_Type comm_Type
 
typedef Operators::LinearOperatorAlgebra::map_Type map_Type
 
typedef Operators::LinearOperatorAlgebra::mapPtr_Type mapPtr_Type
 
typedef Operators::LinearOperatorAlgebra::constMapPtr_Type constMapPtr_Type
 
typedef std::vector< mapPtr_TypemapPtrContainer_Type
 
typedef mapPtrContainer_Type::iterator mapPtrIterator_Type
 
typedef mapPtrContainer_Type::const_iterator mapPtrConstIterator_Type
 
typedef Epetra_Import import_Type
 
typedef boost::shared_ptr< import_TypeimportPtr_Type
 
typedef std::vector< importPtr_TypeimportPtrContainer_Type
 
typedef importPtrContainer_Type::iterator importPtrIterator_Type
 
typedef importPtrContainer_Type::const_iterator importPtrConstIterator_Type
 
 BlockEpetra_Map ()
 Default Constructor. More...
 
 BlockEpetra_Map (const BlockEpetra_Map &map)
 Copy constructor. More...
 
 BlockEpetra_Map (const mapPtrContainer_Type &mapPtrContainer)
 Construct a BlockEpetra_Map from an ordered list of Epetra_BlockMap objects. More...
 
void setUp (const mapPtr_Type &map1, const mapPtr_Type &map2)
 simplified setup for the case of only 2 blocks More...
 
void setUp (const mapPtr_Type &map1, const mapPtr_Type &map2, const mapPtr_Type &map3)
 simplified setup for the case of only 3 blocks More...
 
void setUp (const mapPtrContainer_Type &mapPtrContainer)
 general setup for arbitrary number of blocks. The maps of the block to stride are collected in a mapPtrContainer_Type object More...
 
void setUp (const Epetra_BlockMap &map1, const Epetra_BlockMap &map2)
 other set up routines to overcome a design problem in Trilinos (2 blocks) More...
 
void setUp (const Epetra_BlockMap &map1, const Epetra_BlockMap &map2, const Epetra_BlockMap &map3)
 other set up routines to overcome a design problem in Trilinos (3 blocks) More...
 
UInt nBlocks () const
 get the number of blocks More...
 
mapPtr_TypemonolithicMap ()
 returns the monolithicMap More...
 
const constMapPtr_Type monolithicMap () const
 const version More...
 
mapPtr_TypeblockMap (UInt iblock)
 returns the original map of block iblock More...
 
const constMapPtr_Type blockMap (UInt iblock) const
 const version More...
 
mapPtr_TypeblockShiftedMap (UInt iblock)
 returns the map relative to block iblock in the numbering of the monolithic map More...
 
const constMapPtr_Type blockShiftedMap (UInt iblock) const
 const version More...
 
const import_Typeblock2monoImporter (UInt iblock) const
 return an Trilinos import_Type object from block iblock map to the monolithic map More...
 
const import_Typemono2blockImporter (UInt iblock) const
 return an Trilinos import_Type object from the monolithic map to block iblock map. More...
 

Importers

importPtrContainer_Type M_block2mono
 merge block vectors in the monolithic vector More...
 
importPtrContainer_Type M_mono2block
 split the monolithic vector in the block vectors More...
 

Detailed Description

This class handles block access to parallel monolithic Vectors with an underling block structure.

The goal of BlockEpetra_Map is to provide block or monolithic access to block structured parallel Vectors. The BlockEpetra_Map takes as input a list of Epetra_BlockMap and construct a monolithic map by striding them together.

Definition at line 36 of file BlockEpetra_Map.hpp.

Member Typedef Documentation

◆ comm_Type

◆ map_Type

◆ mapPtr_Type

◆ constMapPtr_Type

◆ mapPtrContainer_Type

typedef std::vector<mapPtr_Type> mapPtrContainer_Type

Definition at line 46 of file BlockEpetra_Map.hpp.

◆ mapPtrIterator_Type

typedef mapPtrContainer_Type::iterator mapPtrIterator_Type

Definition at line 47 of file BlockEpetra_Map.hpp.

◆ mapPtrConstIterator_Type

typedef mapPtrContainer_Type::const_iterator mapPtrConstIterator_Type

Definition at line 48 of file BlockEpetra_Map.hpp.

◆ import_Type

typedef Epetra_Import import_Type

Definition at line 50 of file BlockEpetra_Map.hpp.

◆ importPtr_Type

typedef boost::shared_ptr<import_Type> importPtr_Type

Definition at line 51 of file BlockEpetra_Map.hpp.

◆ importPtrContainer_Type

Definition at line 52 of file BlockEpetra_Map.hpp.

◆ importPtrIterator_Type

typedef importPtrContainer_Type::iterator importPtrIterator_Type

Definition at line 53 of file BlockEpetra_Map.hpp.

◆ importPtrConstIterator_Type

typedef importPtrContainer_Type::const_iterator importPtrConstIterator_Type

Definition at line 54 of file BlockEpetra_Map.hpp.

Constructor & Destructor Documentation

◆ BlockEpetra_Map() [1/3]

Default Constructor.

Definition at line 12 of file BlockEpetra_Map.cpp.

+ Here is the caller graph for this function:

◆ BlockEpetra_Map() [2/3]

BlockEpetra_Map ( const BlockEpetra_Map map)

Copy constructor.

Definition at line 22 of file BlockEpetra_Map.cpp.

+ Here is the caller graph for this function:

◆ BlockEpetra_Map() [3/3]

BlockEpetra_Map ( const mapPtrContainer_Type mapPtrContainer)

Construct a BlockEpetra_Map from an ordered list of Epetra_BlockMap objects.

Definition at line 40 of file BlockEpetra_Map.cpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ setUp() [1/5]

void setUp ( const mapPtr_Type map1,
const mapPtr_Type map2 
)

simplified setup for the case of only 2 blocks

Definition at line 52 of file BlockEpetra_Map.cpp.

◆ setUp() [2/5]

void setUp ( const mapPtr_Type map1,
const mapPtr_Type map2,
const mapPtr_Type map3 
)

simplified setup for the case of only 3 blocks

Definition at line 60 of file BlockEpetra_Map.cpp.

◆ setUp() [3/5]

void setUp ( const mapPtrContainer_Type mapPtrContainer)

general setup for arbitrary number of blocks. The maps of the block to stride are collected in a mapPtrContainer_Type object

Definition at line 69 of file BlockEpetra_Map.cpp.

+ Here is the caller graph for this function:

◆ setUp() [4/5]

void setUp ( const Epetra_BlockMap &  map1,
const Epetra_BlockMap &  map2 
)

other set up routines to overcome a design problem in Trilinos (2 blocks)

Definition at line 87 of file BlockEpetra_Map.cpp.

◆ setUp() [5/5]

void setUp ( const Epetra_BlockMap &  map1,
const Epetra_BlockMap &  map2,
const Epetra_BlockMap &  map3 
)

other set up routines to overcome a design problem in Trilinos (3 blocks)

Definition at line 95 of file BlockEpetra_Map.cpp.

◆ nBlocks()

UInt nBlocks ( ) const

get the number of blocks

Definition at line 105 of file BlockEpetra_Map.cpp.

+ Here is the caller graph for this function:

◆ monolithicMap() [1/2]

BlockEpetra_Map::mapPtr_Type & monolithicMap ( )

returns the monolithicMap

Definition at line 110 of file BlockEpetra_Map.cpp.

◆ monolithicMap() [2/2]

const BlockEpetra_Map::constMapPtr_Type monolithicMap ( ) const

const version

Definition at line 114 of file BlockEpetra_Map.cpp.

◆ blockMap() [1/2]

BlockEpetra_Map::mapPtr_Type & blockMap ( UInt  iblock)

returns the original map of block iblock

Definition at line 118 of file BlockEpetra_Map.cpp.

◆ blockMap() [2/2]

const BlockEpetra_Map::constMapPtr_Type blockMap ( UInt  iblock) const

const version

Definition at line 123 of file BlockEpetra_Map.cpp.

◆ blockShiftedMap() [1/2]

BlockEpetra_Map::mapPtr_Type & blockShiftedMap ( UInt  iblock)

returns the map relative to block iblock in the numbering of the monolithic map

Definition at line 128 of file BlockEpetra_Map.cpp.

◆ blockShiftedMap() [2/2]

const BlockEpetra_Map::constMapPtr_Type blockShiftedMap ( UInt  iblock) const

const version

Definition at line 132 of file BlockEpetra_Map.cpp.

◆ block2monoImporter()

const BlockEpetra_Map::import_Type & block2monoImporter ( UInt  iblock) const

return an Trilinos import_Type object from block iblock map to the monolithic map

Definition at line 137 of file BlockEpetra_Map.cpp.

◆ mono2blockImporter()

const BlockEpetra_Map::import_Type & mono2blockImporter ( UInt  iblock) const

return an Trilinos import_Type object from the monolithic map to block iblock map.

Definition at line 142 of file BlockEpetra_Map.cpp.

◆ showMe()

void showMe ( )

Print debug info.

Definition at line 147 of file BlockEpetra_Map.cpp.

◆ build()

void build ( )
private

Definition at line 155 of file BlockEpetra_Map.cpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ BlockEpetra_MultiVector

friend class BlockEpetra_MultiVector
friend

Definition at line 110 of file BlockEpetra_Map.hpp.

Field Documentation

◆ M_nBlocks

UInt M_nBlocks
private

Definition at line 118 of file BlockEpetra_Map.hpp.

◆ M_myLocalOffsets

std::vector<UInt> M_myLocalOffsets
private

Definition at line 119 of file BlockEpetra_Map.hpp.

◆ M_monolithicMap

mapPtr_Type M_monolithicMap
private

Definition at line 120 of file BlockEpetra_Map.hpp.

◆ M_blockMap

mapPtrContainer_Type M_blockMap
private

Definition at line 121 of file BlockEpetra_Map.hpp.

◆ M_blockShiftedMap

mapPtrContainer_Type M_blockShiftedMap
private

Definition at line 122 of file BlockEpetra_Map.hpp.

◆ M_block2mono

importPtrContainer_Type M_block2mono
private

merge block vectors in the monolithic vector

Definition at line 127 of file BlockEpetra_Map.hpp.

◆ M_mono2block

importPtrContainer_Type M_mono2block
private

split the monolithic vector in the block vectors

Definition at line 129 of file BlockEpetra_Map.hpp.


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