1 #ifndef SELDON_FILE_HYPRE_HXX
4 #include "HYPRE_parcsr_ls.h"
5 #include "_hypre_parcsr_mv.h"
20 HYPRE_ParCSRMatrix parcsr_A;
28 HYPRE_ParVector par_x;
29 HYPRE_ParVector par_b;
55 int amg_max_levels, amg_num_sweeps, amg_smoother;
58 HYPRE_Real sai_filter, sai_threshold;
59 int sai_max_levels, sai_sym;
64 HYPRE_Real euclid_threshold, euclid_droptol;
69 enum {BOOMER_AMG, PARASAILS, EUCLID, AMS};
72 enum {JACOBI=0, GS_SEQ=1, GS_PAR_SEQ=2, HYBRID_GS_BACKWARD=3, HYBRID_GS_FORWARD=4,
73 HYBRID_GS_SYMMETRIC=6, L1_GAUSS_SEIDEL=8, CHEBYSHEV=16, FCF_JACOBI=17, L1_JACOBI=18};
91 template<
class Prop,
class Storage,
class Allocator>
93 bool keep_matrix =
false);
98 Vector<int>& cols, Vector<HYPRE_Complex>& values);
102 void Solve(
const SeldonTranspose& trans,
const VirtualMatrix<T>&
A,
103 const Vector<T>& r, Vector<T>& z);
105 void Solve(
const VirtualMatrix<T>&
A,
const Vector<T>& r, Vector<T>& z);
106 void TransSolve(
const VirtualMatrix<T>&
A,
const Vector<T>& r, Vector<T>& z);
113 #define SELDON_FILE_HYPRE_HXX
HYPRE_IJVector vec_b
intermediary vectors x and b
~HyprePreconditioner()
destructor
Vector< int > local_rows
row numbers of original rows (that belong to only one processor) In Seldon row numbers can be shared,...
void TransSolve(const VirtualMatrix< T > &A, const Vector< T > &r, Vector< T > &z)
applies transpose preconditioning
HyprePreconditioner()
default constructor
MPI_Comm comm
MPI communicator.
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
void SetInputPreconditioning(const string &, const Vector< string > &)
sets parameters from a keyword and associated parameters
void SetLevelEuclid(int lvl)
sets the level k of ILU(k) factorization
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)
int nodl_scalar
number of rows for an unknown and the number of unknowns
Vector< Vector< int > > * DofNumber
list of rows implied in the assembling step
void SetSmoother(int type)
sets smoother to use for AMG
class interfacing Hypre with Seldon (as a preconditioner)
void Clear()
erases the current object
void SetPreconditioner(int type)
sets which preconditioning to use (among choices proposed in hypre)
HYPRE_IJMatrix A
distributed matrix stored as in hypre
HYPRE_Solver solver
hypre solver
int print_level
verbose level
void ConstructPreconditioner(DistributedMatrix< HYPRE_Complex, Prop, Storage, Allocator > &A0, bool keep_matrix=false)
main function constructing hypre preconditioning from a given sparse matrix
Vector< int > * ProcNumber
list of processors implied in the assembling step
void ShowMessages()
shows informations about preconditioning
int type_preconditioner
hypre preconditioning selected
Base class for preconditioners.