Skip to content

Commit cacbbb2

Browse files
authored
Merge pull request #6222 from quangx/constant_modes
Add constant mode settings to Amg_data
2 parents 6ce36dc + f1405fc commit cacbbb2

File tree

21 files changed

+94
-90
lines changed

21 files changed

+94
-90
lines changed

doc/modules/changes/20250131_hoang

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fixed: Constant modes are now used in the melt solver.
2+
<br>
3+
(Quang Hoang, Timo Heister, 2025/01/31)

source/simulator/assembly.cc

+1
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ namespace aspect
525525

526526
Amg_data.smoother_sweeps = 2;
527527
Amg_data.coarse_type = "symmetric Gauss-Seidel";
528+
Amg_data.constant_modes = constant_modes;
528529

529530
LinearAlgebra::PreconditionAMG *Mp_preconditioner_AMG
530531
= dynamic_cast<LinearAlgebra::PreconditionAMG *> (Mp_preconditioner.get());

tests/advect_field_with_melt_velocity/screen-output

+23-23
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
2222
Rebuilding Stokes preconditioner...
2323
Solving Stokes system (AMG)... 0+0 iterations.
2424
Solving fluid velocity system... 1 iterations.
25-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 6.90385e-17, 2.38127e-16, 1.13416e-16, 1.13416e-16, 5.77882e-09
26-
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77882e-09
25+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 6.90385e-17, 2.38127e-16, 1.13416e-16, 1.13416e-16, 8.72904e-09
26+
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09
2727

2828

2929
Postprocessing:
@@ -38,7 +38,7 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
3838
Rebuilding Stokes preconditioner...
3939
Solving Stokes system (AMG)... 0+0 iterations.
4040
Solving fluid velocity system... 1 iterations.
41-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.80064e-15, 1.59221e-13, 0.0442513, 0.159394, 5.77882e-09
41+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.91569e-15, 1.59228e-13, 0.0442513, 0.159394, 8.72904e-09
4242
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.159394
4343

4444
Solving temperature system... 0 iterations.
@@ -48,8 +48,8 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
4848
Rebuilding Stokes preconditioner...
4949
Solving Stokes system (AMG)... 0+0 iterations.
5050
Solving fluid velocity system... 1 iterations.
51-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.80064e-15, 1.59221e-13, 1.8083e-14, 9.49633e-13, 5.77882e-09
52-
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77882e-09
51+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.91569e-15, 1.59228e-13, 1.8083e-14, 9.49627e-13, 8.72904e-09
52+
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09
5353

5454

5555
Postprocessing:
@@ -64,7 +64,7 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
6464
Rebuilding Stokes preconditioner...
6565
Solving Stokes system (AMG)... 0+0 iterations.
6666
Solving fluid velocity system... 1 iterations.
67-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.97535e-15, 1.06272e-13, 0.0154324, 0.0604684, 5.77883e-09
67+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.78397e-15, 1.06273e-13, 0.0154324, 0.0604684, 8.72904e-09
6868
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0604684
6969

7070
Solving temperature system... 0 iterations.
@@ -74,8 +74,8 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
7474
Rebuilding Stokes preconditioner...
7575
Solving Stokes system (AMG)... 0+0 iterations.
7676
Solving fluid velocity system... 1 iterations.
77-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.97535e-15, 1.06272e-13, 5.48776e-13, 8.11903e-13, 5.77883e-09
78-
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77883e-09
77+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.78397e-15, 1.06273e-13, 5.48774e-13, 8.11886e-13, 8.72904e-09
78+
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09
7979

8080

8181
Postprocessing:
@@ -90,7 +90,7 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
9090
Rebuilding Stokes preconditioner...
9191
Solving Stokes system (AMG)... 0+0 iterations.
9292
Solving fluid velocity system... 1 iterations.
93-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.90601e-15, 1.06278e-13, 0.0104717, 0.0620668, 5.77884e-09
93+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.76908e-15, 1.06271e-13, 0.0104717, 0.0620668, 8.72904e-09
9494
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0620668
9595

9696
Solving temperature system... 0 iterations.
@@ -100,8 +100,8 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
100100
Rebuilding Stokes preconditioner...
101101
Solving Stokes system (AMG)... 0+0 iterations.
102102
Solving fluid velocity system... 1 iterations.
103-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.90601e-15, 1.06278e-13, 5.94512e-13, 7.3382e-13, 5.77884e-09
104-
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77884e-09
103+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.76908e-15, 1.06271e-13, 5.94514e-13, 7.33849e-13, 8.72904e-09
104+
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09
105105

106106

107107
Postprocessing:
@@ -116,7 +116,7 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
116116
Rebuilding Stokes preconditioner...
117117
Solving Stokes system (AMG)... 0+0 iterations.
118118
Solving fluid velocity system... 1 iterations.
119-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.0483e-15, 1.0627e-13, 0.00494652, 0.0492745, 5.77884e-09
119+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 2.8254e-15, 1.06277e-13, 0.00494652, 0.0492745, 8.72904e-09
120120
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0492745
121121

