LifeV
MatrixEpetraStructuredView< DataType > Class Template Reference

MatrixEpetraStructuredView - class representing a block in a MatrixEpetraStructured. More...

#include <MatrixEpetraStructuredView.hpp>

+ Collaboration diagram for MatrixEpetraStructuredView< 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

 MatrixEpetraStructuredView ()
 default constructor. More...
 
 MatrixEpetraStructuredView (const MatrixEpetraStructuredView< DataType > &matrixEpetraStructured)
 Copy constructor. More...
 
 ~MatrixEpetraStructuredView ()
 default virtual destructor More...
 

Methods

void showMe (std::ostream &output=std::cout) const
 Print the informations about the MatrixEpetraStructuredView. 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 assemble an elemental matrix in a block (for closed matrices) 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...
 
bool filled () const
 Return the fill-complete status of the inner Epetra_FECrsMatrix. More...
 
matrix_TypematrixPtr () const
 Return the pointer of the full matrix. More...
 

Private Methods

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

Detailed Description

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

MatrixEpetraStructuredView - class representing a block in a MatrixEpetraStructured.

Author
Gwenol Grandperrin
Samuel Quinodoz

The MatrixEpetraStructuredView 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 66 of file MatrixEpetraStructuredView.hpp.

Member Typedef Documentation

◆ matrix_Type

typedef MatrixEpetra<DataType> matrix_Type

Definition at line 77 of file MatrixEpetraStructuredView.hpp.

Constructor & Destructor Documentation

◆ MatrixEpetraStructuredView() [1/2]

default constructor.

Definition at line 208 of file MatrixEpetraStructuredView.hpp.

◆ MatrixEpetraStructuredView() [2/2]

MatrixEpetraStructuredView ( const MatrixEpetraStructuredView< DataType > &  matrixEpetraStructured)

Copy constructor.

Definition at line 221 of file MatrixEpetraStructuredView.hpp.

◆ ~MatrixEpetraStructuredView()

default virtual destructor

Definition at line 234 of file MatrixEpetraStructuredView.hpp.

Member Function Documentation

◆ showMe()

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

Print the informations about the MatrixEpetraStructuredView.

Definition at line 245 of file MatrixEpetraStructuredView.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 258 of file MatrixEpetraStructuredView.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 assemble an elemental matrix in a block (for closed matrices)

Definition at line 283 of file MatrixEpetraStructuredView.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 312 of file MatrixEpetraStructuredView.hpp.

◆ numRows()

UInt numRows ( ) const
inline

Returns the number of rows in the block.

Definition at line 134 of file MatrixEpetraStructuredView.hpp.

◆ numColumns()

UInt numColumns ( ) const
inline

Returns the number of columns in the block.

Definition at line 140 of file MatrixEpetraStructuredView.hpp.

◆ firstRowIndex()

UInt firstRowIndex ( ) const
inline

Returns the index of the first row in the block.

Definition at line 146 of file MatrixEpetraStructuredView.hpp.

◆ lastRowIndex()

UInt lastRowIndex ( ) const
inline

Returns the index of the last row in the block.

Definition at line 152 of file MatrixEpetraStructuredView.hpp.

◆ firstColumnIndex()

UInt firstColumnIndex ( ) const
inline

Returns the index of the first column in the block.

Definition at line 158 of file MatrixEpetraStructuredView.hpp.

◆ lastColumnIndex()

UInt lastColumnIndex ( ) const
inline

Returns the index of the last column in the block.

Definition at line 164 of file MatrixEpetraStructuredView.hpp.

◆ filled()

bool filled ( ) const
inline

Return the fill-complete status of the inner Epetra_FECrsMatrix.

Definition at line 170 of file MatrixEpetraStructuredView.hpp.

◆ matrixPtr()

matrix_Type* matrixPtr ( ) const
inline

Return the pointer of the full matrix.

Definition at line 176 of file MatrixEpetraStructuredView.hpp.

◆ operator=()

MatrixEpetraStructuredView<DataType> operator= ( const MatrixEpetraStructuredView< 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 MatrixEpetraStructuredView.hpp.

◆ M_numColumns

UInt M_numColumns
private

Definition at line 195 of file MatrixEpetraStructuredView.hpp.

◆ M_firstRowIndex

UInt M_firstRowIndex
private

Definition at line 196 of file MatrixEpetraStructuredView.hpp.

◆ M_lastRowIndex

UInt M_lastRowIndex
private

Definition at line 197 of file MatrixEpetraStructuredView.hpp.

◆ M_firstColumnIndex

UInt M_firstColumnIndex
private

Definition at line 198 of file MatrixEpetraStructuredView.hpp.

◆ M_lastColumnIndex

UInt M_lastColumnIndex
private

Definition at line 199 of file MatrixEpetraStructuredView.hpp.

◆ M_matrix

matrix_Type* M_matrix
private

Definition at line 200 of file MatrixEpetraStructuredView.hpp.


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