Skip to content

Backport "Resolve "NewtonMethod should support in-place parameter changes of TerminateInterface and LineSearchInterface"" to releases/2.7

Lukas Riedel requested to merge cherry-pick-98fc0ca8 into releases/2.7

Description

This MR backports the changes from !525 (merged) into the releases/2.7 branch.

Why was this MR needed?

I currently update our software DORiE to PDELab v2.7 (I'm late, I know). In our code, we regularly update the allowed maximum iterations of the Newton solver. This is why I proposed !525 (merged) in the first place. While theses changes mostly make modifying the allowed iterations more comfortable, they also remove an unconditional output to cout. The only way of stopping this output would be some weird fiddling with the output stream.

DORiE output usually (and with this MR applied):

[11:23:24.247 I]  Starting DORiE
[11:23:24.247 I]  Reading configuration file: /builds/dorie/dorie/build-cmake/test/ref_muphi.ini
[11:23:24.247 I]  Creating a rectangular grid in 2D
[11:23:24.248 I]  Opening H5 file: /builds/dorie/dorie/test/maps/muphi.h5
[11:23:24.250 I]  Reading H5 dataset: field
[11:23:24.255 I] [RIC]  Loading parameter data file: /builds/dorie/dorie/test/param/richards_param.yml
[11:23:24.256 I] [RIC]  Loading boundary condition data file: /builds/dorie/dorie/test/bcs/infiltration.yml
[11:23:24.261 I] [RIC]  Setup complete
[11:23:25.575 I] [RIC]  Time Step 0: 0.00e+00 + 1.00e+01 -> 1.00e+01
[11:23:26.906 I] [RIC]  Time Step 1: 1.00e+01 + 1.50e+01 -> 2.50e+01
[11:23:28.253 I] [RIC]  Time Step 2: 2.50e+01 + 2.25e+01 -> 4.75e+01
[11:23:29.650 I] [RIC]  Time Step 3: 4.75e+01 + 3.38e+01 -> 8.12e+01
[11:23:31.097 I] [RIC]  Time Step 4: 8.12e+01 + 5.06e+01 -> 1.32e+02

The DORiE output with current releases/2.7 is cluttered with the maxIteration output:

[11:23:24.247 I]  Starting DORiE
[11:23:24.247 I]  Reading configuration file: /builds/dorie/dorie/build-cmake/test/ref_muphi.ini
[11:23:24.247 I]  Creating a rectangular grid in 2D
[11:23:24.248 I]  Opening H5 file: /builds/dorie/dorie/test/maps/muphi.h5
[11:23:24.250 I]  Reading H5 dataset: field
[11:23:24.255 I] [RIC]  Loading parameter data file: /builds/dorie/dorie/test/param/richards_param.yml
[11:23:24.256 I] [RIC]  Loading boundary condition data file: /builds/dorie/dorie/test/bcs/infiltration.yml
40
[11:23:24.261 I] [RIC]  Setup complete
9
[11:23:25.575 I] [RIC]  Time Step 0: 0.00e+00 + 1.00e+01 -> 1.00e+01
9
[11:23:26.906 I] [RIC]  Time Step 1: 1.00e+01 + 1.50e+01 -> 2.50e+01
8
[11:23:28.253 I] [RIC]  Time Step 2: 2.50e+01 + 2.25e+01 -> 4.75e+01
8
[11:23:29.650 I] [RIC]  Time Step 3: 4.75e+01 + 3.38e+01 -> 8.12e+01
7
[11:23:31.097 I] [RIC]  Time Step 4: 8.12e+01 + 5.06e+01 -> 1.32e+02
7

Info

Closes #167 (closed)

See merge request !525 (merged)

(cherry picked from commit 98fc0ca8)

Edited by Lukas Riedel

Merge request reports

Loading