122122
Solving temperature system... 0 iterations.
@@ -126,8 +126,8 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
126126
Rebuilding Stokes preconditioner...
127127
Solving Stokes system (AMG)... 0+0 iterations.
128128
Solving fluid velocity system... 1 iterations.
129-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.0483e-15, 1.0627e-13, 1.14179e-13, 9.55409e-13, 5.77884e-09
130-
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77884e-09
129+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 2.8254e-15, 1.06277e-13, 1.14181e-13, 9.55375e-13, 8.72904e-09
130+
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09
131131

132132

133133
Postprocessing:
@@ -142,7 +142,7 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
142142
Rebuilding Stokes preconditioner...
143143
Solving Stokes system (AMG)... 0+0 iterations.
144144
Solving fluid velocity system... 1 iterations.
145-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.9216e-15, 1.06277e-13, 0.00277529, 0.0382927, 5.77885e-09
145+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 5.10785e-15, 1.0627e-13, 0.00277529, 0.0382927, 8.72904e-09
146146
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0382927
147147

148148
Solving temperature system... 0 iterations.
@@ -152,8 +152,8 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
152152
Rebuilding Stokes preconditioner...
153153
Solving Stokes system (AMG)... 0+0 iterations.
154154
Solving fluid velocity system... 1 iterations.
155-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.9216e-15, 1.06277e-13, 9.49527e-14, 2.08796e-13, 5.77885e-09
156-
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77885e-09
155+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 5.10785e-15, 1.0627e-13, 9.49504e-14, 2.08775e-13, 8.72904e-09
156+
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09
157157

158158

159159
Postprocessing:
@@ -168,7 +168,7 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
168168
Rebuilding Stokes preconditioner...
169169
Solving Stokes system (AMG)... 0+0 iterations.
170170
Solving fluid velocity system... 1 iterations.
171-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.91172e-15, 1.06274e-13, 0.00159055, 0.0352807, 5.77885e-09
171+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.82205e-15, 1.06265e-13, 0.00159055, 0.0352807, 8.72904e-09
172172
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0352807
173173

174174
Solving temperature system... 0 iterations.
@@ -178,8 +178,8 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
178178
Rebuilding Stokes preconditioner...
179179
Solving Stokes system (AMG)... 0+0 iterations.
180180
Solving fluid velocity system... 1 iterations.
181-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.91172e-15, 1.06274e-13, 7.85968e-13, 3.33996e-13, 5.77885e-09
182-
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77885e-09
181+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.82205e-15, 1.06265e-13, 7.85965e-13, 3.33889e-13, 8.72904e-09
182+
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09
183183

184184

185185
Postprocessing:
@@ -194,7 +194,7 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
194194
Rebuilding Stokes preconditioner...
195195
Solving Stokes system (AMG)... 0+0 iterations.
196196
Solving fluid velocity system... 1 iterations.
197-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.15113e-15, 4.96403e-14, 0.000415237, 0.00896686, 5.77885e-09
197+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.00097e-15, 4.96335e-14, 0.000415237, 0.00896686, 8.72904e-09
198198
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.00896686
199199

