LifeV
BlockEpetra_MultiVector Class Reference

A derived class from Epetra_MultiVector specialized to handle parallel block structured Vectors. More...

#include <BlockEpetra_MultiVector.hpp>

+ Inheritance diagram for BlockEpetra_MultiVector:
+ Collaboration diagram for BlockEpetra_MultiVector:

Private Member Functions

void createBlockViews ()
 

Private Attributes

UInt M_nBlocks
 
BlockEpetra_Map M_blockMap
 
std::vector< UIntM_myLocalOffsets
 
vectorPtrContainer_Type M_blocks
 
typedef Epetra_MultiVector vector_Type
 
typedef boost::shared_ptr< vector_TypevectorPtr_Type
 
typedef std::vector< vectorPtr_TypevectorPtrContainer_Type
 
 BlockEpetra_MultiVector (const BlockEpetra_Map &map, int numVectors, bool zeroOut=true)
 Generate a BlockEpetra_MultiVector from a BlockEpetra_Map. More...
 
 BlockEpetra_MultiVector (const BlockEpetra_MultiVector &Source)
 Copy Constructor. More...
 
 BlockEpetra_MultiVector (Epetra_DataAccess CV, const vector_Type &source, const BlockEpetra_Map &map)
 Overlay a block structure to a source. More...
 
Epetra_MultiVectorblock (UInt iblock)
 Return a Epetra_MultiVector (view) object for block iblock. More...
 
const Epetra_MultiVectorblock (UInt iblock) const
 const version More...
 
const BlockEpetra_MapblockEpetraMap () const
 retrieve the BlockEpetra_Map More...
 

Detailed Description

A derived class from Epetra_MultiVector specialized to handle parallel block structured Vectors.

BlockEpetra_MultiVector provides monolithic or block access to an Epetra_MultiVector. A BlockEpetra_MultiVector object can be constructed or by striding Epetra_MultiVector or from a BlockEpetra_Map.

This class can be also used to overly a block structure to a given Epetra_MultiVector. In this case, to maximize performances and reduce memory footprint the original object and it's block view will share the same data in memory. If a BlockEpetra_MultiVector object is a view of another Epetra_MultiVector each modification on the data value of one vector will also affect the other vector and viceversa.

Definition at line 39 of file BlockEpetra_MultiVector.hpp.

Member Typedef Documentation

◆ vector_Type

Definition at line 46 of file BlockEpetra_MultiVector.hpp.

◆ vectorPtr_Type

typedef boost::shared_ptr<vector_Type> vectorPtr_Type

Definition at line 47 of file BlockEpetra_MultiVector.hpp.

◆ vectorPtrContainer_Type

Definition at line 48 of file BlockEpetra_MultiVector.hpp.

Constructor & Destructor Documentation

◆ BlockEpetra_MultiVector() [1/3]

BlockEpetra_MultiVector ( const BlockEpetra_Map map,
int  numVectors,
bool  zeroOut = true 
)

Generate a BlockEpetra_MultiVector from a BlockEpetra_Map.

Definition at line 12 of file BlockEpetra_MultiVector.cpp.

+ Here is the caller graph for this function:

◆ BlockEpetra_MultiVector() [2/3]

Copy Constructor.

Definition at line 22 of file BlockEpetra_MultiVector.cpp.

+ Here is the caller graph for this function:

◆ BlockEpetra_MultiVector() [3/3]

BlockEpetra_MultiVector ( Epetra_DataAccess  CV,
const vector_Type source,
const BlockEpetra_Map map 
)

Overlay a block structure to a source.

If the DataAccess type is Copy, then this object will make a deep copy of all the data structure of source If the DataAccess type is View, then this object will only copy the pointers to the datas in source. (shallow copy).

Warning
View access is faster but the user must ensure that source will not be deallocated before this

Definition at line 32 of file BlockEpetra_MultiVector.cpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ block() [1/2]

Epetra_MultiVector & block ( UInt  iblock)

Return a Epetra_MultiVector (view) object for block iblock.

Warning
The returned object doesn't own the internal data structure. User must ensure correct scoping.

Definition at line 43 of file BlockEpetra_MultiVector.cpp.

◆ block() [2/2]

const Epetra_MultiVector & block ( UInt  iblock) const

const version

Definition at line 61 of file BlockEpetra_MultiVector.cpp.

◆ blockEpetraMap()

const BlockEpetra_Map & blockEpetraMap ( ) const

retrieve the BlockEpetra_Map

Definition at line 79 of file BlockEpetra_MultiVector.cpp.

◆ createBlockViews()

void createBlockViews ( )
private

Definition at line 85 of file BlockEpetra_MultiVector.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_nBlocks

UInt M_nBlocks
private

Definition at line 83 of file BlockEpetra_MultiVector.hpp.

◆ M_blockMap

BlockEpetra_Map M_blockMap
private

Definition at line 84 of file BlockEpetra_MultiVector.hpp.

◆ M_myLocalOffsets

std::vector<UInt> M_myLocalOffsets
private

Definition at line 85 of file BlockEpetra_MultiVector.hpp.

◆ M_blocks

vectorPtrContainer_Type M_blocks
private

Definition at line 86 of file BlockEpetra_MultiVector.hpp.


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