Skip to content

Commit 0357203

Browse files
committed
Improve documentation
1 parent d29f915 commit 0357203

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

benchmarks/newton_solver_benchmark_set/spiegelman_et_al_2016/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ After you have executed `run.sh`, you can use the gnuplot plotting script
1313
```{figure-md} fig:benchmark-newton-spiegelman-2016
1414
<img src="doc/figure_4.png" />
1515
16-
Convergence history of several models of the Spiegelman et al. benchmark: a reproduction of three of the nine pressure dependent Drucker–Prager cases with a resolution of 64 × 16 cells. Top: results for computations where linear systems are solved with a maximum relative tolerance of 0.9. Bottom: The same models solved with a tolerance of $10^{-8}$. The initial Picard iteration is always solved to a linear tolerance of $10^{-14}$. Left to right: different prescribed velocities of u0 = 2.5, 5, and 12.5 cm\yr, and and different background reference viscosities of respectively $\eta_{ref}$ = $10^{23}$, $10^{24}$ and $10^{25}$ Pa s. Horizontal axis: number of the non-linear (outer) iteration; and vertical axis: non-linear residual. "DC Picard" refers to a defect correction Picard iteration, see the paper describing this solver.
16+
Convergence history of several models of the Spiegelman et al. benchmark: a reproduction of three of the nine pressure dependent Drucker–Prager cases with a resolution of 64 × 16 cells. Top: results for computations where linear systems are solved with a maximum relative tolerance of 0.9. Bottom: The same models solved with a tolerance of $10^{-8}$. The initial Picard iteration is always solved to a linear tolerance of $10^{-14}$. Left to right: different prescribed velocities of u0 = 2.5, 5, and 12.5 cm\yr, and different background reference viscosities of respectively $\eta_{ref}$ = $10^{23}$, $10^{24}$ and $10^{25}$ Pa s. Horizontal axis: number of the non-linear (outer) iteration; and vertical axis: non-linear residual. "DC Picard" refers to a defect correction Picard iteration, see the paper describing this solver.
1717
```
1818

1919
The nonlinear convergence behavior of ASPECT's different nonlinear solvers is shown in {numref}`fig:benchmark-newton-spiegelman-2016`.

benchmarks/newton_solver_benchmark_set/spiegelman_et_al_2016/run.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ for case in 1 2 3; do
2828
mkdir -p $dirname
2929

3030
sed \
31-
-e "s/set Function expression = if(x<60e3,.*/ set Function expression = if(x<60e3,$U,-$U);0/g" \
32-
-e "s/set Reference viscosity .*/ set Reference viscosity = $background_viscosity/g" \
31+
-e "s/set Function expression = if(x<60e3,.*/set Function expression = if(x<60e3,$U,-$U);0/g" \
32+
-e "s/set Reference viscosity .*/set Reference viscosity = $background_viscosity/g" \
3333
-e "s/set Output directory .*/set Output directory = results\/$dirname_base/g" \
3434
-e "s/set Nonlinear solver scheme .*/set Nonlinear solver scheme = single Advection, iterated Stokes/g" \
3535
-e "s/set List of output variables .*/set List of output variables = material properties,strain rate/g" \
@@ -49,10 +49,10 @@ for case in 1 2 3; do
4949
mkdir -p $dirname
5050

5151
sed \
52-
-e "s/set Function expression = if(x<60e3,.*/ set Function expression = if(x<60e3,$U,-$U);0/g" \
53-
-e "s/set Reference viscosity .*/ set Reference viscosity = $background_viscosity/g" \
52+
-e "s/set Function expression = if(x<60e3,.*/set Function expression = if(x<60e3,$U,-$U);0/g" \
53+
-e "s/set Reference viscosity .*/set Reference viscosity = $background_viscosity/g" \
5454
-e "s/set Output directory .*/set Output directory = results\/$dirname_base/g" \
55-
-e "s/set Max pre-Newton nonlinear iterations .*/ set Max pre-Newton nonlinear iterations = $picard_iterations/g" \
55+
-e "s/set Max pre-Newton nonlinear iterations .*/set Max pre-Newton nonlinear iterations = $picard_iterations/g" \
5656
-e "s/set Stabilization preconditioner .*/set Stabilization preconditioner = $stabilization/g" \
5757
-e "s/set Stabilization velocity block .*/set Stabilization velocity block = $stabilization/g" \
5858
-e "s/set Maximum linear Stokes solver tolerance .*/set Maximum linear Stokes solver tolerance = $maximum_linear_tolerance/g" \

source/simulator/assemblers/newton_stokes.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ namespace aspect
178178
const typename Newton::Parameters::Stabilization
179179
preconditioner_stabilization = this->get_newton_handler().parameters.preconditioner_stabilization;
180180

181+
// use the correct strain rate for the Jacobian
182+
// when elasticity is enabled use viscoelastic strain rate
183+
// when stabilization is enabled, use the deviatoric strain rate because the SPD factor
184+
// that is computed is only safe for the deviatoric strain rate (see PR #5580 and issue #5555)
181185
SymmetricTensor<2,dim> effective_strain_rate = scratch.material_model_inputs.strain_rate[q];
182186
if (elastic_out != nullptr)
183187
effective_strain_rate = elastic_out->viscoelastic_strain_rate[q];
@@ -479,6 +483,10 @@ namespace aspect
479483
const Newton::Parameters::Stabilization velocity_block_stabilization
480484
= this->get_newton_handler().parameters.velocity_block_stabilization;
481485

486+
// use the correct strain rate for the Jacobian
487+
// when elasticity is enabled use viscoelastic strain rate
488+
// when stabilization is enabled, use the deviatoric strain rate because the SPD factor
489+
// that is computed is only safe for the deviatoric strain rate (see PR #5580 and issue #5555)
482490
SymmetricTensor<2,dim> effective_strain_rate = scratch.material_model_inputs.strain_rate[q];
483491
if (elastic_out != nullptr)
484492
effective_strain_rate = elastic_out->viscoelastic_strain_rate[q];

source/simulator/stokes_matrix_free.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,10 @@ namespace aspect
14241424

14251425
for (unsigned int q=0; q<n_q_points; ++q)
14261426
{
1427+
// use the correct strain rate for the Jacobian
1428+
// when elasticity is enabled use viscoelastic strain rate
1429+
// when stabilization is enabled, use the deviatoric strain rate because the SPD factor
1430+
// that is computed is only safe for the deviatoric strain rate (see PR #5580 and issue #5555)
14271431
SymmetricTensor<2,dim> effective_strain_rate = in.strain_rate[q];
14281432
if (elastic_out != nullptr)
14291433
effective_strain_rate = elastic_out->viscoelastic_strain_rate[q];

0 commit comments

Comments
 (0)