ParGeMSLR
Public Member Functions | Public Attributes | List of all members
pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > Class Template Reference

Class of matvec for low-rank correction, not necessarily EB^{-1}FC^{-1}. More...

#include <parallel_gemslr.hpp>

Public Member Functions

 ParallelGemslrEBFCMatrixClass ()
 The constructor of ParallelGemslrEBFCMatrixClass. More...
 
virtual ~ParallelGemslrEBFCMatrixClass ()
 The destructor of ParallelGemslrEBFCMatrixClass. More...
 
 ParallelGemslrEBFCMatrixClass (const ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &precond)
 The copy constructor of ParallelGemslrEBFCMatrixClass. More...
 
 ParallelGemslrEBFCMatrixClass (ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &&precond)
 The move constructor of ParallelGemslrEBFCMatrixClass. More...
 
ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > & operator= (const ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &precond)
 The operator = of ParallelGemslrEBFCMatrixClass. More...
 
ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > & operator= (ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &&precond)
 The operator = of ParallelGemslrEBFCMatrixClass. More...
 
int Setup (int level, int option, ParallelGemslrClass< MatrixType, VectorType, DataType > &gemslr)
 Set the current matrix to a certain GEMSLR level. More...
 
int SetupVectorPtrStr (VectorType &v)
 Set the structure of a vector pointer that has same row partition as this matrix. More...
 
int Clear ()
 Free the current matrix. More...
 
int GetNumRowsLocal ()
 Get the local number of rows of the matrix. More...
 
int GetNumColsLocal ()
 Get the local number of columns of the matrix. More...
 
int MatVec (char trans, const DataType &alpha, VectorType &x, const DataType &beta, VectorType &y)
 In place csr Matrix-Vector product ==> y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y. More...
 
int GetMpiInfo (int &np, int &myid, MPI_Comm &comm) const
 Get comm, np, and myid. Get the global one. More...
 
MPI_Comm GetComm () const
 Get the MPI_comm. More...
 
int GetDataLocation () const
 Get the data location of the matrix. More...
 

Public Attributes

VectorType _temp_v
 Temp vector for the Arnoldi. More...
 

Detailed Description

template<class MatrixType, class VectorType, typename DataType>
class pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >

Class of matvec for low-rank correction, not necessarily EB^{-1}FC^{-1}. kGemslrGlobalPrecondESMSLR, kGemslrGlobalPrecondGeMSLR, kGemslrGlobalPrecondPSLR

Constructor & Destructor Documentation

◆ ParallelGemslrEBFCMatrixClass() [1/3]

template<class MatrixType , class VectorType , typename DataType >
template pargemslr::precond_gemslrebfc_csr_par_complexd::ParallelGemslrEBFCMatrixClass ( )

The constructor of ParallelGemslrEBFCMatrixClass. The default memory location is the host memory.

◆ ~ParallelGemslrEBFCMatrixClass()

template<class MatrixType , class VectorType , typename DataType >
template pargemslr::precond_gemslrebfc_csr_par_complexd::~ParallelGemslrEBFCMatrixClass ( )
virtual

The destructor of ParallelGemslrEBFCMatrixClass. Simply a call to the free function.

◆ ParallelGemslrEBFCMatrixClass() [2/3]

template<class MatrixType , class VectorType , typename DataType >
pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::ParallelGemslrEBFCMatrixClass ( const ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &  precond)

The copy constructor of ParallelGemslrEBFCMatrixClass.

◆ ParallelGemslrEBFCMatrixClass() [3/3]

template<class MatrixType , class VectorType , typename DataType >
pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::ParallelGemslrEBFCMatrixClass ( ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &&  precond)

The move constructor of ParallelGemslrEBFCMatrixClass.

Member Function Documentation

◆ Clear()

template<class MatrixType , class VectorType , typename DataType >
template int pargemslr::precond_gemslrebfc_csr_par_complexd::Clear ( )

Free the current matrix.

Returns
Return error message.

◆ GetComm()

template<class MatrixType , class VectorType , typename DataType >
MPI_Comm pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::GetComm ( ) const
inline

Get the MPI_comm.

Returns
Return the MPI_comm.

◆ GetDataLocation()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::GetDataLocation ( ) const
inline

Get the data location of the matrix.

Returns
Return the length of the matrix.

◆ GetMpiInfo()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::GetMpiInfo ( int &  np,
int &  myid,
MPI_Comm &  comm 
) const
inline

Get comm, np, and myid. Get the global one.

Parameters
[in]npThe number of processors.
[in]myidThe local MPI rank number.
[in]commThe MPI_Comm.
Returns
Return error message.

◆ GetNumColsLocal()

template<class MatrixType , class VectorType , typename DataType >
template int pargemslr::precond_gemslrebfc_csr_par_complexd::GetNumColsLocal ( )

Get the local number of columns of the matrix.

Returns
Return the number of columns of the matrix.

◆ GetNumRowsLocal()

template<class MatrixType , class VectorType , typename DataType >
template int pargemslr::precond_gemslrebfc_csr_par_complexd::GetNumRowsLocal ( )

Get the local number of rows of the matrix.

Returns
Return the number of rows of the matrix.

◆ MatVec()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::MatVec ( char  trans,
const DataType &  alpha,
VectorType &  x,
const DataType &  beta,
VectorType &  y 
)

In place csr Matrix-Vector product ==> y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y.

Parameters
[in]transWhether or not transpose matrix A.
[in]alphaThe alpha value.
[in]xThe left vector.
[in]betaThe beta value.
[in,out]yThe product vector.
Returns
Return error message.

◆ operator=() [1/2]

template<class MatrixType , class VectorType , typename DataType >
ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > & pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::operator= ( const ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &  precond)

The operator = of ParallelGemslrEBFCMatrixClass.

◆ operator=() [2/2]

template<class MatrixType , class VectorType , typename DataType >
ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > & pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::operator= ( ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType > &&  precond)

The operator = of ParallelGemslrEBFCMatrixClass.

◆ Setup()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::Setup ( int  level,
int  option,
ParallelGemslrClass< MatrixType, VectorType, DataType > &  gemslr 
)

Set the current matrix to a certain GEMSLR level.

Parameters
[in]levelThe level.
[in]optionThe matvec option.
[in]gemslrThe GeMSLR structure.
Returns
Return error message.

◆ SetupVectorPtrStr()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::SetupVectorPtrStr ( VectorType &  v)

Set the structure of a vector pointer that has same row partition as this matrix.

Parameters
[in,out]vThe target vector.
Returns
Return error message.

Member Data Documentation

◆ _temp_v

template<class MatrixType , class VectorType , typename DataType >
VectorType pargemslr::ParallelGemslrEBFCMatrixClass< MatrixType, VectorType, DataType >::_temp_v

Temp vector for the Arnoldi.


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