Skip to content

Commit

Permalink
More smothing to improve solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
JDBetteridge committed Sep 13, 2024
1 parent 0809e79 commit c7acec1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/multigrid/test_poisson_gmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@


def solver_parameters(solver_type):
max_its = 4
if solver_type == "mg":
parameters = {"snes_type": "ksponly",
"ksp_type": "preonly",
"mat_type": "aij",
"pc_type": "mg",
"pc_mg_type": "full",
"mg_levels_ksp_type": "chebyshev",
"mg_levels_ksp_max_it": 3,
"mg_levels_ksp_max_it": max_its,
"mg_levels_pc_type": "jacobi"}
elif solver_type == "mgmatfree":
parameters = {"snes_type": "ksponly",
Expand All @@ -25,7 +26,7 @@ def solver_parameters(solver_type):
"mg_coarse_pc_python_type": "firedrake.AssembledPC",
"mg_coarse_assembled_pc_type": "lu",
"mg_levels_ksp_type": "chebyshev",
"mg_levels_ksp_max_it": 3,
"mg_levels_ksp_max_it": max_its,
"mg_levels_pc_type": "jacobi"}
elif solver_type == "fas":
parameters = {"snes_type": "fas",
Expand All @@ -36,7 +37,7 @@ def solver_parameters(solver_type):
"fas_coarse_redundant_pc_type": "lu",
"fas_levels_snes_type": "ksponly",
"fas_levels_ksp_type": "chebyshev",
"fas_levels_ksp_max_it": 3,
"fas_levels_ksp_max_it": max_its,
"fas_levels_pc_type": "jacobi",
"fas_levels_ksp_convergence_test": "skip",
"snes_max_it": 1,
Expand All @@ -57,7 +58,7 @@ def solver_parameters(solver_type):
"npc_fas_coarse_snes_linesearch_type": "basic",
"npc_fas_levels_snes_type": "ksponly",
"npc_fas_levels_ksp_type": "chebyshev",
"npc_fas_levels_ksp_max_it": 3,
"npc_fas_levels_ksp_max_it": max_its,
"npc_fas_levels_pc_type": "jacobi",
"npc_fas_levels_ksp_convergence_test": "skip",
"npc_snes_max_it": 1,
Expand Down

0 comments on commit c7acec1

Please sign in to comment.