PARALUTION  1.0.0
PARALUTION
paralution::MultiColoredSGS< OperatorType, VectorType, ValueType > Class Template Reference

#include <preconditioner_multicolored_gs.hpp>

Inheritance diagram for paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >:
paralution::MultiColored< OperatorType, VectorType, ValueType > paralution::Preconditioner< OperatorType, VectorType, ValueType > paralution::Solver< OperatorType, VectorType, ValueType > paralution::ParalutionObj paralution::MultiColoredGS< OperatorType, VectorType, ValueType >

Public Member Functions

 MultiColoredSGS ()
 
virtual ~MultiColoredSGS ()
 
virtual void Print (void) const
 Print information about the solver. More...
 
virtual void ReBuildNumeric (void)
 Rebuild only with numerical computation (no allocation or data structure computation) More...
 
virtual void SetRelaxation (const ValueType omega)
 Set the relaxation parameter for the SOR/SSOR scheme. More...
 
virtual void Clear (void)
 Clear (free all local data) the solver. More...
 
virtual void Build (void)
 Build the solver (data allocation, structure computation, numerical computation) More...
 
virtual void SetPrecondMatrixFormat (const unsigned int mat_format)
 Set a specific matrix type of the decomposed block matrices; if not set, CSR matrix format will be used. More...
 
virtual void SetDecomposition (const bool decomp)
 Set if the preconditioner should be decomposed or not. More...
 
virtual void Solve (const VectorType &rhs, VectorType *x)
 Solve Operator x = rhs. More...
 
virtual void SolveZeroSol (const VectorType &rhs, VectorType *x)
 Solve Operator x = rhs; but set first the init x = 0. More...
 
void SetOperator (const OperatorType &op)
 Set the Operator of the solver. More...
 
virtual void ResetOperator (const OperatorType &op)
 Reset the operator; see ReBuildNumeric. More...
 
virtual void MoveToHost (void)
 Move all the data (i.e. move the solver) to the host. More...
 
virtual void MoveToAccelerator (void)
 Move all the data (i.e. move the solver) to the accelerator. More...
 
virtual void Verbose (const int verb=1)
 Provide verbose output of the solver: verb == 0 no output verb == 1 print info about the solver (start,end); verb == 2 print (iter, residual) via iteration control;. More...
 

Protected Member Functions

virtual void PostAnalyse_ (void)
 Post-analyzing if the preconditioner is not decomposed. More...
 
virtual void SolveL_ (void)
 Solve the lower-triangular (left) matrix. More...
 
virtual void SolveD_ (void)
 Solve the diagonal part (only for SGS) More...
 
virtual void SolveR_ (void)
 Solve the upper-trianguler (right) matrix. More...
 
virtual void Solve_ (const VectorType &rhs, VectorType *x)
 Solve directly without block decomposition. More...
 
virtual void ExtractRHSinX_ (const VectorType &rhs, VectorType *x)
 Extract the rhs into x under the permutation (see Analyse_()) and decompose x into block (x_block_[]) More...
 
virtual void InsertSolution_ (VectorType *x)
 Insert the solution with backward permutation (from x_block_[]) More...
 
virtual void Build_Analyser_ (void)
 Build the analyzing matrix. More...
 
virtual void Analyse_ (void)
 Analyse the matrix (i.e. multi-coloring decomposition) More...
 
virtual void Permute_ (void)
 Permute the preconditioning matrix. More...
 
virtual void Factorize_ (void)
 Factorize (i.e. build the preconditioner) More...
 
virtual void Decompose_ (void)
 Decompose the structure into blocks (preconditioner_block_[] for the preconditioning matrix; and x_block_[] for the x vector) More...
 
virtual void MoveToHostLocalData_ (void)
 Move all local data to the host. More...
 
virtual void MoveToAcceleratorLocalData_ (void)
 Move all local data to the accelerator. More...
 
virtual void PrintStart_ (void) const
 Print starting msg of the solver. More...
 
virtual void PrintEnd_ (void) const
 Print ending msg of the solver. More...
 

Protected Attributes

ValueType omega_
 
OperatorType * analyzer_op_
 
OperatorType * preconditioner_
 
OperatorType *** preconditioner_block_
 
VectorType ** x_block_
 
VectorType ** diag_block_
 
VectorType x_
 
VectorType diag_
 
Solver< OperatorType, VectorType, ValueType > ** diag_solver_
 
int num_blocks_
 
intblock_sizes_
 
bool op_mat_format_
 Keep the precond matrix in CSR or not. More...
 
