|
1 | 1 | --- |
2 | 2 | title: Ill-Conditioned Nonlinear System Work-Precision Diagrams |
3 | 3 | author: Avik Pal |
4 | | -priority: 10 |
| 4 | +priority: 1000000 |
5 | 5 | --- |
6 | 6 |
|
7 | 7 | # Setup |
@@ -346,7 +346,7 @@ fig = begin |
346 | 346 | [symbol_to_adname[adtypes[idx][2][1]] for idx in non_sparse_idxs], |
347 | 347 | ], |
348 | 348 | ["Exact Sparsity", "Approx. Local Sparsity", "Dense"]; |
349 | | - position=:rb, framevisible=true, framewidth=2.5, titlesize=18, |
| 349 | + position=:lt, framevisible=true, framewidth=2.5, titlesize=18, |
350 | 350 | labelsize=16, patchsize=(40.0f0, 20.0f0) |
351 | 351 | ) |
352 | 352 |
|
@@ -565,15 +565,15 @@ solvers_scaling_jacobian_free = [ |
565 | 565 | (; pkg = :nonlinearsolve, name = "Newton Krylov", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES())), |
566 | 566 | (; pkg = :nonlinearsolve, name = "Newton Krylov (ILU)", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = incompletelu), concrete_jac = true)), |
567 | 567 | (; pkg = :nonlinearsolve, name = "Newton Krylov (AMG)", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid), concrete_jac = true)), |
568 | | - (; pkg = :nonlinearsolve, name = "Newton Krylov (AMG Jacobi)", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid_jacobi), concrete_jac = true)), |
| 568 | + # (; pkg = :nonlinearsolve, name = "Newton Krylov (AMG Jacobi)", alg = NewtonRaphson(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid_jacobi), concrete_jac = true)), |
569 | 569 | (; pkg = :wrapper, name = "Newton Krylov [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", snes_mf = true)), |
570 | 570 | (; pkg = :wrapper, name = "Newton Krylov (ILU) [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", pc_type = "ilu")), |
571 | 571 | (; pkg = :wrapper, name = "Newton Krylov (AMG) [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", pc_type = "gamg")), |
572 | | - (; pkg = :wrapper, name = "Newton Krylov (AMG Jacobi) [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", pc_type = "gamg", mg_levels_ksp_type = "richardson", mg_levels_pc_type = "jacobi")), |
| 572 | + # (; pkg = :wrapper, name = "Newton Krylov (AMG Jacobi) [PETSc]", alg = PETScSNES(; snes_type = "newtonls", snes_linesearch_type = "basic", ksp_type = "gmres", pc_type = "gamg", mg_levels_ksp_type = "richardson", mg_levels_pc_type = "jacobi")), |
573 | 573 | (; pkg = :nonlinearsolve, name = "TR Krylov", alg = TrustRegion(; linsolve = KrylovJL_GMRES())), |
574 | 574 | (; pkg = :nonlinearsolve, name = "TR Krylov (ILU)", alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = incompletelu), concrete_jac = true)), |
575 | 575 | (; pkg = :nonlinearsolve, name = "TR Krylov (AMG)", alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid), concrete_jac = true)), |
576 | | - (; pkg = :nonlinearsolve, name = "TR Krylov (AMG Jacobi)", alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid_jacobi), concrete_jac = true)), |
| 576 | + # (; pkg = :nonlinearsolve, name = "TR Krylov (AMG Jacobi)", alg = TrustRegion(; linsolve = KrylovJL_GMRES(; precs = algebraicmultigrid_jacobi), concrete_jac = true)), |
577 | 577 | # (; pkg = :wrapper, name = "TR Krylov [PETSc]", alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", snes_mf = true)), |
578 | 578 | # (; pkg = :wrapper, name = "TR Krylov (ILU) [PETSc]", alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", pc_type = "ilu")), |
579 | 579 | # (; pkg = :wrapper, name = "TR Krylov (AMG) [PETSc]", alg = PETScSNES(; snes_type = "newtontr", ksp_type = "gmres", pc_type = "gamg")), |
@@ -603,13 +603,13 @@ for (i, N) in enumerate(Ns) |
603 | 603 | termination_condition = (alg isa PETScSNES || alg isa KINSOL) ? |
604 | 604 | nothing : |
605 | 605 | NonlinearSolveBase.AbsNormTerminationMode(Base.Fix1(maximum, abs)) |
606 | | - sol = solve(prob, alg; abstol=1e-6, reltol=1e-6, |
607 | | - linsolve_kwargs = (; abstol = 1e-9, reltol = 1e-9), |
| 606 | + sol = solve(prob, alg; abstol=1e-5, reltol=1e-5, |
| 607 | + linsolve_kwargs = (; abstol = 1e-6, reltol = 1e-6), |
608 | 608 | termination_condition) |
609 | | - if SciMLBase.successful_retcode(sol) || norm(sol.resid, Inf) ≤ 1e-5 |
610 | | - runtimes_scaling[j, i] = @belapsed solve($prob, $alg; abstol=1e-6, |
611 | | - reltol=1e-6, |
612 | | - linsolve_kwargs = (; abstol = 1e-9, reltol = 1e-9), |
| 609 | + if SciMLBase.successful_retcode(sol) || norm(sol.resid, Inf) ≤ 1e-4 |
| 610 | + runtimes_scaling[j, i] = @belapsed solve($prob, $alg; abstol=1e-5, |
| 611 | + reltol=1e-5, |
| 612 | + linsolve_kwargs = (; abstol = 1e-6, reltol = 1e-6), |
613 | 613 | termination_condition=$termination_condition) |
614 | 614 | else |
615 | 615 | runtimes_scaling[j, i] = NaN |
|
0 commit comments