LifeV
ETMatrixElemental Class Reference

class ETMatrixElemental A class for describing an elemental matrix More...

#include <ETMatrixElemental.hpp>

+ Collaboration diagram for ETMatrixElemental:

Private Attributes

std::vector< IntM_rowIndices
 
std::vector< IntM_columnIndices
 
UInt M_nbRow
 
UInt M_nbColumn
 
Real ** M_rawData
 

Constructors & Destructor

 ETMatrixElemental (const UInt &nbRow, const UInt &nbCol)
 Constructor with the minimal interface: number of columns and of rows are provided. More...
 
 ETMatrixElemental (const ETMatrixElemental &mat)
 Copy constructor (including deep copy of the data) More...
 
virtual ~ETMatrixElemental ()
 Destructor. More...
 

Methods

void zero ()
 Put zero all the data stored. More...
 
template<typename MatrixType >
void pushToGlobal (MatrixType &mat)
 Assembly procedure for a matrix or a block of a matrix. More...
 
template<typename MatrixType >
void pushToClosedGlobal (MatrixType &mat)
 Assembly procedure for a matrix or a block of a matrix. More...
 
template<typename MatrixType >
void pushToGlobal (std::shared_ptr< MatrixType > mat)
 Assembly procedure for a matrix or a block of a matrix passed in a shared_ptr. More...
 
template<typename MatrixType >
void pushToClosedGlobal (std::shared_ptr< MatrixType > mat)
 Assembly procedure for a matrix or a block of a matrix passed in a shared_ptr. More...
 
void showMe (std::ostream &out=std::cout) const
 Ouput method for the sizes and the stored values. More...
 

Set Methods

Realelement (const UInt &iloc, const UInt &jloc)
 Setter for the value in the local position (iloc,jloc) More...
 
void setRowIndex (const UInt &iloc, const UInt &iglobal)
 Setter for the global index corresponding to the iloc row of the local matrix. More...
 
void setRowIndex (const std::vector< Int > &indicesVector)
 Setter for the global index of the rows of the local matrix. More...
 
void setColumnIndex (const UInt &jloc, const UInt &jglobal)
 Setter for the global index corresponding to the jloc column of the local matrix. More...
 
void setColumnIndex (const std::vector< Int > &indicesVector)
 Setter for the global index of the columns of the local matrix. More...
 

Get Methods

const Realelement (const UInt &iloc, const UInt &jloc) const
 Getter for the data stored in the given elemental position. More...
 
Real *const * rawData () const
 Getter for the full set of data. More...
 
const std::vector< Int > & rowIndices () const
 Getter for the global indices of the rows. More...
 
const std::vector< Int > & columnIndices () const
 Getter for the global indices of the columns. More...
 

Private Methods

 ETMatrixElemental ()
 No empty constructor, as we want at least the sizes to be defined. More...
 
ETMatrixElemental operator= (const ETMatrixElemental &)
 No need for an assignement operator. More...
 

Detailed Description

class ETMatrixElemental A class for describing an elemental matrix

Author
Samuel Quinodoz samue.nosp@m.l.qu.nosp@m.inodo.nosp@m.z@ep.nosp@m.fl.ch

This class is meant to represent an ETMatrixElemental. It contains mainly:

  1. Simple constructors
  2. Methods to access and modify the indexes
  3. Methods to store and access the entries
  4. Assembly methods to put the local entries in a global matrix

Definition at line 65 of file ETMatrixElemental.hpp.

Constructor & Destructor Documentation

◆ ETMatrixElemental() [1/3]

ETMatrixElemental ( const UInt nbRow,
const UInt nbCol 
)

Constructor with the minimal interface: number of columns and of rows are provided.

Definition at line 45 of file ETMatrixElemental.cpp.

+ Here is the caller graph for this function:

◆ ETMatrixElemental() [2/3]

Copy constructor (including deep copy of the data)

Definition at line 61 of file ETMatrixElemental.cpp.

+ Here is the caller graph for this function:

◆ ~ETMatrixElemental()

~ETMatrixElemental ( )
virtual

Destructor.

Definition at line 79 of file ETMatrixElemental.cpp.

◆ ETMatrixElemental() [3/3]

ETMatrixElemental ( )
private

No empty constructor, as we want at least the sizes to be defined.

Member Function Documentation

◆ zero()

void zero ( )
inline

Put zero all the data stored.

Definition at line 96 of file ETMatrixElemental.hpp.

+ Here is the caller graph for this function:

