Skip to content

Commit

Permalink
Merge pull request #5939 from gassmoeller/enable_limiter_by_default
Browse files Browse the repository at this point in the history
Enable limiter by default for bilinear least squares
  • Loading branch information
tjhei authored Aug 28, 2024
2 parents 5060966 + 1614c42 commit 259532b
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 42 deletions.
7 changes: 7 additions & 0 deletions doc/modules/changes/20240625_gassmoeller2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Changed: The particle interpolator plugin 'bilinear least squares'
now activates a limiter by default, which prevents unwanted over-
and undershoots by limiting the returned properties to the bounds
of the particle properties in the cell. The limiter can be
deactivated by the input parameter 'Use linear least squares limiter'.
<br>
(Rene Gassmoeller, 2024/06/25)
2 changes: 1 addition & 1 deletion source/particle/interpolator/bilinear_least_squares.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ namespace aspect
{
prm.enter_subsection("Bilinear least squares");
{
prm.declare_entry("Use linear least squares limiter", "false",
prm.declare_entry("Use linear least squares limiter", "true",
Patterns::List(Patterns::Bool()),
"Limit the interpolation of particle properties onto the cell, so that "
"the value of each property is no smaller than its minimum and no "
Expand Down
10 changes: 5 additions & 5 deletions tests/particle_periodic_boundaries_dc/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ Number of degrees of freedom: 1,524 (578+81+289+576)
Rebuilding Stokes preconditioner...
Solving Stokes system... 17+0 iterations.

Number of active cells: 58 (on 5 levels)
Number of degrees of freedom: 1,478 (584+80+292+522)
Number of active cells: 55 (on 5 levels)
Number of degrees of freedom: 1,399 (552+76+276+495)

*** Timestep 0: t=0 seconds, dt=0 seconds
Skipping temperature solve because RHS is zero.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system... 19+0 iterations.
Solving Stokes system... 18+0 iterations.

Postprocessing:
Writing graphical output: output-particle_periodic_boundaries_dc/solution/solution-00000
Writing particle output: output-particle_periodic_boundaries_dc/particles/particles-00000
Compositions min/max/mass: -0.2048/1.272/0.1826
Compositions min/max/mass: 0/1/0.1824

*** Timestep 1: t=70 seconds, dt=70 seconds
Skipping temperature solve because RHS is zero.
Expand All @@ -28,7 +28,7 @@ Number of degrees of freedom: 1,478 (584+80+292+522)

Postprocessing:
Writing particle output: output-particle_periodic_boundaries_dc/particles/particles-00001
Compositions min/max/mass: -0.1841/1.412/0.1819
Compositions min/max/mass: 0/1/0.1818

Termination requested by criterion: end time

Expand Down
4 changes: 2 additions & 2 deletions tests/particle_periodic_boundaries_dc/statistics
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
# 15: Minimal value for composition C_1
# 16: Maximal value for composition C_1
# 17: Global mass for composition C_1
0 0.000000000000e+00 0.000000000000e+00 58 664 292 522 0 18 20 178 output-particle_periodic_boundaries_dc/solution/solution-00000 10000 output-particle_periodic_boundaries_dc/particles/particles-00000 -2.04832192e-01 1.27227212e+00 1.82589230e-01
1 7.000000000000e+01 7.000000000000e+01 58 664 292 522 0 16 18 172 "" 10000 output-particle_periodic_boundaries_dc/particles/particles-00001 -1.84070457e-01 1.41220476e+00 1.81884316e-01
0 0.000000000000e+00 0.000000000000e+00 55 628 276 495 0 17 19 171 output-particle_periodic_boundaries_dc/solution/solution-00000 10000 output-particle_periodic_boundaries_dc/particles/particles-00000 0.00000000e+00 1.00000000e+00 1.82443948e-01
1 7.000000000000e+01 7.000000000000e+01 55 628 276 495 0 16 18 172 "" 10000 output-particle_periodic_boundaries_dc/particles/particles-00001 0.00000000e+00 1.00000000e+00 1.81753799e-01
10 changes: 5 additions & 5 deletions tests/rigid_shear_steady_state/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ Number of degrees of freedom: 1,524 (578+81+289+576)
Postprocessing:
Writing graphical output: output-rigid_shear_steady_state/solution/solution-00000
Writing particle output: output-rigid_shear_steady_state/particles/particles-00000
Errors u_L1, p_L1, u_L2, p_L2, rho_L2: 4.408097e-04, 1.860241e-02, 3.491164e-04, 2.600740e-02, 7.556693e-03
Errors u_L1, p_L1, u_L2, p_L2, rho_L2: 5.046051e-04, 1.864370e-02, 4.322405e-04, 2.603603e-02, 1.386438e-02

*** Timestep 1: t=0.0624772 seconds, dt=0.0624772 seconds
*** Timestep 1: t=0.0624143 seconds, dt=0.0624143 seconds
Skipping temperature solve because RHS is zero.
Advecting particles... done.
Solving Stokes system... 5+0 iterations.

Postprocessing:
Number of advected particles: 5184
Errors u_L1, p_L1, u_L2, p_L2, rho_L2: 4.419294e-04, 1.860627e-02, 3.499498e-04, 2.600845e-02, 7.630330e-03
Errors u_L1, p_L1, u_L2, p_L2, rho_L2: 5.018671e-04, 1.864425e-02, 4.281601e-04, 2.603495e-02, 1.369427e-02

*** Timestep 2: t=0.1 seconds, dt=0.0375228 seconds
*** Timestep 2: t=0.1 seconds, dt=0.0375857 seconds
Skipping temperature solve because RHS is zero.
Advecting particles... done.
Solving Stokes system... 5+0 iterations.

Postprocessing:
Writing graphical output: output-rigid_shear_steady_state/solution/solution-00001
Writing particle output: output-rigid_shear_steady_state/particles/particles-00001
Errors u_L1, p_L1, u_L2, p_L2, rho_L2: 4.407022e-04, 1.860216e-02, 3.489295e-04, 2.600826e-02, 7.595420e-03
Errors u_L1, p_L1, u_L2, p_L2, rho_L2: 5.004608e-04, 1.863885e-02, 4.261366e-04, 2.603543e-02, 1.376658e-02

Termination requested by criterion: end time

Expand Down
6 changes: 3 additions & 3 deletions tests/rigid_shear_steady_state/statistics
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# 15: u_L2
# 16: p_L2
# 17: rho_L2
0 0.000000000000e+00 0.000000000000e+00 64 659 289 576 0 7 9 9 output-rigid_shear_steady_state/solution/solution-00000 5184 output-rigid_shear_steady_state/particles/particles-00000 3.49116376850641e-04 2.60074009827921e-02 7.55669318237575e-03
1 6.247722391368e-02 6.247722391368e-02 64 659 289 576 0 4 6 6 "" 5184 "" 3.49949751013658e-04 2.60084512794991e-02 7.63033022233409e-03
2 1.000000000000e-01 3.752277608632e-02 64 659 289 576 0 4 6 6 output-rigid_shear_steady_state/solution/solution-00001 5184 output-rigid_shear_steady_state/particles/particles-00001 3.48929491468915e-04 2.60082617522442e-02 7.59541956237771e-03
0 0.000000000000e+00 0.000000000000e+00 64 659 289 576 0 7 9 9 output-rigid_shear_steady_state/solution/solution-00000 5184 output-rigid_shear_steady_state/particles/particles-00000 4.32240515079856e-04 2.60360308013937e-02 1.38643769191144e-02
1 6.241434962979e-02 6.241434962979e-02 64 659 289 576 0 4 6 6 "" 5184 "" 4.28160051186901e-04 2.60349523371374e-02 1.36942727350518e-02
2 1.000000000000e-01 3.758565037021e-02 64 659 289 576 0 4 6 6 output-rigid_shear_steady_state/solution/solution-00001 5184 output-rigid_shear_steady_state/particles/particles-00001 4.26136623036689e-04 2.60354341655517e-02 1.37665763776066e-02
10 changes: 5 additions & 5 deletions tests/time_dependent_annulus/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ Number of degrees of freedom: 1,224 (480+72+240+432)
Solving Stokes system... 28+0 iterations.

Postprocessing:
Errors u_L2, p_L2, rho_L2 3.539470e+00, 4.542985e+00, 1.202942e+02
Errors u_L2, p_L2, rho_L2 4.407832e+00, 4.560843e+00, 2.028187e+02
Writing particle output: output-time_dependent_annulus/particles/particles-00000
Writing graphical output: output-time_dependent_annulus/solution/solution-00000

*** Timestep 1: t=0.0015296 seconds, dt=0.0015296 seconds
Skipping temperature solve because RHS is zero.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system... 21+0 iterations.
Solving Stokes system... 22+0 iterations.

Postprocessing:
Errors u_L2, p_L2, rho_L2 3.551582e+00, 4.540109e+00, 1.227548e+02
Errors u_L2, p_L2, rho_L2 4.769034e+00, 4.551835e+00, 2.186217e+02
Writing particle output: output-time_dependent_annulus/particles/particles-00001
Writing graphical output: output-time_dependent_annulus/solution/solution-00001

*** Timestep 2: t=0.003 seconds, dt=0.0014704 seconds
Skipping temperature solve because RHS is zero.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system... 21+0 iterations.
Solving Stokes system... 23+0 iterations.

Postprocessing:
Errors u_L2, p_L2, rho_L2 3.570604e+00, 4.539442e+00, 1.209691e+02
Errors u_L2, p_L2, rho_L2 4.560728e+00, 4.555384e+00, 2.094610e+02
Writing particle output: output-time_dependent_annulus/particles/particles-00002
Writing graphical output: output-time_dependent_annulus/solution/solution-00002

Expand Down
6 changes: 3 additions & 3 deletions tests/time_dependent_annulus/statistics
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# 15: Number of advected particles
# 16: Particle file name
# 17: Visualization file name
0 0.000000000000e+00 0.000000000000e+00 48 552 240 432 0 27 29 144 3.5395e+00 4.5430e+00 1.2029e+02 768 output-time_dependent_annulus/particles/particles-00000 output-time_dependent_annulus/solution/solution-00000
1 1.529603815079e-03 1.529603815079e-03 48 552 240 432 0 20 22 110 3.5516e+00 4.5401e+00 1.2275e+02 768 output-time_dependent_annulus/particles/particles-00001 output-time_dependent_annulus/solution/solution-00001
2 3.000000000000e-03 1.470396184921e-03 48 552 240 432 0 20 22 109 3.5706e+00 4.5394e+00 1.2097e+02 768 output-time_dependent_annulus/particles/particles-00002 output-time_dependent_annulus/solution/solution-00002
0 0.000000000000e+00 0.000000000000e+00 48 552 240 432 0 27 29 144 4.4078e+00 4.5608e+00 2.0282e+02 768 output-time_dependent_annulus/particles/particles-00000 output-time_dependent_annulus/solution/solution-00000
1 1.529603815079e-03 1.529603815079e-03 48 552 240 432 0 21 23 115 4.7690e+00 4.5518e+00 2.1862e+02 768 output-time_dependent_annulus/particles/particles-00001 output-time_dependent_annulus/solution/solution-00001
2 3.000000000000e-03 1.470396184921e-03 48 552 240 432 0 22 24 120 4.5607e+00 4.5554e+00 2.0946e+02 768 output-time_dependent_annulus/particles/particles-00002 output-time_dependent_annulus/solution/solution-00002
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Number of degrees of freedom: 9,287 (3,362+441+441+1,681+1,681+1,681)
Solving temperature system... 0 iterations.
Advecting particles... done.
Solving Stokes system... 0+0 iterations.
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 9.12022e-08
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 9.11911e-08


Postprocessing:
Compositions min/max/mass: 1e+06/1e+06/1e+16 // -1e+06/-1e+06/-1e+16 // -0.7775/1.023/8.104e+07
Compositions min/max/mass: 1e+06/1e+06/1e+16 // -1e+06/-1e+06/-1e+16 // -0.6921/0.7358/8.366e+07
Number of advected particles: 11974


Expand All @@ -37,11 +37,11 @@ Number of degrees of freedom: 9,287 (3,362+441+441+1,681+1,681+1,681)
Solving temperature system... 0 iterations.
Advecting particles... done.
Solving Stokes system... 0+0 iterations.
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 9.12307e-08
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 9.1212e-08


Postprocessing:
Compositions min/max/mass: 1e+06/1e+06/1e+16 // -1e+06/-1e+06/-1e+16 // -0.8803/1.531/7.631e+07
Compositions min/max/mass: 1e+06/1e+06/1e+16 // -1e+06/-1e+06/-1e+16 // -0.8409/1.117/5.99e+07
Number of advected particles: 11971


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
# 22: Number of advected particles
# 23: Particle file name
0 0.000000000000e+00 0.000000000000e+00 400 3803 441 5043 2 0 55 59 59 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 11971 output-visco_plastic_vep_stress_build-up_yield_particles/particles/particles-00000
1 1.000000000000e+03 1.000000000000e+03 400 3803 441 5043 1 0 4294967295 0 0 1.00000000e+06 1.00000000e+06 1.00000000e+16 -1.00000000e+06 -1.00000000e+06 -1.00000000e+16 -7.77458586e-01 1.02323726e+00 8.10361974e+07 11974 ""
2 2.000000000000e+03 1.000000000000e+03 400 3803 441 5043 1 0 4294967295 0 0 1.00000000e+06 1.00000000e+06 1.00000000e+16 -1.00000000e+06 -1.00000000e+06 -1.00000000e+16 -8.80338193e-01 1.53065475e+00 7.63061301e+07 11971 ""
1 1.000000000000e+03 1.000000000000e+03 400 3803 441 5043 1 0 4294967295 0 0 1.00000000e+06 1.00000000e+06 1.00000000e+16 -1.00000000e+06 -1.00000000e+06 -1.00000000e+16 -6.92057870e-01 7.35795815e-01 8.36611534e+07 11974 ""
2 2.000000000000e+03 1.000000000000e+03 400 3803 441 5043 1 0 4294967295 0 0 1.00000000e+06 1.00000000e+06 1.00000000e+16 -1.00000000e+06 -1.00000000e+06 -1.00000000e+16 -8.40912699e-01 1.11707634e+00 5.98982526e+07 11971 ""
10 changes: 5 additions & 5 deletions tests/viscoelastic_bending_beam_particles/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ Number of degrees of freedom: 7,054 (1,302+176+176+1,350+1,350+1,350+1,350)
*** Timestep 1: t=1000 years, dt=1000 years
Solving temperature system... 0 iterations.
Advecting particles... done.
Solving Stokes system... 115+0 iterations.
Solving Stokes system... 114+0 iterations.

Postprocessing:
Compositions min/max/mass: -1.26e+07/1.169e+07/-7.563e+11 // -1.169e+07/1.26e+07/7.563e+11 // -3.406e+06/1.216e+06/-3.736e+12 // -0.1483/1.096/2.275e+06
Compositions min/max/mass: -1.26e+07/1.169e+07/-7.563e+11 // -1.169e+07/1.26e+07/7.563e+11 // -3.406e+06/1.216e+06/-3.736e+12 // 0/1/2.275e+06
Number of advected particles: 4471

*** Timestep 2: t=2000 years, dt=1000 years
Solving temperature system... 0 iterations.
Advecting particles... done.
Solving Stokes system... 112+0 iterations.
Solving Stokes system... 109+0 iterations.

Postprocessing:
Compositions min/max/mass: -1.903e+07/1.8e+07/-7.995e+11 // -1.8e+07/1.903e+07/7.995e+11 // -4.472e+06/1.491e+06/-4.025e+12 // -0.1451/1.146/2.293e+06
Number of advected particles: 4465
Compositions min/max/mass: -1.901e+07/1.799e+07/-7.836e+11 // -1.799e+07/1.901e+07/7.836e+11 // -4.451e+06/1.476e+06/-4.028e+12 // 0/1/2.293e+06
Number of advected particles: 4464

Termination requested by criterion: end time

Expand Down
6 changes: 3 additions & 3 deletions tests/viscoelastic_bending_beam_particles/statistics
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
# 23: Global mass for composition beam
# 24: Number of advected particles
# 25: Particle file name
0 0.000000000000e+00 0.000000000000e+00 150 1478 176 5400 0 150 153 153 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00 2.25000000e+06 4474 output-viscoelastic_bending_beam_particles/particles/particles-00000
1 1.000000000000e+03 1.000000000000e+03 150 1478 176 5400 0 114 117 117 -1.25996205e+07 1.16949265e+07 -7.56344529e+11 -1.16949265e+07 1.25996205e+07 7.56344529e+11 -3.40560693e+06 1.21625854e+06 -3.73560033e+12 -1.48284756e-01 1.09633616e+00 2.27467523e+06 4471 ""
2 2.000000000000e+03 1.000000000000e+03 150 1478 176 5400 0 111 114 114 -1.90275317e+07 1.80035351e+07 -7.99496575e+11 -1.80035351e+07 1.90275317e+07 7.99496575e+11 -4.47207006e+06 1.49073544e+06 -4.02472961e+12 -1.45080852e-01 1.14569599e+00 2.29262211e+06 4465 ""
0 0.000000000000e+00 0.000000000000e+00 150 1478 176 5400 0 150 153 153 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00 2.25000000e+06 4474 output-viscoelastic_bending_beam_particles/particles/particles-00000
1 1.000000000000e+03 1.000000000000e+03 150 1478 176 5400 0 113 116 116 -1.25996205e+07 1.16949265e+07 -7.56344529e+11 -1.16949265e+07 1.25996205e+07 7.56344529e+11 -3.40560693e+06 1.21625854e+06 -3.73560033e+12 0.00000000e+00 1.00000000e+00 2.27467523e+06 4471 ""
2 2.000000000000e+03 1.000000000000e+03 150 1478 176 5400 0 108 111 111 -1.90128485e+07 1.79886915e+07 -7.83577061e+11 -1.79886915e+07 1.90128485e+07 7.83577061e+11 -4.45113808e+06 1.47611537e+06 -4.02766048e+12 0.00000000e+00 1.00000000e+00 2.29262576e+06 4464 ""
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Number of degrees of freedom: 9,287 (3,362+441+441+1,681+1,681+1,681)
Solving Stokes system... 0+0 iterations.

Postprocessing:
Compositions min/max/mass: 4.795e+06/4.795e+06/4.795e+16 // -4.795e+06/-4.795e+06/-4.795e+16 // -6.533/8.919/2.254e+08
Compositions min/max/mass: 4.795e+06/4.795e+06/4.795e+16 // -4.795e+06/-4.795e+06/-4.795e+16 // -5.602/6.258/1.859e+08
Number of advected particles: 11974


Expand All @@ -32,7 +32,7 @@ Number of degrees of freedom: 9,287 (3,362+441+441+1,681+1,681+1,681)
Solving Stokes system... 0+0 iterations.

Postprocessing:
Compositions min/max/mass: 8.44e+06/8.44e+06/8.44e+16 // -8.44e+06/-8.44e+06/-8.44e+16 // -11.41/16.65/5.028e+08
Compositions min/max/mass: 8.44e+06/8.44e+06/8.44e+16 // -8.44e+06/-8.44e+06/-8.44e+16 // -9.585/11.75/4.707e+08
Number of advected particles: 11971


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
# 21: Number of advected particles
# 22: Particle file name
0 0.000000000000e+00 0.000000000000e+00 400 3803 441 5043 0 52 54 54 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 11971 output-viscoelastic_numerical_elastic_time_step_particles/particles/particles-00000
1 1.000000000000e+03 1.000000000000e+03 400 3803 441 5043 0 4294967295 0 0 4.79487530e+06 4.79488675e+06 4.79488154e+16 -4.79488675e+06 -4.79487530e+06 -4.79488154e+16 -6.53267458e+00 8.91902788e+00 2.25403119e+08 11974 ""
2 2.000000000000e+03 1.000000000000e+03 400 3803 441 5043 0 4294967295 0 0 8.43958923e+06 8.43960990e+06 8.43960079e+16 -8.43960990e+06 -8.43958923e+06 -8.43960079e+16 -1.14145328e+01 1.66459729e+01 5.02828207e+08 11971 ""
1 1.000000000000e+03 1.000000000000e+03 400 3803 441 5043 0 4294967295 0 0 4.79487647e+06 4.79488675e+06 4.79488154e+16 -4.79488675e+06 -4.79487647e+06 -4.79488154e+16 -5.60216005e+00 6.25848943e+00 1.85867930e+08 11974 ""
2 2.000000000000e+03 1.000000000000e+03 400 3803 441 5043 0 4294967295 0 0 8.43959006e+06 8.43960993e+06 8.43960079e+16 -8.43960993e+06 -8.43959006e+06 -8.43960079e+16 -9.58450360e+00 1.17485974e+01 4.70684634e+08 11971 ""

0 comments on commit 259532b

Please sign in to comment.