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

Class of matvec with the Schur Complement. More...

#include <parallel_gemslr.hpp>

Public Member Functions

 ParallelGemslrSchurMatrixClass ()
 The constructor of ParallelGemslrSchurMatrixClass. More...
 
 ParallelGemslrSchurMatrixClass (const ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType > &precond)
 The copy constructor of ParallelGemslrSchurMatrixClass. More...
 
 ParallelGemslrSchurMatrixClass (ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType > &&precond)
 The move constructor of ParallelGemslrSchurMatrixClass. More...
 
ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType > & operator= (const ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType > &precond)
 The operator = of ParallelGemslrSchurMatrixClass. More...
 
ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType > & operator= (ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType > &&precond)
 The operator = of ParallelGemslrSchurMatrixClass. More...
 
virtual ~ParallelGemslrSchurMatrixClass ()
 The destructor of GemslrEBFCMatrixClass. 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 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::ParallelGemslrSchurMatrixClass< MatrixType, VectorType, DataType >

Class of matvec with the Schur Complement.

Constructor & Destructor Documentation

◆ ParallelGemslrSchurMatrixClass() [1/3]

template<class MatrixType , class VectorType , typename DataType >
template pargemslr::precond_gemslr_schur_par_complexd::ParallelGemslrSchurMatrixClass ( )

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

◆ ParallelGemslrSchurMatrixClass() [2/3]

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

The copy constructor of ParallelGemslrSchurMatrixClass.

◆ ParallelGemslrSchurMatrixClass() [3/3]

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

The move constructor of ParallelGemslrSchurMatrixClass.

◆ ~ParallelGemslrSchurMatrixClass()

template<class MatrixType , class VectorType , typename DataType >
template pargemslr::precond_gemslr_schur_par_complexd::~ParallelGemslrSchurMatrixClass ( )
virtual

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

Member Function Documentation

◆ Clear()

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

Free the current matrix.

Returns
Return error message.

◆ GetComm()

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

The operator = of ParallelGemslrSchurMatrixClass.

◆ operator=() [2/2]

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

The operator = of ParallelGemslrSchurMatrixClass.

◆ Setup()

template<class MatrixType , class VectorType , typename DataType >
int pargemslr::ParallelGemslrSchurMatrixClass< 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 option.
[in]gemslrThe GeMSLR structure.
Returns
Return error message.

◆ SetupVectorPtrStr()

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

Temp vector for the Arnoldi.


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