◆ pushToGlobal() [1/2]

void pushToGlobal ( MatrixType &  mat)
inline

Assembly procedure for a matrix or a block of a matrix.

This method puts the values stored in this elemental matrix into the global matrix passed as argument, using the positions given in the global indices stored.

Definition at line 116 of file ETMatrixElemental.hpp.

◆ pushToClosedGlobal() [1/2]

void pushToClosedGlobal ( MatrixType &  mat)
inline

Assembly procedure for a matrix or a block of a matrix.

This method puts the values stored in this elemental matrix into the global matrix passed as argument, using the positions given in the global indices stored. The method is used when the global matrix is closed

Definition at line 133 of file ETMatrixElemental.hpp.

◆ pushToGlobal() [2/2]

void pushToGlobal ( std::shared_ptr< MatrixType >  mat)
inline

Assembly procedure for a matrix or a block of a matrix passed in a shared_ptr.

This method puts the values stored in this elemental matrix into the global matrix passed as argument, using the positions given in the global indices stored.

This is a partial specialization of the other assembly procedure of this class.

Definition at line 151 of file ETMatrixElemental.hpp.

◆ pushToClosedGlobal() [2/2]

void pushToClosedGlobal ( std::shared_ptr< MatrixType >  mat)
inline

Assembly procedure for a matrix or a block of a matrix passed in a shared_ptr.

This method puts the values stored in this elemental matrix into the global matrix passed as argument, using the positions given in the global indices stored. The method is used when the global matrix is closed

This is a partial specialization of the other assembly procedure of this class.

Definition at line 170 of file ETMatrixElemental.hpp.

◆ showMe()

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

Ouput method for the sizes and the stored values.

Definition at line 94 of file ETMatrixElemental.cpp.

◆ element() [1/2]

Real& element ( const UInt iloc,
const UInt jloc 
)
inline

Setter for the value in the local position (iloc,jloc)

Definition at line 186 of file ETMatrixElemental.hpp.

+ Here is the caller graph for this function:

◆ setRowIndex() [1/2]

void setRowIndex ( const UInt iloc,
const UInt iglobal 
)
inline

Setter for the global index corresponding to the iloc row of the local matrix.

Definition at line 194 of file ETMatrixElemental.hpp.

◆ setRowIndex() [2/2]

void setRowIndex ( const std::vector< Int > &  indicesVector)
inline

Setter for the global index of the rows of the local matrix.

Definition at line 201 of file ETMatrixElemental.hpp.

◆ setColumnIndex() [1/2]

void setColumnIndex ( const UInt jloc,
const UInt jglobal 
)
inline

Setter for the global index corresponding to the jloc column of the local matrix.

Definition at line 207 of file ETMatrixElemental.hpp.

◆ setColumnIndex() [2/2]

void setColumnIndex ( const std::vector< Int > &  indicesVector)
inline

Setter for the global index of the columns of the local matrix.

Definition at line 214 of file ETMatrixElemental.hpp.

◆ element() [2/2]

const Real& element ( const UInt iloc,
const UInt jloc 
) const
inline

Getter for the data stored in the given elemental position.

Definition at line 227 of file ETMatrixElemental.hpp.

◆ rawData()

Real* const* rawData ( ) const
inline

Getter for the full set of data.

Definition at line 235 of file ETMatrixElemental.hpp.

◆ rowIndices()

const std::vector<Int>& rowIndices ( ) const
inline

Getter for the global indices of the rows.

Definition at line 241 of file ETMatrixElemental.hpp.

◆ columnIndices()

const std::vector<Int>& columnIndices ( ) const
inline

Getter for the global indices of the columns.

Definition at line 247 of file ETMatrixElemental.hpp.

◆ operator=()

ETMatrixElemental operator= ( const ETMatrixElemental )
private

No need for an assignement operator.

Field Documentation

◆ M_rowIndices

std::vector<Int> M_rowIndices
private

Definition at line 269 of file ETMatrixElemental.hpp.

◆ M_columnIndices

std::vector<Int> M_columnIndices
private

Definition at line 270 of file ETMatrixElemental.hpp.

◆ M_nbRow

UInt M_nbRow
private

Definition at line 273 of file ETMatrixElemental.hpp.

◆ M_nbColumn

UInt M_nbColumn
private

Definition at line 275 of file ETMatrixElemental.hpp.

◆ M_rawData

Real** M_rawData
private

Definition at line 278 of file ETMatrixElemental.hpp.


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