Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Seldon::HyprePreconditioner< T > Class Template Reference

class interfacing Hypre with Seldon (as a preconditioner) More...

#include <Hypre.hxx>

Inheritance diagram for Seldon::HyprePreconditioner< T >:
Seldon::Preconditioner_Base< T >

Public Types

enum  { BOOMER_AMG, PARASAILS, EUCLID, AMS }
 available interfaced preconditionings in Hypre (for CSR matrices)
 
enum  {
  JACOBI =0, GS_SEQ =1, GS_PAR_SEQ =2, HYBRID_GS_BACKWARD =3,
  HYBRID_GS_FORWARD =4, HYBRID_GS_SYMMETRIC =6, L1_GAUSS_SEIDEL =8, CHEBYSHEV =16,
  FCF_JACOBI =17, L1_JACOBI =18
}
 available smoothers
 

Public Member Functions

 HyprePreconditioner ()
 default constructor
 
 ~HyprePreconditioner ()
 destructor
 
void Clear ()
 erases the current object
 
void SetPreconditioner (int type)
 sets which preconditioning to use (among choices proposed in hypre)
 
void SetSmoother (int type)
 sets smoother to use for AMG
 
void SetLevelEuclid (int lvl)
 sets the level k of ILU(k) factorization
 
void ShowMessages ()
 shows informations about preconditioning
 
void SetInputPreconditioning (const string &, const Vector< string > &)
 sets parameters from a keyword and associated parameters
 
template<class Prop , class Storage , class Allocator >
void ConstructPreconditioner (DistributedMatrix< HYPRE_Complex, Prop, Storage, Allocator > &A0, bool keep_matrix=false)
 main function constructing hypre preconditioning from a given sparse matrix
 
void Solve (const SeldonTranspose &trans, const VirtualMatrix< T > &A, const Vector< T > &r, Vector< T > &z)
 applies preconditioning z = M r (or its transpose z = M^T r)
 
void Solve (const VirtualMatrix< T > &A, const Vector< T > &r, Vector< T > &z)
 applies preconditioning
 
void TransSolve (const VirtualMatrix< T > &A, const Vector< T > &r, Vector< T > &z)
 applies transpose preconditioning
 
template<class Matrix1 , class Vector1 >
void Solve (const Matrix1 &A, const Vector1 &r, Vector1 &z)
 Solves M z = r. More...
 
template<class Matrix1 , class Vector1 >
void TransSolve (const Matrix1 &A, const Vector1 &r, Vector1 &z)
 Solves M^t z = r. More...
 

Protected Member Functions

void FinalizePreconditioner (Vector< int > &row_numbers, Vector< long > &size_rows, Vector< int > &cols, Vector< HYPRE_Complex > &values)
 internal function to finalize the computation of preconditioning
 

Protected Attributes

HYPRE_IJMatrix A
 distributed matrix stored as in hypre
 
HYPRE_ParCSRMatrix parcsr_A
 
HYPRE_Solver solver
 hypre solver
 
bool solver_created
 
HYPRE_IJVector vec_b
 intermediary vectors x and b
 
HYPRE_IJVector vec_x
 
HYPRE_ParVector par_x
 
HYPRE_ParVector par_b
 
Vector< int > local_rows
 row numbers of original rows (that belong to only one processor) In Seldon row numbers can be shared, so we have to make the conversion between seldon vectors to "hypre" vectors (where the rows are not shared) through this array
 
Vector< int > * ProcNumber
 list of processors implied in the assembling step
 
Vector< Vector< int > > * DofNumber
 list of rows implied in the assembling step
 
int nodl_scalar
 number of rows for an unknown and the number of unknowns
 
int nb_u
 
MPI_Comm comm
 MPI communicator.
 
int print_level
 verbose level
 
int type_preconditioner
 hypre preconditioning selected
 
int amg_max_levels
 
int amg_num_sweeps
 
int amg_smoother
 
HYPRE_Real sai_filter
 
HYPRE_Real sai_threshold
 
int sai_max_levels
 
int sai_sym
 
int euclid_level
 
bool euclid_use_ilut
 
HYPRE_Real euclid_threshold
 
HYPRE_Real euclid_droptol
 

Detailed Description

template<class T>
class Seldon::HyprePreconditioner< T >

class interfacing Hypre with Seldon (as a preconditioner)

This class is declared template but can be used only for T = HYPRE_Complex

Definition at line 15 of file Hypre.hxx.

Member Function Documentation

◆ Solve()

template<class T >
template<class Matrix1 , class Vector1 >
void Seldon::Preconditioner_Base< T >::Solve ( const Matrix1 &  A,
const Vector1 &  r,
Vector1 &  z 
)
inlineinherited

Solves M z = r.

Identity preconditioner M = I

Definition at line 87 of file IterativeInline.cxx.

◆ TransSolve()

template<class T >
template<class Matrix1 , class Vector1 >
void Seldon::Preconditioner_Base< T >::TransSolve ( const Matrix1 &  A,
const Vector1 &  r,
Vector1 &  z 
)
inlineinherited

Solves M^t z = r.

Identity preconditioner M = I

Definition at line 99 of file IterativeInline.cxx.


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