Skip to content

Commit

Permalink
Merge pull request #6245 from bangerth/message
Browse files Browse the repository at this point in the history
Improve wording and formatting of a message.
  • Loading branch information
gassmoeller authored Feb 26, 2025
2 parents 76bb664 + 3a8708a commit 5983723
Show file tree
Hide file tree
Showing 96 changed files with 590 additions and 431 deletions.
28 changes: 20 additions & 8 deletions source/simulator/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1947,35 +1947,47 @@ namespace aspect
}
catch (ExcNonlinearSolverNoConvergence &)
{
pcout << "\nWARNING: The nonlinear solver in the current timestep failed to converge." << std::endl
<< "Acting according to the parameter 'Nonlinear solver failure strategy'..." << std::endl;
pcout << "\n"
" WARNING: The nonlinear solver in the current timestep failed to converge.\n"
" Acting according to the parameter 'Nonlinear solver failure strategy':"
<< std::endl;
++nonlinear_solver_failures;

switch (parameters.nonlinear_solver_failure_strategy)
{
case Parameters<dim>::NonlinearSolverFailureStrategy::continue_with_next_timestep:
{
pcout << "Continuing to the next timestep even though solution is not fully converged." << std::endl;
// do nothing and continue
pcout << " Continuing to the next timestep even though solution is not fully converged."
<< std::endl
<< std::endl;
// swallow the exception and continue
break;
}
case Parameters<dim>::NonlinearSolverFailureStrategy::cut_timestep_size:
{
if (timestep_number == 0)
{
pcout << "Error: We can not cut the timestep in step 0, so we are aborting."
pcout << " Error: Can not cut the timestep in step 0. Aborting."
<< std::endl;
// Rethrow the current exception
throw;
}
time_stepping_manager.template get_matching_active_plugin<TimeStepping::RepeatOnNonlinearFail<dim>>().nonlinear_solver_has_failed();
else
pcout << " Trying to cut the current time step.\n"
<< std::endl;

time_stepping_manager.template get_matching_active_plugin<TimeStepping::RepeatOnNonlinearFail<dim>>()
.nonlinear_solver_has_failed();
break;
}

case Parameters<dim>::NonlinearSolverFailureStrategy::abort_program:
{
pcout << "Aborting simulation as requested." << std::endl;
// rethrow the current exception
pcout << " Aborting simulation as requested." << std::endl;
// Rethrow the current exception
throw;
}

default:
AssertThrow(false, ExcNotImplemented());
}
Expand Down
7 changes: 4 additions & 3 deletions tests/anisotropic_viscosity/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Number of degrees of freedom: 13,764 (8,450+1,089+4,225)
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 1.00018


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Heating rate (average/total): 5.225 W/kg, 8.978 W
RMS, max velocity: 1.08 m/s, 1.65 m/s
Expand Down
7 changes: 4 additions & 3 deletions tests/box_simple_surface_strain_rate_residual/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ Number of mesh deformation degrees of freedom: 2,187
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 1


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Max, min, and RMS residual strain rate invariant along boundary parts: 4.78651e-06 1/s, 1.30885e-06 1/s, 1.991e-06 1/s
Writing graphical output: output-box_simple_surface_strain_rate_residual/solution/solution-00000
Expand Down
7 changes: 4 additions & 3 deletions tests/compressibility/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Number of degrees of freedom: 13,764 (8,450+1,089+4,225)
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 1.00023


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Top/bottom flux: 1/2.718
Writing graphical output: output-compressibility/solution/solution-00000
Expand Down
14 changes: 8 additions & 6 deletions tests/continental_extension/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ Number of mesh deformation degrees of freedom: 462
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 1


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Temperature min/avg/max: 273 K, 1052 K, 1613 K

Expand All @@ -43,9 +44,10 @@ Continuing to the next timestep even though solution is not fully converged.
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 0.000259297


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Temperature min/avg/max: 273 K, 1052 K, 1613 K

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ Number of mesh deformation degrees of freedom: 462
Relative nonlinear residual (total system) after nonlinear iteration 5: 0.00189298


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Compositions min/max/mass: 0/1.472/6.041e+09 // 0/0/0 // 0/1/4e+09 // 0/1/4e+09 // 0/1/1.1e+10
Heat flux densities for boundaries: 0.19 W/m, 0.19 W/m, -0.344 W/m, 0.05501 W/m
Expand Down Expand Up @@ -115,9 +116,10 @@ Continuing to the next timestep even though solution is not fully converged.
Relative nonlinear residual (total system) after nonlinear iteration 5: 0.00366469


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Compositions min/max/mass: 0/1.472/6.043e+09 // 0/0.0008647/1.867e+06 // 0/1/4e+09 // -0.001458/1.001/3.999e+09 // -1.29e-07/1/1.1e+10
Heat flux densities for boundaries: 0.19 W/m, 0.19 W/m, -0.345 W/m, 0.05501 W/m
Expand Down Expand Up @@ -178,9 +180,10 @@ Continuing to the next timestep even though solution is not fully converged.
Relative nonlinear residual (total system) after nonlinear iteration 5: 0.000440009


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Compositions min/max/mass: 0/1.472/6.044e+09 // 0/0.001942/3.746e+06 // 0/1/4e+09 // -0.002998/1.002/3.998e+09 // -4.899e-07/1/1.1e+10
Heat flux densities for boundaries: 0.19 W/m, 0.19 W/m, -0.3448 W/m, 0.05502 W/m
Expand Down Expand Up @@ -241,9 +244,10 @@ Continuing to the next timestep even though solution is not fully converged.
Relative nonlinear residual (total system) after nonlinear iteration 5: 0.000186489


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Compositions min/max/mass: 0/1.473/6.046e+09 // 0/0.003107/5.626e+06 // 0/1/4e+09 // -0.004627/1.002/3.997e+09 // -1.281e-06/1/1.101e+10
Heat flux densities for boundaries: 0.1899 W/m, 0.19 W/m, -0.3445 W/m, 0.05503 W/m
Expand Down
7 changes: 4 additions & 3 deletions tests/darcy_convection_step/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ Number of degrees of freedom: 134 (50+9+25+25+25)
Relative nonlinear residual (total system) after nonlinear iteration 1: 1.00007


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Writing graphical output: output-darcy_convection_step/solution/solution-00000

Expand Down
7 changes: 4 additions & 3 deletions tests/drucker_prager_compression/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ Number of degrees of freedom: 2,804 (2,210+297+297)
Relative nonlinear residual (Stokes system) after nonlinear iteration 10: 0.015363


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
RMS, max velocity: 1.8e-11 m/s, 2e-11 m/s
Mass fluxes through boundary parts: -0.00054 kg/s, -0.00054 kg/s, 0 kg/s, 0.00108 kg/s
Expand Down
7 changes: 4 additions & 3 deletions tests/drucker_prager_extension/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ Number of degrees of freedom: 2,804 (2,210+297+297)
Relative nonlinear residual (Stokes system) after nonlinear iteration 10: 0.0972081


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
RMS, max velocity: 1.96e-11 m/s, 2.32e-11 m/s
Mass fluxes through boundary parts: 0.00054 kg/s, 0.00054 kg/s, 0 kg/s, -0.00108 kg/s
Expand Down
14 changes: 8 additions & 6 deletions tests/dynamic_friction/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ Number of mesh deformation degrees of freedom: 594
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 0.999994


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
RMS, max velocity: 0.00687 m/year, 0.01 m/year

Expand All @@ -31,9 +32,10 @@ Number of mesh deformation degrees of freedom: 2,090
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 0.999999


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
RMS, max velocity: 0.00687 m/year, 0.01 m/year

Expand Down
7 changes: 4 additions & 3 deletions tests/entropy_conduction/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ Number of degrees of freedom: 6,417 (2,406+402+1,203+1,203+1,203)
Relative nonlinear residual (total system) after nonlinear iteration 10: 0.0441691


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
RMS, max velocity: 1.64e-07 m/year, 8.46e-07 m/year
Temperature min/avg/max: 1600 K, 1833 K, 1993 K
Expand Down
14 changes: 8 additions & 6 deletions tests/global_melt/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ Number of degrees of freedom: 5,641 (1,666+801+1,666+225+833+225+225)
Relative nonlinear residual (total system) after nonlinear iteration 4: 0.0272016


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Writing graphical output: output-global_melt/solution/solution-00000
Compositions min/max/mass: 0/0/0 // 0/0/0
Expand Down Expand Up @@ -88,9 +89,10 @@ Continuing to the next timestep even though solution is not fully converged.
Relative nonlinear residual (total system) after nonlinear iteration 4: 0.000257626


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Writing graphical output: output-global_melt/solution/solution-00001
Compositions min/max/mass: 0/0/0 // 0/0/0
Expand Down
14 changes: 8 additions & 6 deletions tests/global_melt_parallel/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ Number of degrees of freedom: 5,641 (1,666+801+1,666+225+833+225+225)
Relative nonlinear residual (total system) after nonlinear iteration 4: 0.0272016


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Writing graphical output: output-global_melt_parallel/solution/solution-00000
Compositions min/max/mass: 0/0/0 // 0/0/0
Expand Down Expand Up @@ -88,9 +89,10 @@ Continuing to the next timestep even though solution is not fully converged.
Relative nonlinear residual (total system) after nonlinear iteration 4: 0.000257626


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
Writing graphical output: output-global_melt_parallel/solution/solution-00001
Compositions min/max/mass: 0/0/0 // 0/0/0
Expand Down
7 changes: 4 additions & 3 deletions tests/grain_size_yield/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Number of degrees of freedom: 1,885 (882+121+441+441)
Relative nonlinear residual (Stokes system) after nonlinear iteration 1: 1


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
RMS, max velocity: 0.000408 m/year, 0.000691 m/year
Mass fluxes through boundary parts: 1.651e+05 kg/yr, 1.651e+05 kg/yr, -1.651e+05 kg/yr, -1.651e+05 kg/yr
Expand Down
7 changes: 4 additions & 3 deletions tests/gs_drucker_prager_extension/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ Number of degrees of freedom: 3,909 (2,210+297+297+1,105)
Relative nonlinear residual (Stokes system) after nonlinear iteration 10: 2.40487e-05


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
RMS, max velocity: 2.05e-11 m/s, 2.51e-11 m/s
Mass fluxes through boundary parts: 0.00054 kg/s, 0.00054 kg/s, 0 kg/s, -0.00108 kg/s
Expand Down
7 changes: 4 additions & 3 deletions tests/gs_drucker_prager_extension_adiabatic/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ Number of degrees of freedom: 3,909 (2,210+297+297+1,105)
Relative nonlinear residual (Stokes system) after nonlinear iteration 10: 1.96723e-05


WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy'...
Continuing to the next timestep even though solution is not fully converged.
WARNING: The nonlinear solver in the current timestep failed to converge.
Acting according to the parameter 'Nonlinear solver failure strategy':
Continuing to the next timestep even though solution is not fully converged.

Postprocessing:
RMS, max velocity: 1.88e-11 m/s, 2.05e-11 m/s
Mass fluxes through boundary parts: 0.00054 kg/s, 0.00054 kg/s, 0 kg/s, -0.00108 kg/s
Expand Down
Loading

0 comments on commit 5983723

Please sign in to comment.