200200
Solving temperature system... 0 iterations.
@@ -204,8 +204,8 @@ Number of degrees of freedom: 39,050 (8,450+4,161+8,450+1,089+4,225+4,225+4,225+
204204
Rebuilding Stokes preconditioner...
205205
Solving Stokes system (AMG)... 0+0 iterations.
206206
Solving fluid velocity system... 1 iterations.
207-
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.15113e-15, 4.96403e-14, 5.10735e-13, 5.84425e-13, 5.77885e-09
208-
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77885e-09
207+
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.00097e-15, 4.96335e-14, 5.10732e-13, 5.84423e-13, 8.72904e-09
208+
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09
209209

210210

211211
Postprocessing:

tests/advect_field_with_melt_velocity/statistics

+8-8
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
# 23: Maximal value for composition melt_composition
2424
# 24: Global mass for composition melt_composition
2525
# 25: Visualization file name
26-
0 0.000000000000e+00 0.000000000000e+00 1024 9539 4225 12675 2 0 0 0 0 4294967295 2 50 8.72158000e-02 8.72158000e-02 8.72158000e-02 0.00000000e+00 1.00000000e+00 4.94791667e-01 0.00000000e+00 1.00000000e+00 4.94791667e-01 output-advect_field_with_melt_velocity/solution/solution-00000
27-
1 1.562530132333e-02 1.562530132333e-02 1024 9539 4225 12675 2 0 0 6 17 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -1.69187299e-20 1.02827360e+00 4.94791667e-01 -3.77019961e-02 1.00000000e+00 4.79166667e-01 output-advect_field_with_melt_velocity/solution/solution-00001
28-
2 3.125060264666e-02 1.562530132333e-02 1024 9539 4225 12675 2 0 0 9 19 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -6.62657772e-05 1.01836204e+00 4.94791667e-01 -1.96241022e-02 1.00000000e+00 4.63541743e-01 output-advect_field_with_melt_velocity/solution/solution-00002
29-
3 4.687590396998e-02 1.562530132333e-02 1024 9539 4225 12675 2 0 0 9 19 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -3.12485607e-04 1.00881105e+00 4.94791667e-01 -7.95807511e-03 1.00000000e+00 4.47917399e-01 output-advect_field_with_melt_velocity/solution/solution-00003
30-
4 6.250120529331e-02 1.562530132333e-02 1024 9539 4225 12675 2 0 0 9 18 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -1.70149688e-04 1.01047335e+00 4.94791667e-01 -2.88929277e-02 1.00000000e+00 4.32295273e-01 output-advect_field_with_melt_velocity/solution/solution-00004
31-
5 7.812650661664e-02 1.562530132333e-02 1024 9539 4225 12675 2 0 0 9 19 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -7.41383830e-05 1.01044868e+00 4.94791667e-01 -4.48229755e-02 1.00000000e+00 4.16678736e-01 output-advect_field_with_melt_velocity/solution/solution-00005
32-
6 9.375180793997e-02 1.562530132333e-02 1024 9539 4225 12675 2 0 0 8 19 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -3.90173583e-05 1.00979390e+00 4.94791667e-01 -3.41543141e-02 1.00000000e+00 4.01072265e-01 output-advect_field_with_melt_velocity/solution/solution-00006
33-
7 1.000000000000e-01 6.248192060034e-03 1024 9539 4225 12675 2 0 0 8 14 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -3.07771393e-05 1.00952621e+00 4.94791667e-01 -3.79644523e-02 1.00000000e+00 3.94835069e-01 output-advect_field_with_melt_velocity/solution/solution-00007
26+
0 0.000000000000e+00 0.000000000000e+00 1024 9539 4225 12675 2 0 0 0 0 4294967295 2 54 8.72158000e-02 8.72158000e-02 8.72158000e-02 0.00000000e+00 1.00000000e+00 4.94791667e-01 0.00000000e+00 1.00000000e+00 4.94791667e-01 output-advect_field_with_melt_velocity/solution/solution-00000
27+
1 1.562530121986e-02 1.562530121986e-02 1024 9539 4225 12675 2 0 0 6 17 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -1.69187319e-20 1.02827360e+00 4.94791667e-01 -3.77019966e-02 1.00000000e+00 4.79166667e-01 output-advect_field_with_melt_velocity/solution/solution-00001
28+
2 3.125060243973e-02 1.562530121986e-02 1024 9539 4225 12675 2 0 0 9 19 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -6.62657765e-05 1.01836204e+00 4.94791667e-01 -1.96241030e-02 1.00000000e+00 4.63541744e-01 output-advect_field_with_melt_velocity/solution/solution-00002
29+
3 4.687590365959e-02 1.562530121986e-02 1024 9539 4225 12675 2 0 0 9 19 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -3.12485627e-04 1.00881105e+00 4.94791667e-01 -7.95807538e-03 1.00000000e+00 4.47917399e-01 output-advect_field_with_melt_velocity/solution/solution-00003
30+
4 6.250120487945e-02 1.562530121986e-02 1024 9539 4225 12675 2 0 0 9 18 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -1.70149721e-04 1.01047335e+00 4.94791667e-01 -2.88929277e-02 1.00000000e+00 4.32295274e-01 output-advect_field_with_melt_velocity/solution/solution-00004
31+
5 7.812650609932e-02 1.562530121986e-02 1024 9539 4225 12675 2 0 0 9 19 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -7.41383866e-05 1.01044868e+00 4.94791667e-01 -4.48229756e-02 1.00000000e+00 4.16678736e-01 output-advect_field_with_melt_velocity/solution/solution-00005
32+
6 9.375180731918e-02 1.562530121986e-02 1024 9539 4225 12675 2 0 0 8 19 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -3.90173627e-05 1.00979390e+00 4.94791667e-01 -3.41543149e-02 1.00000000e+00 4.01072265e-01 output-advect_field_with_melt_velocity/solution/solution-00006
33+
7 1.000000000000e-01 6.248192680821e-03 1024 9539 4225 12675 2 0 0 8 14 4294967294 0 0 8.72158000e-02 8.72158000e-02 8.72158000e-02 -3.07771429e-05 1.00952621e+00 4.94791667e-01 -3.79644529e-02 1.00000000e+00 3.94835069e-01 output-advect_field_with_melt_velocity/solution/solution-00007

0 commit comments

Comments
 (0)