Skip to content

Commit

Permalink
Merge branch 'ap-block-solver-update' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskaus authored Oct 1, 2024
2 parents 57032dd + 3220086 commit 5a7d0c9
Show file tree
Hide file tree
Showing 104 changed files with 21,303 additions and 21,880 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
*.pvts
*.vtk
*.out
/Timestep_*
*.mat
/models_not_under_git
/input_models/**
/Timestep_*
/src/.settings
/src/.vscode/
/src/.project
/test/*/ProcessorPartitioning*.*
/test/t8_AdjointGradients/ScalingLaw_Test.dat
Manifest.toml
docs/build/

71 changes: 55 additions & 16 deletions doc/LaMEM_options/canonical_solver_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ OPTIONS & PREFIXES

* Jacobian preconditioner matrix is controlled with prefix -pcmat_

-pcmat_type [block, mono] - select matrix type (block or monolithic) (default - mono)
-pcmat_pgamma [value] - set the penalty parameter (pgamma >= 1) (default - 1)
-pcmat_no_dev_proj - switch off deviatoric projection (default - not set)
-pcmat_type [block, mono] - select matrix type (block or monolithic) (default - mono)
-pcmat_schur_type [wbfbt, inv_eta] - Schur preconditiner type (wBFBt or I/eta) (default - inv_eta)
-pcmat_pgamma [value] - set the penalty parameter (pgamma >= 1) (default - 1)
-pcmat_no_dev_proj - switch off deviatoric projection (default - not set)

If matrix type is 'block', and 'pgamma' > 1, velocity Schur complement is assembled

* Jacobian preconditioner is controlled with prefix -jp

-jp_type [bf, mg, user] - select preconditioner type (default user)

bf - block factorization (currently only block upper triangular)
bf - block factorization
mg - coupled Galerkin geometric multigrid
user - coupled user-defined preconditioner controlled via options

Expand All @@ -34,12 +35,16 @@ OPTIONS & PREFIXES

* Block factorization preconditioner is controlled with prefix -bf

-bf_vs_type [mg, user] - select velocity block solver:
-bf_type [upper, lower] - block factorization type (default upper)

-bf_vs_type [mg, user] - select velocity block solver (default user)

mg - Galerkin geometric multigrid
user - user-defined preconditioner controlled via options

Option prefix for user-defined velocity solver is -vs

Option prefix for pressure block solver is -ks (only relevant for -pcmat_schur_type wbfbt)

* Galerkin geometric multigrid option (both coupled and velocity) is -gmg_

Expand Down Expand Up @@ -78,11 +83,20 @@ Examples

-jp_type user
-jp_pc_type lu
-jp_pc_factor_mat_solver_package mumps
-jp_pc_factor_mat_solver_type mumps

================================================================================

[3] multigrid for coupled system
(see [7] for coupled multigrid settings)

-pcmat_type mono

-jp_type mg

================================================================================

[3] block factorization with penalty and direct solver for velocity block (a-la Powell-Hesteness)
[4] block factorization with penalty and direct solver for velocity block (a-la Powell-Hesteness)
(play with -pcmat_pgamma to see the iteration count)

-pcmat_type block
Expand All @@ -94,31 +108,45 @@ Examples

-vs_ksp_type preonly
-vs_pc_type lu
-vs_pc_factor_mat_solver_package mumps
-vs_pc_factor_mat_solver_type mumps

================================================================================

[4] multigrid for coupled system
[5] block factorization with multigrid for velocity block
(see [7] for velocity multigrid settings)

-pcmat_type mono
-pcmat_type block

-jp_type mg
-jp_type bf

-bf_vs_type mg

-vs_ksp_type preonly

================================================================================

[5] block factorization with multigrid for velocity block
[6] block factorization with wBFBT preconditioner and multigrid for velocity and pressure blocks
(see [7] for velocity multigrid settings)
(see [8] for pressure multigrid settings)

-pcmat_type block

-pcmat_schur_type wbfbt

-jp_type bf

-bf_vs_type mg

-vs_ksp_type preonly
-vs_ksp_type gmres
-vs_ksp_rtol 1e-2
-vs_ksp_max_it 10

-ks_ksp_type gmres
-ks_ksp_rtol 1e-2
-ks_ksp_max_it 10

================================================================================

[6] multigrid & coarse solver settings (both coupled & velocity)
[7] multigrid & coarse solver settings (both coupled system & velocity block)

-gmg_pc_view
-gmg_pc_type mg
Expand All @@ -135,6 +163,17 @@ Examples
-crs_ksp_type preonly
-crs_pc_type redundant
-crs_pc_redundant_number 1
-crs_redundant_pc_factor_mat_solver_package mumps
-crs_redundant_pc_factor_mat_solver_type mumps

================================================================================

[8] multigrid settings for pressure block

-ks_pc_type mg
-ks_pc_mg_levels 3
-ks_pc_mg_galerkin
-ks_pc_mg_type multiplicative
-ks_pc_mg_cycle_type v

================================================================================

102 changes: 0 additions & 102 deletions doc/LaMEM_options/linear_solver_options.txt

This file was deleted.

64 changes: 64 additions & 0 deletions doc/installation/Linux/petsc-linux-and-ryzen.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

# Packages

sudo apt update
sudo apt install build-essential gfortran python-is-python3 python3-numpy
sudo apt install bison flex cmake git-all valgrind
sudo apt-get install libtool libtool-bin
sudo apt-get install mpich

# Debug petsc

./configure \
--prefix=/home/USERNAME/SOFT/petsc/petsc-3.19.6-deb \
--download-f2cblaslapack \
--download-blis \
--with-debugging=1 \
--COPTFLAGS="-g -O0" \
--FOPTFLAGS="-g -O0" \
--CXXOPTFLAGS="-g -O0" \
--with-large-file-io=1 \
--with-shared-libraries=0 \
--with-c++-support=1 \
--with-cc=mpicc \
--with-cxx=mpicxx \
--with-fc=mpif90 \
--download-metis=1 \
--download-parmetis=1 \
--download-ptscotch=1 \
--download-scalapack=1 \
--download-mumps=1 \
--download-superlu_dist=1 \
--with-clean

# Optimized petsc

./configure \
--prefix=/home/USERNAME/SOFT/petsc/petsc-3.19.6-opt \
--download-f2cblaslapack \
--download-blis \
--with-debugging=0 \
--COPTFLAGS="-O2 -march=znver2" \
--FOPTFLAGS="-O2 -march=znver2" \
--CXXOPTFLAGS="-O2 -march=znver2" \
--with-large-file-io=1 \
--with-shared-libraries=0 \
--with-c++-support=1 \
--with-cc=mpicc \
--with-cxx=mpicxx \
--with-fc=mpif90 \
--download-metis=1 \
--download-parmetis=1 \
--download-ptscotch=1 \
--download-scalapack=1 \
--download-mumps=1 \
--download-superlu_dist=1 \
--with-clean

# Include directories (Eclipse projects):

/usr/include/x86_64-linux-gnu/mpich
/home/anton/SOFT/petsc/petsc-3.19.6-deb/include



Loading

1 comment on commit 5a7d0c9

@boriskaus
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remark: this was accidentally merged - don;t use it.

Please sign in to comment.