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

Class of matvec EB^{-1}FC^{-1}. More...

#include <gemslr.hpp>

Public Member Functions

 GemslrSchurMatrixClass ()
 The constructor of GemslrEBFCMatrixClass. More...
 
virtual ~GemslrSchurMatrixClass ()
 The destructor of GemslrEBFCMatrixClass. More...
 
 GemslrSchurMatrixClass (const GemslrSchurMatrixClass< MatrixType, VectorType, DataType > &precond)
 The copy constructor of GemslrSchurMatrixClass. More...
 
 GemslrSchurMatrixClass (GemslrSchurMatrixClass< MatrixType, VectorType, DataType > &&precond)
 The move constructor of GemslrSchurMatrixClass. More...
 
GemslrSchurMatrixClass< MatrixType, VectorType, DataType > & operator= (const GemslrSchurMatrixClass< MatrixType, VectorType, DataType > &precond)
 The operator = of GemslrSchurMatrixClass. More...
 
GemslrSchurMatrixClass< MatrixType, VectorType, DataType > & operator= (GemslrSchurMatrixClass< MatrixType, VectorType, DataType > &&precond)
 The operator = of GemslrSchurMatrixClass. More...
 
int Setup (int level, GemslrClass< 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 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 Solve (VectorType &x, VectorType &rhs)
 Solve phase. Call this function after Setup. Solve with cusparse if unified memory/device memory is used. 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...
 

Public Attributes

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

Detailed Description

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

Class of matvec EB^{-1}FC^{-1}.

Constructor & Destructor Documentation

◆ GemslrSchurMatrixClass() [1/3]

template<class MatrixType , class VectorType , typename DataType >
template pargemslr::precond_gemslr_schur_seq_complexd::GemslrSchurMatrixClass ( )

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

◆ ~GemslrSchurMatrixClass()

template<class MatrixType , class VectorType , typename DataType >
template pargemslr::precond_gemslr_schur_seq_complexd::~GemslrSchurMatrixClass ( )
virtual

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

◆ GemslrSchurMatrixClass() [2/3]

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

The copy constructor of GemslrSchurMatrixClass.

◆ GemslrSchurMatrixClass() [3/3]

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

The move constructor of GemslrSchurMatrixClass.

Member Function Documentation

◆ Clear()

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

Free the current matrix.

Returns
Return error message.

◆ GetComm()

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

Get the MPI_comm.

Returns
Return the MPI_comm.

◆ GetMpiInfo()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::GemslrSchurMatrixClass< 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.

◆ MatVec()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::GemslrSchurMatrixClass< 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 >
GemslrSchurMatrixClass< MatrixType, VectorType, DataType > & pargemslr::GemslrSchurMatrixClass< MatrixType, VectorType, DataType >::operator= ( const GemslrSchurMatrixClass< MatrixType, VectorType, DataType > &  precond)

The operator = of GemslrSchurMatrixClass.

◆ operator=() [2/2]

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

The operator = of GemslrSchurMatrixClass.

◆ Setup()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::GemslrSchurMatrixClass< MatrixType, VectorType, DataType >::Setup ( int  level,
GemslrClass< MatrixType, VectorType, DataType > &  gemslr 
)

Set the current matrix to a certain GEMSLR level.

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

◆ SetupVectorPtrStr()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::GemslrSchurMatrixClass< 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.

◆ Solve()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::GemslrSchurMatrixClass< MatrixType, VectorType, DataType >::Solve ( VectorType &  x,
VectorType &  rhs 
)

Solve phase. Call this function after Setup. Solve with cusparse if unified memory/device memory is used.

Parameters
[in,out]xThe initial guess.
[in]rhsThe right-hand-side.
Returns
Return error message.

Member Data Documentation

◆ _temp_v

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

Temp vector for the Arnoldi.


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