LifeV
MatrixBlockMonolithicEpetraView< DataType > Class Template Reference

MatrixBlockMonolithicEpetraView - class representing a block in a MatrixBlockMonolithicEpetra. More...

#include <MatrixBlockMonolithicEpetraView.hpp>

+ Collaboration diagram for MatrixBlockMonolithicEpetraView< DataType >:

Private Attributes

UInt M_numRows
 
UInt M_numColumns
 
UInt M_firstRowIndex
 
UInt M_lastRowIndex
 
UInt M_firstColumnIndex
 
UInt M_lastColumnIndex
 
matrix_TypeM_matrix
 

Typedefs

typedef MatrixEpetra< DataType > matrix_Type
 

Constructors, destructor

 MatrixBlockMonolithicEpetraView ()
 default constructor. More...
 
 MatrixBlockMonolithicEpetraView (const MatrixBlockMonolithicEpetraView< DataType > &mbv)
 Copy constructor. More...
 
 ~MatrixBlockMonolithicEpetraView ()
 default virtual destructor More...
 

Methods

void showMe (std::ostream &output=std::cout) const
 Print the informations about the MatrixBlockMonolithicEpetraView. More...
 
bool filled () const
 Tells if the viewed matrix is already filled. More...
 
void addToCoefficients (UInt const numRows, UInt const numColumns, std::vector< Int > const &blockRowIndices, std::vector< Int > const &blockColumnIndices, DataType *const *const localValues, Int format=Epetra_FECrsMatrix::COLUMN_MAJOR) const
 Function to assemble an elemental matrix in a block. More...
 
void sumIntoCoefficients (UInt const numRows, UInt const numColumns, std::vector< Int > const &blockRowIndices, std::vector< Int > const &blockColumnIndices, DataType *const *const localValues, Int format=Epetra_FECrsMatrix::COLUMN_MAJOR) const
 Function to sum an elemental matrix in a block which is already closed. More...
 

Set Methods

void setup (const UInt &firstRow, const UInt &firstColumn, const UInt &numRows, const UInt &numColumns, matrix_Type *A)
 

Get Methods

UInt numRows () const
 Returns the number of rows in the block. More...
 
UInt numColumns () const
 Returns the number of columns in the block. More...
 
UInt firstRowIndex () const
 Returns the index of the first row in the block. More...
 
UInt lastRowIndex () const
 Returns the index of the last row in the block. More...
 
UInt firstColumnIndex () const
 Returns the index of the first column in the block. More...
 
UInt lastColumnIndex () const
 Returns the index of the last column in the block. More...
 
matrix_TypematrixPtr () const
 Return the pointer of the full matrix. More...
 

Private Methods

MatrixBlockMonolithicEpetraView< DataType > operator= (const MatrixBlockMonolithicEpetraView &otherView)
 No assignement operator, it is missleading (would copy the views, not the blocks!) More...
 

Detailed Description

template<typename DataType>
class LifeV::MatrixBlockMonolithicEpetraView< DataType >

MatrixBlockMonolithicEpetraView - class representing a block in a MatrixBlockMonolithicEpetra.

Author
Gwenol Grandperrin
Samuel Quinodoz

The MatrixBlockMonolithicEpetraView class contains data related to block of a matrix. It is useful to setup a clean and easy-to-use blocks management.

For more information about the block structures in LifeV, see this page.

Remark

Using the operator "=" is not valid for this class! Indeed, copying the view would not copy the data stored in the matrix, which can be confusing. If the copy of the block is the intended use, one should use a method from the BlockUtils.

Definition at line 67 of file MatrixBlockMonolithicEpetraView.hpp.

Member Typedef Documentation

◆ matrix_Type

typedef MatrixEpetra<DataType> matrix_Type

Definition at line 78 of file MatrixBlockMonolithicEpetraView.hpp.

Constructor & Destructor Documentation

◆ MatrixBlockMonolithicEpetraView() [1/2]

default constructor.

Definition at line 208 of file MatrixBlockMonolithicEpetraView.hpp.

◆ MatrixBlockMonolithicEpetraView() [2/2]

Copy constructor.

Definition at line 221 of file MatrixBlockMonolithicEpetraView.hpp.

◆ ~MatrixBlockMonolithicEpetraView()

default virtual destructor

Definition at line 234 of file MatrixBlockMonolithicEpetraView.hpp.

Member Function Documentation

◆ showMe()