unsigned int precond_mat_format_
 Precond matrix format. More...
 
bool decomp_
 Decompose the preconditioner into blocks or not. More...
 
const OperatorType * op_
 Pointer to the operator. More...
 
Solver< OperatorType, VectorType, ValueType > * precond_
 Pointer to the defined preconditioner. More...
 
bool build_
 Flag == true after building the solver (e.g. Build()) More...
 
LocalVector< intpermutation_
 Permutation vector (used if the solver performs permutation/re-ordering techniques) More...
 
int verb_
 Verbose flag verb == 0 no output verb == 1 print info about the solver (start,end); verb == 2 print (iter, residual) via iteration control;. More...
 
size_t global_obj_id
 

Constructor & Destructor Documentation

template<class OperatorType , class VectorType , typename ValueType >
paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::MultiColoredSGS ( )
template<class OperatorType , class VectorType , typename ValueType >
paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::~MultiColoredSGS ( )
virtual

Member Function Documentation

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::Analyse_ ( void  )
protectedvirtualinherited

Analyse the matrix (i.e. multi-coloring decomposition)

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::Build ( void  )
virtualinherited

Build the solver (data allocation, structure computation, numerical computation)

Reimplemented from paralution::Solver< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::Build_Analyser_ ( void  )
protectedvirtualinherited

Build the analyzing matrix.

Reimplemented in paralution::MultiColoredILU< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::Clear ( void  )
virtualinherited

Clear (free all local data) the solver.

Reimplemented from paralution::Solver< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::Decompose_ ( void  )
protectedvirtualinherited

Decompose the structure into blocks (preconditioner_block_[] for the preconditioning matrix; and x_block_[] for the x vector)

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::ExtractRHSinX_ ( const VectorType &  rhs,
VectorType *  x 
)
protectedvirtualinherited

Extract the rhs into x under the permutation (see Analyse_()) and decompose x into block (x_block_[])

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::Factorize_ ( void  )
protectedvirtualinherited

Factorize (i.e. build the preconditioner)

Reimplemented in paralution::MultiColoredILU< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::InsertSolution_ ( VectorType *  x)
protectedvirtualinherited

Insert the solution with backward permutation (from x_block_[])

template<class OperatorType , class VectorType , typename ValueType >
void paralution::Solver< OperatorType, VectorType, ValueType >::MoveToAccelerator ( void  )
virtualinherited

Move all the data (i.e. move the solver) to the accelerator.

Referenced by main(), mexFunction(), and paralution_fortran_solve().

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::MoveToAcceleratorLocalData_ ( void  )
protectedvirtualinherited

Move all local data to the accelerator.

Implements paralution::Solver< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::Solver< OperatorType, VectorType, ValueType >::MoveToHost ( void  )
virtualinherited

Move all the data (i.e. move the solver) to the host.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::MoveToHostLocalData_ ( void  )
protectedvirtualinherited

Move all local data to the host.

Implements paralution::Solver< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::Permute_ ( void  )
protectedvirtualinherited

Permute the preconditioning matrix.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::PostAnalyse_ ( void  )
protectedvirtual

Post-analyzing if the preconditioner is not decomposed.

Reimplemented from paralution::MultiColored< OperatorType, VectorType, ValueType >.

Reimplemented in paralution::MultiColoredGS< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::Print ( void  ) const
virtual
template<class OperatorType , class VectorType , typename ValueType >
void paralution::Preconditioner< OperatorType, VectorType, ValueType >::PrintEnd_ ( void  ) const
protectedvirtualinherited

Print ending msg of the solver.

Implements paralution::Solver< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::Preconditioner< OperatorType, VectorType, ValueType >::PrintStart_ ( void  ) const
protectedvirtualinherited

Print starting msg of the solver.

Implements paralution::Solver< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::ReBuildNumeric ( void  )
virtual

Rebuild only with numerical computation (no allocation or data structure computation)

Reimplemented from paralution::Solver< OperatorType, VectorType, ValueType >.

template<class OperatorType, class VectorType , typename ValueType >
void paralution::Solver< OperatorType, VectorType, ValueType >::ResetOperator ( const OperatorType &  op)
virtualinherited
template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::SetDecomposition ( const bool  decomp)
virtualinherited

Set if the preconditioner should be decomposed or not.

template<class OperatorType, class VectorType , typename ValueType >
void paralution::Solver< OperatorType, VectorType, ValueType >::SetOperator ( const OperatorType &  op)
inherited
template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::SetPrecondMatrixFormat ( const unsigned int  mat_format)
virtualinherited

