Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add constant mode settings to Amg_data #6222

Merged
merged 2 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/modules/changes/20250131_hoang
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fixed: Constant modes are now used in the melt solver.
<br>
(Quang Hoang, Timo Heister, 2025/01/31)
1 change: 1 addition & 0 deletions source/simulator/assembly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ namespace aspect

Amg_data.smoother_sweeps = 2;
Amg_data.coarse_type = "symmetric Gauss-Seidel";
Amg_data.constant_modes = constant_modes;

LinearAlgebra::PreconditionAMG *Mp_preconditioner_AMG
= dynamic_cast<LinearAlgebra::PreconditionAMG *> (Mp_preconditioner.get());
Expand Down
46 changes: 23 additions & 23 deletions tests/advect_field_with_melt_velocity/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 6.90385e-17, 2.38127e-16, 1.13416e-16, 1.13416e-16, 5.77882e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77882e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 6.90385e-17, 2.38127e-16, 1.13416e-16, 1.13416e-16, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09


Postprocessing:
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.80064e-15, 1.59221e-13, 0.0442513, 0.159394, 5.77882e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.91569e-15, 1.59228e-13, 0.0442513, 0.159394, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.159394

Solving temperature system... 0 iterations.
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.80064e-15, 1.59221e-13, 1.8083e-14, 9.49633e-13, 5.77882e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77882e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.91569e-15, 1.59228e-13, 1.8083e-14, 9.49627e-13, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09


Postprocessing:
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.97535e-15, 1.06272e-13, 0.0154324, 0.0604684, 5.77883e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.78397e-15, 1.06273e-13, 0.0154324, 0.0604684, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0604684

Solving temperature system... 0 iterations.
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.97535e-15, 1.06272e-13, 5.48776e-13, 8.11903e-13, 5.77883e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77883e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.78397e-15, 1.06273e-13, 5.48774e-13, 8.11886e-13, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09


Postprocessing:
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.90601e-15, 1.06278e-13, 0.0104717, 0.0620668, 5.77884e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.76908e-15, 1.06271e-13, 0.0104717, 0.0620668, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0620668

Solving temperature system... 0 iterations.
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.90601e-15, 1.06278e-13, 5.94512e-13, 7.3382e-13, 5.77884e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77884e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.76908e-15, 1.06271e-13, 5.94514e-13, 7.33849e-13, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09


Postprocessing:
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.0483e-15, 1.0627e-13, 0.00494652, 0.0492745, 5.77884e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 2.8254e-15, 1.06277e-13, 0.00494652, 0.0492745, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0492745

Solving temperature system... 0 iterations.
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.0483e-15, 1.0627e-13, 1.14179e-13, 9.55409e-13, 5.77884e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77884e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 2.8254e-15, 1.06277e-13, 1.14181e-13, 9.55375e-13, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09


Postprocessing:
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.9216e-15, 1.06277e-13, 0.00277529, 0.0382927, 5.77885e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 5.10785e-15, 1.0627e-13, 0.00277529, 0.0382927, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0382927

Solving temperature system... 0 iterations.
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.9216e-15, 1.06277e-13, 9.49527e-14, 2.08796e-13, 5.77885e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77885e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 5.10785e-15, 1.0627e-13, 9.49504e-14, 2.08775e-13, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09


Postprocessing:
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.91172e-15, 1.06274e-13, 0.00159055, 0.0352807, 5.77885e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.82205e-15, 1.06265e-13, 0.00159055, 0.0352807, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.0352807

Solving temperature system... 0 iterations.
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.91172e-15, 1.06274e-13, 7.85968e-13, 3.33996e-13, 5.77885e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77885e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 3.82205e-15, 1.06265e-13, 7.85965e-13, 3.33889e-13, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09


Postprocessing:
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.15113e-15, 4.96403e-14, 0.000415237, 0.00896686, 5.77885e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.00097e-15, 4.96335e-14, 0.000415237, 0.00896686, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.00896686

Solving temperature system... 0 iterations.
Expand All @@ -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+
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Solving fluid velocity system... 1 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.15113e-15, 4.96403e-14, 5.10735e-13, 5.84425e-13, 5.77885e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 5.77885e-09
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 4.00097e-15, 4.96335e-14, 5.10732e-13, 5.84423e-13, 8.72904e-09
Relative nonlinear residual (total system) after nonlinear iteration 2: 8.72904e-09


Postprocessing:
Expand Down
16 changes: 8 additions & 8 deletions tests/advect_field_with_melt_velocity/statistics
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
# 23: Maximal value for composition melt_composition
# 24: Global mass for composition melt_composition
# 25: Visualization file name
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Loading