36 [[nodiscard]] HYPRE_IJMatrix
A() {
return m_mat; }
39 [[nodiscard]] HYPRE_IJVector
b() {
return m_rhs; }
42 [[nodiscard]] HYPRE_IJVector
x() {
return m_sln; }
53 void init_preconditioner(
const std::string& prefix,
const std::string& name);
54 void init_solver(
const std::string& prefix,
const std::string& name);
57 void run_hypre_setup();
58 void run_hypre_solve();
61 void boomeramg_precond_configure(
const std::string& prefix);
62 void euclid_precond_configure(
const std::string& prefix);
63 void ilu_precond_configure(
const std::string& prefix);
66 void boomeramg_solver_configure(
const std::string& prefix);
67 void gmres_solver_configure(
const std::string& prefix);
68 void cogmres_solver_configure(
const std::string& prefix);
69 void lgmres_solver_configure(
const std::string& prefix);
70 void flex_gmres_solver_configure(
const std::string& prefix);
71 void bicgstab_solver_configure(
const std::string& prefix);
72 void pcg_solver_configure(
const std::string& prefix);
73 void hybrid_solver_configure(
const std::string& prefix);
78 HYPRE_IJMatrix m_mat{
nullptr};
79 HYPRE_IJVector m_rhs{
nullptr};
80 HYPRE_IJVector m_sln{
nullptr};
82 HYPRE_ParCSRMatrix m_parA{
nullptr};
83 HYPRE_ParVector m_parRhs{
nullptr};
84 HYPRE_ParVector m_parSln{
nullptr};
86 HYPRE_Solver m_solver{
nullptr};
87 HYPRE_Solver m_precond{
nullptr};
89 HypreIntType (*m_solverDestroyPtr)(HYPRE_Solver){
nullptr};
91 HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector){
nullptr};
93 HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector){
nullptr};
96 HYPRE_PtrToParSolverFcn,
97 HYPRE_PtrToParSolverFcn,
98 HYPRE_Solver){
nullptr};
100 HypreIntType (*m_precondDestroyPtr)(HYPRE_Solver){
nullptr};
102 HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector){
nullptr};
104 HYPRE_Solver, HYPRE_ParCSRMatrix, HYPRE_ParVector, HYPRE_ParVector){
nullptr};
118 std::string m_solver_name{
"BoomerAMG"};
119 std::string m_preconditioner_name{
"none"};
120 std::string m_file_prefix{
"IJ"};
125 unsigned int m_write_counter{0};
128 bool m_has_preconditioner{
false};
131 bool m_need_setup{
true};
134 bool m_recompute_preconditioner{
true};
137 bool m_adjust_singular_matrix{
false};
140 bool m_write_files{
false};
143 bool m_overwrite_files{
true};
HypreIntType getNumIters() const
Number of iterations taken by the solver to reach the desired tolerance.
Definition AMReX_HypreIJIface.H:45