Skip to content

Commit 5a7d0c9

Browse files
authored
Merge branch 'ap-block-solver-update' into master
2 parents 57032dd + 3220086 commit 5a7d0c9

File tree

104 files changed

+21303
-21880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+21303
-21880
lines changed

.gitignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@
1313
*.pvts
1414
*.vtk
1515
*.out
16-
/Timestep_*
1716
*.mat
18-
/models_not_under_git
19-
/input_models/**
17+
/Timestep_*
2018
/src/.settings
2119
/src/.vscode/
2220
/src/.project
23-
/test/*/ProcessorPartitioning*.*
24-
/test/t8_AdjointGradients/ScalingLaw_Test.dat
2521
Manifest.toml
2622
docs/build/
2723

doc/LaMEM_options/canonical_solver_options.txt

+55-16
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ OPTIONS & PREFIXES
1414

1515
* Jacobian preconditioner matrix is controlled with prefix -pcmat_
1616

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

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

2324
* Jacobian preconditioner is controlled with prefix -jp
2425

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

27-
bf - block factorization (currently only block upper triangular)
28+
bf - block factorization
2829
mg - coupled Galerkin geometric multigrid
2930
user - coupled user-defined preconditioner controlled via options
3031

@@ -34,12 +35,16 @@ OPTIONS & PREFIXES
3435

3536
* Block factorization preconditioner is controlled with prefix -bf
3637

37-
-bf_vs_type [mg, user] - select velocity block solver:
38+
-bf_type [upper, lower] - block factorization type (default upper)
39+
40+
-bf_vs_type [mg, user] - select velocity block solver (default user)
3841

3942
mg - Galerkin geometric multigrid
4043
user - user-defined preconditioner controlled via options
4144

4245
Option prefix for user-defined velocity solver is -vs
46+
47+
Option prefix for pressure block solver is -ks (only relevant for -pcmat_schur_type wbfbt)
4348

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

@@ -78,11 +83,20 @@ Examples
7883

7984
-jp_type user
8085
-jp_pc_type lu
81-
-jp_pc_factor_mat_solver_package mumps
86+
-jp_pc_factor_mat_solver_type mumps
87+
88+
================================================================================
89+
90+
[3] multigrid for coupled system
91+
(see [7] for coupled multigrid settings)
92+
93+
-pcmat_type mono
94+
95+
-jp_type mg
8296

8397
================================================================================
8498

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

88102
-pcmat_type block
@@ -94,31 +108,45 @@ Examples
94108

95109
-vs_ksp_type preonly
96110
-vs_pc_type lu
97-
-vs_pc_factor_mat_solver_package mumps
111+
-vs_pc_factor_mat_solver_type mumps
98112

99113
================================================================================
100114

101-
[4] multigrid for coupled system
115+
[5] block factorization with multigrid for velocity block
116+
(see [7] for velocity multigrid settings)
102117

103-
-pcmat_type mono
118+
-pcmat_type block
104119

105-
-jp_type mg
120+
-jp_type bf
121+
122+
-bf_vs_type mg
123+
124+
-vs_ksp_type preonly
106125

107126
================================================================================
108127

109-
[5] block factorization with multigrid for velocity block
128+
[6] block factorization with wBFBT preconditioner and multigrid for velocity and pressure blocks
129+
(see [7] for velocity multigrid settings)
130+
(see [8] for pressure multigrid settings)
110131

111132
-pcmat_type block
112-
133+
-pcmat_schur_type wbfbt
134+
113135
-jp_type bf
114136

115137
-bf_vs_type mg
116138

117-
-vs_ksp_type preonly
139+
-vs_ksp_type gmres
140+
-vs_ksp_rtol 1e-2
141+
-vs_ksp_max_it 10
142+
143+
-ks_ksp_type gmres
144+
-ks_ksp_rtol 1e-2
145+
-ks_ksp_max_it 10
118146

119147
================================================================================
120148

121-
[6] multigrid & coarse solver settings (both coupled & velocity)
149+
[7] multigrid & coarse solver settings (both coupled system & velocity block)
122150

123151
-gmg_pc_view
124152
-gmg_pc_type mg
@@ -135,6 +163,17 @@ Examples
135163
-crs_ksp_type preonly
136164
-crs_pc_type redundant
137165
-crs_pc_redundant_number 1
138-
-crs_redundant_pc_factor_mat_solver_package mumps
166+
-crs_redundant_pc_factor_mat_solver_type mumps
139167

140168
================================================================================
169+
170+
[8] multigrid settings for pressure block
171+
172+
-ks_pc_type mg
173+
-ks_pc_mg_levels 3
174+
-ks_pc_mg_galerkin
175+
-ks_pc_mg_type multiplicative
176+
-ks_pc_mg_cycle_type v
177+
178+
================================================================================
179+

doc/LaMEM_options/linear_solver_options.txt

-102
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
# Packages
3+
4+
sudo apt update
5+
sudo apt install build-essential gfortran python-is-python3 python3-numpy
6+
sudo apt install bison flex cmake git-all valgrind
7+
sudo apt-get install libtool libtool-bin
8+
sudo apt-get install mpich
9+
10+
# Debug petsc
11+
12+
./configure \
13+
--prefix=/home/USERNAME/SOFT/petsc/petsc-3.19.6-deb \
14+
--download-f2cblaslapack \
15+
--download-blis \
16+
--with-debugging=1 \
17+
--COPTFLAGS="-g -O0" \
18+
--FOPTFLAGS="-g -O0" \
19+
--CXXOPTFLAGS="-g -O0" \
20+
--with-large-file-io=1 \
21+
--with-shared-libraries=0 \
22+
--with-c++-support=1 \
23+
--with-cc=mpicc \
24+
--with-cxx=mpicxx \
25+
--with-fc=mpif90 \
26+
--download-metis=1 \
27+
--download-parmetis=1 \
28+
--download-ptscotch=1 \
29+
--download-scalapack=1 \
30+
--download-mumps=1 \
31+
--download-superlu_dist=1 \
32+
--with-clean
33+
34+
# Optimized petsc
35+
36+
./configure \
37+
--prefix=/home/USERNAME/SOFT/petsc/petsc-3.19.6-opt \
38+
--download-f2cblaslapack \
39+
--download-blis \
40+
--with-debugging=0 \
41+
--COPTFLAGS="-O2 -march=znver2" \
42+
--FOPTFLAGS="-O2 -march=znver2" \
43+
--CXXOPTFLAGS="-O2 -march=znver2" \
44+
--with-large-file-io=1 \
45+
--with-shared-libraries=0 \
46+
--with-c++-support=1 \
47+
--with-cc=mpicc \
48+
--with-cxx=mpicxx \
49+
--with-fc=mpif90 \
50+
--download-metis=1 \
51+
--download-parmetis=1 \
52+
--download-ptscotch=1 \
53+
--download-scalapack=1 \
54+
--download-mumps=1 \
55+
--download-superlu_dist=1 \
56+
--with-clean
57+
58+
# Include directories (Eclipse projects):
59+
60+
/usr/include/x86_64-linux-gnu/mpich
61+
/home/anton/SOFT/petsc/petsc-3.19.6-deb/include
62+
63+
64+

0 commit comments

Comments
 (0)