-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ccde7e
commit 79a584c
Showing
10 changed files
with
154 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module ExpansionLi2019TestsMPI | ||
|
||
using GridapPETSc | ||
using SparseMatricesCSR | ||
|
||
using GridapMHD: cavity | ||
|
||
# GMRES + block LU solvers | ||
cavity(np=4,nc=(4,4,4),backend=:mpi,solver=:li2019) | ||
|
||
# GMRES + block preconditioners | ||
solver = Dict( | ||
:solver => :li2019, | ||
:matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, | ||
:vector_type => Vector{PetscScalar}, | ||
:block_solvers => [:amg,:gmres_swartz,:amg,:cg_jacobi,:cg_jacobi], | ||
:petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason" | ||
) | ||
cavity(np=4,nc=(4,4,4),backend=:mpi,solver=solver) | ||
|
||
end # module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module HuntLi2019TestsMPI | ||
|
||
using GridapPETSc | ||
using SparseMatricesCSR | ||
|
||
using GridapMHD: hunt | ||
|
||
# Li2019, MUMPS for Dj | ||
solver = Dict( | ||
:solver => :li2019, | ||
:matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, | ||
:vector_type => Vector{PetscScalar}, | ||
:block_solvers => [:mumps,:gmres_schwarz,:cg_jacobi,:cg_jacobi], | ||
:petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason" | ||
) | ||
hunt( | ||
nc=(6,6), | ||
np=(2,2), | ||
backend=:mpi, | ||
L=1.0, | ||
B=(0.,50.,0.), | ||
debug=false, | ||
vtk=true, | ||
title="hunt", | ||
solver=solver, | ||
) | ||
|
||
end # module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module CavityBadia2024TestsSequential | ||
|
||
using SparseArrays | ||
using GridapMHD: cavity | ||
|
||
solver = Dict( | ||
:solver => :badia2024, | ||
:matrix_type => SparseMatrixCSC{Float64,Int64}, | ||
:vector_type => Vector{Float64}, | ||
:petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason", | ||
:block_solvers => [:julia,:cg_jacobi,:cg_jacobi], | ||
) | ||
cavity(np=1,backend=:mpi,solver=solver,ζ=10.0) | ||
|
||
solver = Dict( | ||
:solver => :badia2024, | ||
:matrix_type => SparseMatrixCSC{Float64,Int64}, | ||
:vector_type => Vector{Float64}, | ||
:petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason", | ||
:block_solvers => [:gmg,:cg_jacobi,:cg_jacobi], | ||
) | ||
cavity(np=1,backend=:mpi,solver=solver,ζ=10.0,ranks_per_level=[1,1]) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module CavityLi2019TestsSequential | ||
|
||
using GridapPETSc | ||
using SparseMatricesCSR, SparseArrays | ||
using GridapMHD: cavity | ||
|
||
# Serial, GMRES + block LU solvers | ||
cavity(solver=:li2019) | ||
|
||
# Sequential, GMRES + block LU solvers | ||
cavity(np=2,backend=:sequential,solver=:li2019) | ||
|
||
# Sequential, GMRES + block preconditioners | ||
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 => [:from_options,:gmres_schwarz,:cg_jacobi,:cg_jacobi], | ||
:petsc_options => petsc_options | ||
) | ||
cavity(np=2,backend=:sequential,solver=solver) | ||
|
||
end # module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
module ExpansionLi2019TestsSequential | ||
|
||
using GridapMHD: expansion | ||
using GridapPETSc, SparseMatricesCSR | ||
|
||
# Li2019, with MUMPS solver for Dj | ||
solver = Dict( | ||
:solver => :li2019, | ||
:matrix_type => SparseMatrixCSR{0,PetscScalar,PetscInt}, | ||
:vector_type => Vector{PetscScalar}, | ||
:block_solvers => [:mumps,:gmres_schwarz,:gmres_amg,:cg_jacobi,:cg_jacobi], | ||
:petsc_options => "-ksp_error_if_not_converged true -ksp_converged_reason" | ||
) | ||
expansion(np=2,backend=:sequential,solver=solver) | ||
|
||
# Li2019, with Schwarz solver for Dj | ||
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 => [:from_options,:gmres_schwarz,:cg_jacobi,:cg_jacobi], | ||
:petsc_options => petsc_options | ||
) | ||
expansion(np=2,backend=:sequential,solver=solver) | ||
|
||
end # module | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters