Skip to content

Commit

Permalink
Fixed mpi test and added new ones for Li2019 solver
Browse files Browse the repository at this point in the history
  • Loading branch information
principejavier committed May 24, 2024
1 parent 6ca458a commit e8688eb
Showing 1 changed file with 70 additions and 70 deletions.
140 changes: 70 additions & 70 deletions test/mpi/hunt_li2019_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e8688eb

Please sign in to comment.