Version: 5.1.6

INTERP_KERNEL.Matrix< T, type > Class Template Reference

#include <InterpKernelMatrix.hxx>

Inheritance diagram for INTERP_KERNEL.Matrix< T, type >:
Inheritance graph

Data Structures

class  KeyComparator
class  Row

Public Types

typedef Row value_type

Public Member Functions

 Matrix ()
 Matrix (int nbrows)
 Matrix (std::vector< std::map< int, T > > &matrix)
 Matrix (const Matrix &m)
 ~Matrix ()
Matrixoperator= (const Matrix &m)
void resize (unsigned int nbrows)
void setIJ (int irow, int icol, T value)
void multiply (const T *const input, T *const output)
void multiply (const T *const input, T *const output, int nb_comp)
void transposeMultiply (const T *const input, T *const output, int nb_cols)
void transposeMultiply (const T *const input, T *const output, int nb_cols, int nb_comp)
void colSum (std::vector< T > &output, int nb_cols)
void rowSum (std::vector< T > &output)
void configure ()
Rowoperator[] (unsigned int irow)
int getNbRows ()

Private Attributes

unsigned int _nb_rows
T * _coeffs
unsigned int_cols
std::vector< unsigned int_ncols_offset
std::vector< Row_auxiliary_matrix
bool _is_configured

Friends

std::ostream & operator<< (std::ostream &in, const Matrix< T, type > &m)
std::istream & operator>> (std::istream &in, Matrix< T, type > &m)

template<class T, NumberingPolicy type = ALL_C_MODE>
class INTERP_KERNEL::Matrix< T, type >


Member Typedef Documentation

template<class T, NumberingPolicy type = ALL_C_MODE>
typedef Row INTERP_KERNEL.Matrix< T, type >.value_type

Constructor & Destructor Documentation

template<class T, NumberingPolicy type = ALL_C_MODE>
INTERP_KERNEL.Matrix< T, type >.Matrix (  ) 
template<class T, NumberingPolicy type = ALL_C_MODE>
INTERP_KERNEL.Matrix< T, type >.Matrix ( int  nbrows  ) 
template<class T, NumberingPolicy type = ALL_C_MODE>
INTERP_KERNEL.Matrix< T, type >.Matrix ( std::vector< std::map< int, T > > &  matrix  ) 
template<class T, NumberingPolicy type = ALL_C_MODE>
INTERP_KERNEL.Matrix< T, type >.Matrix ( const Matrix< T, type > &  m  ) 

Copy constructor

template<class T, NumberingPolicy type = ALL_C_MODE>
INTERP_KERNEL.Matrix< T, type >.~Matrix (  ) 

Member Function Documentation

template<class T, NumberingPolicy type = ALL_C_MODE>
Matrix& INTERP_KERNEL.Matrix< T, type >.operator= ( const Matrix< T, type > &  m  ) 
template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.resize ( unsigned int  nbrows  ) 

declares a method that specifies the number of rows

template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.setIJ ( int  irow,
int  icol,
value 
)

sets (i,j) coefficient to value

template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.multiply ( const T *const   input,
T *const   output 
)

Matrix multiplies vector input and stores the result in vector output. The vector pointed by input must be dimensioned to the number of columns while the vector pointed by output must be dimensioned to the number of rows.

template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.multiply ( const T *const   input,
T *const   output,
int  nb_comp 
)

Matrix multiplies vector input and stores the result in vector output. input and output are supposed to represent the same field discretised on two different on meshes. nb_comp is the number of components of the fields input and output The vector pointed by input must be dimensioned to the number of columns times nb_comp while the vector pointed by output must be dimensioned to the number of rows times nb_comp.

template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.transposeMultiply ( const T *const   input,
T *const   output,
int  nb_cols 
)

Transpose-multiplies vector input and stores the result in vector output. nb_cols is the number of columns of the matrix, (it is not an attribute of the class) The vector pointed by input must be dimensioned to the number of lines _nb_rows while the vector pointed by output must be dimensioned to the number of columns nb_cols.

template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.transposeMultiply ( const T *const   input,
T *const   output,
int  nb_cols,
int  nb_comp 
)

Transpose-multiplies vector input and stores the result in vector output. input and output are supposed to represent the same field discretised on two different on meshes. nb_comp is the number of components of the fields input and output nb_cols is the number of columns of the matrix, (it is not an attribute of the class) The vector pointed by input must be dimensioned to _nb_rows*nb_comp while the vector pointed by output must be dimensioned to nb_cols*nb_comp.

template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.colSum ( std::vector< T > &  output,
int  nb_cols 
)
template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.rowSum ( std::vector< T > &  output  ) 
template<class T, NumberingPolicy type = ALL_C_MODE>
void INTERP_KERNEL.Matrix< T, type >.configure (  ) 

This operation freezes the profile of the matrix and puts it under a CSR form so that it becomes efficient both in terms of memory occupation and in terms of multiplication

template<class T, NumberingPolicy type = ALL_C_MODE>
Row& INTERP_KERNEL.Matrix< T, type >.operator[] ( unsigned int  irow  ) 

0 <= irow < n

template<class T, NumberingPolicy type = ALL_C_MODE>
int INTERP_KERNEL.Matrix< T, type >.getNbRows (  ) 

Friends And Related Function Documentation

template<class T, NumberingPolicy type = ALL_C_MODE>
std::ostream& operator<< ( std::ostream &  in,
const Matrix< T, type > &  m 
) [friend]
template<class T, NumberingPolicy type = ALL_C_MODE>
std::istream& operator>> ( std::istream &  in,
Matrix< T, type > &  m 
) [friend]

Field Documentation

template<class T, NumberingPolicy type = ALL_C_MODE>
unsigned int INTERP_KERNEL.Matrix< T, type >._nb_rows [private]
template<class T, NumberingPolicy type = ALL_C_MODE>
T* INTERP_KERNEL.Matrix< T, type >._coeffs [private]
template<class T, NumberingPolicy type = ALL_C_MODE>
unsigned int* INTERP_KERNEL.Matrix< T, type >._cols [private]
template<class T, NumberingPolicy type = ALL_C_MODE>
std::vector<unsigned int> INTERP_KERNEL.Matrix< T, type >._ncols_offset [private]
template<class T, NumberingPolicy type = ALL_C_MODE>
std::vector< Row > INTERP_KERNEL.Matrix< T, type >._auxiliary_matrix [private]
template<class T, NumberingPolicy type = ALL_C_MODE>
bool INTERP_KERNEL.Matrix< T, type >._is_configured [private]