From e8688ebfb3c388a791e2a48f738975579a414b16 Mon Sep 17 00:00:00 2001 From: Javier Principe Date: Fri, 24 May 2024 09:07:33 +0200 Subject: [PATCH] Fixed mpi test and added new ones for Li2019 solver --- test/mpi/hunt_li2019_tests.jl | 140 +++++++++++++++++----------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/test/mpi/hunt_li2019_tests.jl b/test/mpi/hunt_li2019_tests.jl index e237471..9628e72 100644 --- a/test/mpi/hunt_li2019_tests.jl +++ b/test/mpi/hunt_li2019_tests.jl @@ -19,79 +19,79 @@ function main(parts) vtk=true, title="hunt", solver=:li2019, - )' + ) - # # Li2019, MUMPS for Dj - # solver = Dict( - # :solver => :li2019, - # :matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, - # :vector_type => Vector{PetscScalar}, - # :block_solvers => [:petsc_mumps, :petsc_gmres_schwarz, :petsc_cg_jacobi, :petsc_cg_jacobi], - # :petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason" - # ) - # hunt( - # nc=(6, 6), - # np=parts, - # backend=:mpi, - # L=1.0, - # B=(0.0, 50.0, 0.0), - # debug=false, - # vtk=true, - # title="hunt", - # solver=solver, - # ) + # Li2019, MUMPS for Dj + solver = Dict( + :solver => :li2019, + :matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, + :vector_type => Vector{PetscScalar}, + :block_solvers => [:petsc_mumps, :petsc_gmres_schwarz, :petsc_cg_jacobi, :petsc_cg_jacobi], + :petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason" + ) + hunt( + nc=(6, 6), + np=parts, + backend=:mpi, + L=1.0, + B=(0.0, 50.0, 0.0), + debug=false, + vtk=true, + title="hunt", + solver=solver, + ) - # # Li2019, GMRES + Overlapping Additive Schwarz preconditioner for Dj - # solver = Dict( - # :solver => :li2019, - # :matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, - # :vector_type => Vector{PetscScalar}, - # :block_solvers => [:petsc_gmres_schwarz, :petsc_gmres_schwarz, :petsc_cg_jacobi, :petsc_cg_jacobi], - # :petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason" - # ) - # hunt( - # nc=(4, 4), - # np=parts, - # backend=:sequential, - # L=1.0, - # B=(0.0, 50.0, 0.0), - # debug=false, - # vtk=true, - # title="hunt", - # solver=solver, - # ) + # Li2019, GMRES + Overlapping Additive Schwarz preconditioner for Dj + solver = Dict( + :solver => :li2019, + :matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, + :vector_type => Vector{PetscScalar}, + :block_solvers => [:petsc_gmres_schwarz, :petsc_gmres_schwarz, :petsc_cg_jacobi, :petsc_cg_jacobi], + :petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason" + ) + hunt( + nc=(4, 4), + np=parts, + backend=:sequential, + L=1.0, + B=(0.0, 50.0, 0.0), + debug=false, + vtk=true, + title="hunt", + solver=solver, + ) - # # Li2019, GMRES + Overlapping Additive Schwarz preconditioner for Dj (tunned by options) - # petsc_options = """ - # -ksp_type gmres - # -ksp_rtol 1.0e-5 - # -ksp_atol 1.0e-14 - # -ksp_converged_reason - # -pc_type asm - # -pc_asm_overlap 10 - # -pc_asm_type restrict - # -pc_asm_blocks 32 - # -sub_ksp_type preonly - # -sub_pc_type lu - # """ - # solver = Dict( - # :solver => :li2019, - # :matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, - # :vector_type => Vector{PetscScalar}, - # :block_solvers => [:petsc_from_options, :petsc_gmres_schwarz, :petsc_cg_jacobi, :petsc_cg_jacobi], - # :petsc_options => petsc_options - # ) - # hunt( - # nc=(4, 4), - # np=parts, - # backend=:sequential, - # L=1.0, - # B=(0.0, 50.0, 0.0), - # debug=false, - # vtk=true, - # title="hunt", - # solver=solver, - # ) + # Li2019, GMRES + Overlapping Additive Schwarz preconditioner for Dj (tunned by options) + petsc_options = """ + -ksp_type gmres + -ksp_rtol 1.0e-5 + -ksp_atol 1.0e-14 + -ksp_converged_reason + -pc_type asm + -pc_asm_overlap 10 + -pc_asm_type restrict + -pc_asm_blocks 32 + -sub_ksp_type preonly + -sub_pc_type lu + """ + solver = Dict( + :solver => :li2019, + :matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, + :vector_type => Vector{PetscScalar}, + :block_solvers => [:petsc_from_options, :petsc_gmres_schwarz, :petsc_cg_jacobi, :petsc_cg_jacobi], + :petsc_options => petsc_options + ) + hunt( + nc=(4, 4), + np=parts, + backend=:sequential, + L=1.0, + B=(0.0, 50.0, 0.0), + debug=false, + vtk=true, + title="hunt", + solver=solver, + ) end # main