Set a specific matrix type of the decomposed block matrices; if not set, CSR matrix format will be used.

Referenced by paralution::AMG< OperatorType, VectorType, ValueType >::BuildSmoothers(), main(), and paralution_fortran_solve().

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::SetRelaxation ( const ValueType  omega)
virtual

Set the relaxation parameter for the SOR/SSOR scheme.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColored< OperatorType, VectorType, ValueType >::Solve ( const VectorType &  rhs,
VectorType *  x 
)
virtualinherited
template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::Solve_ ( const VectorType &  rhs,
VectorType *  x 
)
protectedvirtual
template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::SolveD_ ( void  )
protectedvirtual
template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::SolveL_ ( void  )
protectedvirtual
template<class OperatorType , class VectorType , typename ValueType >
void paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::SolveR_ ( void  )
protectedvirtual
template<class OperatorType , class VectorType, typename ValueType >
void paralution::Preconditioner< OperatorType, VectorType, ValueType >::SolveZeroSol ( const VectorType &  rhs,
VectorType *  x 
)
virtualinherited

Solve Operator x = rhs; but set first the init x = 0.

Reimplemented from paralution::Solver< OperatorType, VectorType, ValueType >.

template<class OperatorType , class VectorType , typename ValueType >
void paralution::Solver< OperatorType, VectorType, ValueType >::Verbose ( const int  verb = 1)
virtualinherited

Field Documentation

template<class OperatorType, class VectorType, typename ValueType>
OperatorType* paralution::MultiColored< OperatorType, VectorType, ValueType >::analyzer_op_
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
int* paralution::MultiColored< OperatorType, VectorType, ValueType >::block_sizes_
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
bool paralution::Solver< OperatorType, VectorType, ValueType >::build_
protectedinherited

Flag == true after building the solver (e.g. Build())

template<class OperatorType, class VectorType, typename ValueType>
bool paralution::MultiColored< OperatorType, VectorType, ValueType >::decomp_
protectedinherited

Decompose the preconditioner into blocks or not.

template<class OperatorType, class VectorType, typename ValueType>
VectorType paralution::MultiColored< OperatorType, VectorType, ValueType >::diag_
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
VectorType** paralution::MultiColored< OperatorType, VectorType, ValueType >::diag_block_
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
Solver<OperatorType, VectorType, ValueType>** paralution::MultiColored< OperatorType, VectorType, ValueType >::diag_solver_
protectedinherited
size_t paralution::ParalutionObj::global_obj_id
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
int paralution::MultiColored< OperatorType, VectorType, ValueType >::num_blocks_
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
ValueType paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >::omega_
protected
template<class OperatorType, class VectorType, typename ValueType>
const OperatorType* paralution::Solver< OperatorType, VectorType, ValueType >::op_
protectedinherited

Pointer to the operator.

template<class OperatorType, class VectorType, typename ValueType>
bool paralution::MultiColored< OperatorType, VectorType, ValueType >::op_mat_format_
protectedinherited

Keep the precond matrix in CSR or not.

template<class OperatorType, class VectorType, typename ValueType>
LocalVector<int> paralution::Solver< OperatorType, VectorType, ValueType >::permutation_
protectedinherited

Permutation vector (used if the solver performs permutation/re-ordering techniques)

template<class OperatorType, class VectorType, typename ValueType>
Solver<OperatorType, VectorType, ValueType>* paralution::Solver< OperatorType, VectorType, ValueType >::precond_
protectedinherited

Pointer to the defined preconditioner.

template<class OperatorType, class VectorType, typename ValueType>
unsigned int paralution::MultiColored< OperatorType, VectorType, ValueType >::precond_mat_format_
protectedinherited

Precond matrix format.

template<class OperatorType, class VectorType, typename ValueType>
OperatorType* paralution::MultiColored< OperatorType, VectorType, ValueType >::preconditioner_
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
OperatorType*** paralution::MultiColored< OperatorType, VectorType, ValueType >::preconditioner_block_
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
int paralution::Solver< OperatorType, VectorType, ValueType >::verb_
protectedinherited

Verbose flag verb == 0 no output verb == 1 print info about the solver (start,end); verb == 2 print (iter, residual) via iteration control;.

template<class OperatorType, class VectorType, typename ValueType>
VectorType paralution::MultiColored< OperatorType, VectorType, ValueType >::x_
protectedinherited
template<class OperatorType, class VectorType, typename ValueType>
VectorType** paralution::MultiColored< OperatorType, VectorType, ValueType >::x_block_
protectedinherited

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