Skip to content

Resolve "NewtonMethod should support in-place parameter changes of TerminateInterface and LineSearchInterface"

What does this MR do?

This MR improves accessibility of some internal structures of the new NewtonSolver. Specifically, the instances of TerminateInterface and LineSearchInterface used in a NewtonSolver object can now be retrieved from it. Additionally, DefaultTerminate now implements single setters for its parameters.

I also removed the unconditional output of the maximum iterations from the DefaultTerminate::setParameters() method.

I updated the testnewton.cc test accordingly.

Open Questions

  • Setting the maximum iterations for NewtonSolver now is a bit easier, but it still requires a downcast from TerminateInterface to DefaultTerminate (as done in the test). Is there a better way to do this?

    Edit: @rhess suggested creating a new DefaultTerminate and inserting it into NewtonSolver. This is also how the test "advertises" the usage now.

Related Issues

Closes #167 (closed)

Edited by Lukas Riedel

Merge request reports

Loading