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

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

#include <gemslr.hpp>

Inheritance diagram for pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >:
pargemslr::SolverClass< MatrixType, VectorType, DataType >

Public Member Functions

 GemslrSchurSolveClass ()
 The constructor of precondioner class. More...
 
 GemslrSchurSolveClass (const GemslrSchurSolveClass< MatrixType, VectorType, DataType > &precond)
 The copy constructor of GemslrSchurSolveClass class. More...
 
 GemslrSchurSolveClass (GemslrSchurSolveClass< MatrixType, VectorType, DataType > &&precond)
 The move constructor of GemslrSchurSolveClass class. More...
 
GemslrSchurSolveClass< MatrixType, VectorType, DataType > & operator= (const GemslrSchurSolveClass< MatrixType, VectorType, DataType > &precond)
 The operator = of GemslrSchurSolveClass class. More...
 
GemslrSchurSolveClass< MatrixType, VectorType, DataType > & operator= (GemslrSchurSolveClass< MatrixType, VectorType, DataType > &&precond)
 The operator = of GemslrSchurSolveClass class. More...
 
virtual int Clear ()
 Free the current precondioner. More...
 
virtual ~GemslrSchurSolveClass ()
 The destructor of precondioner class. More...
 
virtual int Setup (VectorType &x, VectorType &rhs)
 Setup the precondioner phase. Will be called by the solver if not called directly. More...
 
virtual int Solve (VectorType &x, VectorType &rhs)
 Solve phase. Call this function after Setup. Solve with cusparse if unified memory/device memory is used. More...
 
virtual long int GetNumNonzeros ()
 Get the total number of nonzeros the preconditioner. More...
 
virtual int SetSolveLocation (const int &location)
 Set the data location that the preconditioner apply to. More...
 
virtual int MoveData (const int &location)
 Move the preconditioner to another location. Only can be called after Setup. More...
 
virtual int SetWithParameterArray (double *params)
 Setup with parameter array. More...
 
- Public Member Functions inherited from pargemslr::SolverClass< MatrixType, VectorType, DataType >
 SolverClass ()
 The constructor of solver class. More...
 
 SolverClass (const SolverClass< MatrixType, VectorType, DataType > &solver)
 The copy constructor of solver class. More...
 
 SolverClass (SolverClass< MatrixType, VectorType, DataType > &&solver)
 The move constructor of solver class. More...
 
SolverClass< MatrixType, VectorType, DataType > & operator= (const SolverClass< MatrixType, VectorType, DataType > &solver)
 The = operator of solver class. More...
 
SolverClass< MatrixType, VectorType, DataType > & operator= (SolverClass< MatrixType, VectorType, DataType > &&solver)
 The = operator of solver class. More...
 
virtual ~SolverClass ()
 The destructor of solver class. More...
 
virtual int Solve (DenseMatrixClass< DataType > &x, DenseMatrixClass< DataType > &rhs)
 Solve phase with multiple right-hand-sides. Call this function after Setup. More...
 
MatrixType * GetMatrix ()
 Get pointer to the matrix. More...
 
SolverClass< MatrixType, VectorType, DataType > * GetPreconditioner ()
 Get pointer to the preconditioner. More...
 
int SetMatrix (MatrixType &matrix)
 Set the target matrix for the current solver. More...
 
int SetMatrixP (MatrixType *matrix)
 Set the target matrix for the current solver. More...
 
int SetPreconditioner (SolverClass< MatrixType, VectorType, DataType > &precond)
 Set the preconditioner for the current solver. More...
 
int SetPreconditionerP (SolverClass< MatrixType, VectorType, DataType > *precond)
 Set the preconditioner for the current solver. More...
 
bool IsReady () const
 Check if the solver is ready to be used. More...
 
int SetOwnMatrix (bool own_matrix)
 Set if the matrix is owned by this solver, if so, matrix is freed when free the solver. More...
 
int SetOwnPreconditioner (bool own_preconditioner)
 Set if the preconditioner is owned by this solver, if so, preconditioner is freed when free the solver. More...
 
int SetPrintOption (int print_option)
 Set the print option. More...
 
PrecisionEnum GerPrecision () const
 Get the precision. More...
 
SolverTypeEnum GetSolverType () const
 Get the solver type. More...
 