void showMe ( std::ostream &  output = std::cout) const

Print the informations about the MatrixBlockMonolithicEpetraView.

Definition at line 245 of file MatrixBlockMonolithicEpetraView.hpp.

◆ filled()

bool filled ( ) const

Tells if the viewed matrix is already filled.

Definition at line 259 of file MatrixBlockMonolithicEpetraView.hpp.

◆ addToCoefficients()

void addToCoefficients ( UInt const  numRows,
UInt const  numColumns,
std::vector< Int > const &  blockRowIndices,
std::vector< Int > const &  blockColumnIndices,
DataType *const *const  localValues,
Int  format = Epetra_FECrsMatrix::COLUMN_MAJOR 
) const

Function to assemble an elemental matrix in a block.

Definition at line 268 of file MatrixBlockMonolithicEpetraView.hpp.

◆ sumIntoCoefficients()

void sumIntoCoefficients ( UInt const  numRows,
UInt const  numColumns,
std::vector< Int > const &  blockRowIndices,
std::vector< Int > const &  blockColumnIndices,
DataType *const *const  localValues,
Int  format = Epetra_FECrsMatrix::COLUMN_MAJOR 
) const

Function to sum an elemental matrix in a block which is already closed.

Definition at line 294 of file MatrixBlockMonolithicEpetraView.hpp.

◆ setup()

void setup ( const UInt firstRow,
const UInt firstColumn,
const UInt numRows,
const UInt numColumns,
matrix_Type A 
)

Set all the informations relative to the block

Parameters
firstRowFirst row in the block
firstColumnFirst column in the block
numRowsNumber of rows in the block
numColumnsNumber of columns in the block
AMatrix which contains the block

Definition at line 326 of file MatrixBlockMonolithicEpetraView.hpp.

◆ numRows()

UInt numRows ( ) const
inline

Returns the number of rows in the block.

Definition at line 140 of file MatrixBlockMonolithicEpetraView.hpp.

◆ numColumns()

UInt numColumns ( ) const
inline

Returns the number of columns in the block.

Definition at line 146 of file MatrixBlockMonolithicEpetraView.hpp.

◆ firstRowIndex()

UInt firstRowIndex ( ) const
inline

Returns the index of the first row in the block.

Definition at line 152 of file MatrixBlockMonolithicEpetraView.hpp.

◆ lastRowIndex()

UInt lastRowIndex ( ) const
inline

Returns the index of the last row in the block.

Definition at line 158 of file MatrixBlockMonolithicEpetraView.hpp.

◆ firstColumnIndex()

UInt firstColumnIndex ( ) const
inline

Returns the index of the first column in the block.

Definition at line 164 of file MatrixBlockMonolithicEpetraView.hpp.

◆ lastColumnIndex()

UInt lastColumnIndex ( ) const
inline

Returns the index of the last column in the block.

Definition at line 170 of file MatrixBlockMonolithicEpetraView.hpp.

◆ matrixPtr()

matrix_Type* matrixPtr ( ) const
inline

Return the pointer of the full matrix.

Definition at line 176 of file MatrixBlockMonolithicEpetraView.hpp.

◆ operator=()

MatrixBlockMonolithicEpetraView<DataType> operator= ( const MatrixBlockMonolithicEpetraView< DataType > &  otherView)
private

No assignement operator, it is missleading (would copy the views, not the blocks!)

Field Documentation

◆ M_numRows

UInt M_numRows
private

Definition at line 194 of file MatrixBlockMonolithicEpetraView.hpp.

◆ M_numColumns

UInt M_numColumns
private

Definition at line 195 of file MatrixBlockMonolithicEpetraView.hpp.

◆ M_firstRowIndex

UInt M_firstRowIndex
private

Definition at line 196 of file MatrixBlockMonolithicEpetraView.hpp.

◆ M_lastRowIndex

UInt M_lastRowIndex
private

Definition at line 197 of file MatrixBlockMonolithicEpetraView.hpp.

◆ M_firstColumnIndex

UInt M_firstColumnIndex
private

Definition at line 198 of file MatrixBlockMonolithicEpetraView.hpp.

◆ M_lastColumnIndex

UInt M_lastColumnIndex
private

Definition at line 199 of file MatrixBlockMonolithicEpetraView.hpp.

◆ M_matrix

matrix_Type* M_matrix
private

Definition at line 200 of file MatrixBlockMonolithicEpetraView.hpp.


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