File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,12 @@ def u_exact(x): return eval(str(u_ufl))
83
83
ksp = solver .krylov_solver
84
84
opts = PETSc .Options ()
85
85
option_prefix = ksp .getOptionsPrefix ()
86
- opts [f"{ option_prefix } ksp_type" ] = "cg"
87
- opts [f"{ option_prefix } pc_type" ] = "gamg"
88
- opts [f"{ option_prefix } pc_factor_mat_solver_type" ] = "mumps"
86
+ opts [f"{ option_prefix } ksp_type" ] = "gmres"
87
+ opts [f"{ option_prefix } ksp_rtol" ] = 1.0e-8
88
+ opts [f"{ option_prefix } pc_type" ] = "hypre"
89
+ opts [f"{ option_prefix } pc_hypre_type" ] = "boomeramg"
90
+ opts [f"{ option_prefix } pc_hypre_boomeramg_max_iter" ] = 1
91
+ opts [f"{ option_prefix } pc_hypre_boomeramg_cycle_type" ] = "v"
89
92
ksp .setFromOptions ()
90
93
91
94
# We are now ready to solve the non-linear problem. We assert that the solver has converged and print the number of iterations.
You can’t perform that action at this time.
0 commit comments