Additional Inherited Members

- Protected Member Functions inherited from pargemslr::SolverClass< MatrixType, VectorType, DataType >
int CheckReadySetups (const char *str) const
 Return error is the preconditioner is ready. More...
 
- Protected Attributes inherited from pargemslr::SolverClass< MatrixType, VectorType, DataType >
PrecisionEnum _solver_precision
 The precision of the solver. More...
 
SolverTypeEnum _solver_type
 The type of the solver. More...
 
bool _is_mixed
 Is the preconditioner a mixed precision preconditioner? More...
 
MatrixType * _matrix
 The matrix. More...
 
bool _own_matrix
 If the matrix is owned by this solver, default is false. More...
 
SolverClass< MatrixType, VectorType, DataType > * _preconditioner
 The preconditioner. More...
 
bool _own_preconditioner
 If the preconditioner is owned by this solver, default is false. More...
 
VectorType * _solution
 Pointer to the solution, note that this vector is not going to be freed. More...
 
VectorType * _right_hand_side
 Pointer to the right-hand-size, note that this vector is not going to be freed. More...
 
bool _ready
 If the solver is ready. More...
 
int _print_option
 The print option. More...
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ GemslrSchurSolveClass() [1/3]

template<class MatrixType , class VectorType , typename DataType >
pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >::GemslrSchurSolveClass ( )
inline

The constructor of precondioner class.

◆ GemslrSchurSolveClass() [2/3]

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

The copy constructor of GemslrSchurSolveClass class.

◆ GemslrSchurSolveClass() [3/3]

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

The move constructor of GemslrSchurSolveClass class.

◆ ~GemslrSchurSolveClass()

template<class MatrixType , class VectorType , typename DataType >
virtual pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >::~GemslrSchurSolveClass ( )
inlinevirtual

The destructor of precondioner class.

Member Function Documentation

◆ Clear()

template<class MatrixType , class VectorType , typename DataType >
virtual int pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >::Clear ( )
inlinevirtual

Free the current precondioner.

Returns
Return error message.

Reimplemented from pargemslr::SolverClass< MatrixType, VectorType, DataType >.

◆ GetNumNonzeros()

template<class MatrixType , class VectorType , typename DataType >
virtual long int pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >::GetNumNonzeros ( )
inlinevirtual

Get the total number of nonzeros the preconditioner.

Returns
Return the total number of nonzeros the preconditioner.

Reimplemented from pargemslr::SolverClass< MatrixType, VectorType, DataType >.

◆ MoveData()

template<class MatrixType , class VectorType , typename DataType >
virtual int pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >::MoveData ( const int &  location)
inlinevirtual

Move the preconditioner to another location. Only can be called after Setup.

Parameters
[in]locationThe target solver location.
Returns
Return error message.

◆ operator=() [1/2]

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

The operator = of GemslrSchurSolveClass class.

◆ operator=() [2/2]

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

The operator = of GemslrSchurSolveClass class.

◆ SetSolveLocation()

template<class MatrixType , class VectorType , typename DataType >
virtual int pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >::SetSolveLocation ( const int &  location)
inlinevirtual

Set the data location that the preconditioner apply to.

Parameters
[in]locationThe target solver location.
Returns
Return error message.

Implements pargemslr::SolverClass< MatrixType, VectorType, DataType >.

◆ Setup()

template<class MatrixType , class VectorType , typename DataType >
virtual int pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >::Setup ( VectorType &  x,
VectorType &  rhs 
)
inlinevirtual

Setup the precondioner phase. Will be called by the solver if not called directly.

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

Implements pargemslr::SolverClass< MatrixType, VectorType, DataType >.

◆ SetWithParameterArray()

template<class MatrixType , class VectorType , typename DataType >
virtual int pargemslr::GemslrSchurSolveClass< MatrixType, VectorType, DataType >::SetWithParameterArray ( double *  params)
inlinevirtual

Setup with parameter array.

Parameters
[in]paramsThe parameter array.
Returns
Return error message.

Reimplemented from pargemslr::SolverClass< MatrixType, VectorType, DataType >.

◆ Solve()

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

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.

Implements pargemslr::SolverClass< MatrixType, VectorType, DataType >.


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