EpetraExt  Development
Public Member Functions | Protected Attributes | List of all members
EpetraExt::BlockVector Class Reference

#include <EpetraExt_BlockVector.h>

Inherits Epetra_Vector.

Public Member Functions

int ExtractBlockValues (Epetra_Vector &BaseVec, long long BlockRow) const
 Extract a single block from a Block Vector: block row is global, not a stencil value. More...
 
int LoadBlockValues (const Epetra_Vector &BaseVec, long long BlockRow)
 Load a single block into a Block Vector: block row is global, not a stencil value. More...
 
int BlockSumIntoGlobalValues (int NumIndices, double *Values, int *Indices, int BlockRow)
 Load entries into BlockVector with base vector indices offset by BlockRow. More...
 
int BlockReplaceGlobalValues (int NumIndices, double *Values, int *Indices, int BlockRow)
 Load entries into BlockVector with base vector indices offset by BlockRow. More...
 
int BlockSumIntoGlobalValues (int NumIndices, double *Values, long long *Indices, long long BlockRow)
 Load entries into BlockVector with base vector indices offset by BlockRow. More...
 
int BlockReplaceGlobalValues (int NumIndices, double *Values, long long *Indices, long long BlockRow)
 Load entries into BlockVector with base vector indices offset by BlockRow. More...
 
Teuchos::RCP< const Epetra_Vector > GetBlock (long long BlockRow) const
 Return Epetra_Vector for given block row. More...
 
Teuchos::RCP< Epetra_Vector > GetBlock (long long BlockRow)
 Return Epetra_Vector for given block row. More...
 
const Epetra_BlockMap & GetBaseMap () const
 Return base map. More...
 

Protected Attributes

Epetra_BlockMap BaseMap_
 
long long Offset_
 
 BlockVector (const Epetra_BlockMap &BaseMap, const Epetra_BlockMap &GlobalMap)
 BlockVector constuctor with one block row per processor. More...
 
 BlockVector (Epetra_DataAccess CV, const Epetra_BlockMap &BaseMap, const Epetra_Vector &BlockVec)
 
 BlockVector (const BlockVector &MV)
 Copy constructor. More...
 
virtual ~BlockVector ()
 Destructor. More...
 

Detailed Description

Definition at line 60 of file EpetraExt_BlockVector.h.

Constructor & Destructor Documentation

◆ BlockVector() [1/3]

EpetraExt::BlockVector::BlockVector ( const Epetra_BlockMap &  BaseMap,
const Epetra_BlockMap &  GlobalMap 
)

BlockVector constuctor with one block row per processor.

Creates a BlockVector object and allocates storage.

Parameters
InBaseMap - Map determining local structure, can be distrib. over subset of proc.'s
InGlobalMap - Full map describing the overall global structure, generally generated by the construction of a BlockCrsMatrix object
InNumBlocks - Number of local blocks

Definition at line 51 of file EpetraExt_BlockVector.cpp.

◆ BlockVector() [2/3]

EpetraExt::BlockVector::BlockVector ( Epetra_DataAccess  CV,
const Epetra_BlockMap &  BaseMap,
const Epetra_Vector &  BlockVec 
)

Creates a BlockVector object from an existing Epetra_Vector.

Parameters
InEpetra_DataAccess - Enumerated type set to Copy or View.
InBaseMap - Map determining local structure, can be distrib. over subset of proc.'s
InBlockVec - Source Epetra vector whose map must be the full map for the block vector

Definition at line 62 of file EpetraExt_BlockVector.cpp.

◆ BlockVector() [3/3]

EpetraExt::BlockVector::BlockVector ( const BlockVector MV)

Copy constructor.

Definition at line 74 of file EpetraExt_BlockVector.cpp.

◆ ~BlockVector()

EpetraExt::BlockVector::~BlockVector ( )
virtual

Destructor.

Definition at line 82 of file EpetraExt_BlockVector.cpp.

Member Function Documentation

◆ ExtractBlockValues()

int EpetraExt::BlockVector::ExtractBlockValues ( Epetra_Vector &  BaseVec,
long long  BlockRow 
) const

Extract a single block from a Block Vector: block row is global, not a stencil value.

Definition at line 87 of file EpetraExt_BlockVector.cpp.

◆ LoadBlockValues()

int EpetraExt::BlockVector::LoadBlockValues ( const Epetra_Vector &  BaseVec,
long long  BlockRow 
)

Load a single block into a Block Vector: block row is global, not a stencil value.

Definition at line 108 of file EpetraExt_BlockVector.cpp.

◆ BlockSumIntoGlobalValues() [1/2]

int EpetraExt::BlockVector::BlockSumIntoGlobalValues ( int  NumIndices,
double *  Values,
int *  Indices,
int  BlockRow 
)

Load entries into BlockVector with base vector indices offset by BlockRow.

Definition at line 129 of file EpetraExt_BlockVector.cpp.

◆ BlockReplaceGlobalValues() [1/2]

int EpetraExt::BlockVector::BlockReplaceGlobalValues ( int  NumIndices,
double *  Values,
int *  Indices,
int  BlockRow 
)

Load entries into BlockVector with base vector indices offset by BlockRow.

Definition at line 150 of file EpetraExt_BlockVector.cpp.

◆ BlockSumIntoGlobalValues() [2/2]

int EpetraExt::BlockVector::BlockSumIntoGlobalValues ( int  NumIndices,
double *  Values,
long long *  Indices,
long long  BlockRow 
)

Load entries into BlockVector with base vector indices offset by BlockRow.

Definition at line 173 of file EpetraExt_BlockVector.cpp.

◆ BlockReplaceGlobalValues() [2/2]

int EpetraExt::BlockVector::BlockReplaceGlobalValues ( int  NumIndices,
double *  Values,
long long *  Indices,
long long  BlockRow 
)

Load entries into BlockVector with base vector indices offset by BlockRow.

Definition at line 194 of file EpetraExt_BlockVector.cpp.

◆ GetBlock() [1/2]

Teuchos::RCP< const Epetra_Vector > EpetraExt::BlockVector::GetBlock ( long long  BlockRow) const

Return Epetra_Vector for given block row.

Definition at line 217 of file EpetraExt_BlockVector.cpp.

◆ GetBlock() [2/2]

Teuchos::RCP< Epetra_Vector > EpetraExt::BlockVector::GetBlock ( long long  BlockRow)

Return Epetra_Vector for given block row.

Definition at line 225 of file EpetraExt_BlockVector.cpp.

◆ GetBaseMap()

const Epetra_BlockMap & EpetraExt::BlockVector::GetBaseMap ( ) const

Return base map.

Definition at line 233 of file EpetraExt_BlockVector.cpp.

Member Data Documentation

◆ BaseMap_

Epetra_BlockMap EpetraExt::BlockVector::BaseMap_
protected

Definition at line 130 of file EpetraExt_BlockVector.h.

◆ Offset_

long long EpetraExt::BlockVector::Offset_
protected

Definition at line 132 of file EpetraExt_BlockVector.h.


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