Skip to content

Unify Optimizer and Solver interface #61

@benedict-96

Description

@benedict-96

This is related to issues #60, #40 and (vaguely) #22.

At the moment the Optimizer and NewtonSolver structs are both subtyped from NonlinearSolver, share some properties but differ in others. I tried to visualize this with the following tikz pictures:

Image Image

Same colors indicate similar/equivalent functionality.
As can be seen the differences are:

  1. the Hessian and the Jacobian are not stored at the same level,
  2. the solver contains a result object, but the solver doesn't,
  3. the solver stores a linesearch, but the optimizer doesn't,
  4. the optimizer stores an "algorithm" and the solver doesn't. The "algorithm" in the optimizer mainly concerns how the Hessian is computed/approximated. The equivalent in the solver case would probably be the "mode" keyword that we parse to the nonlinearsystem and that determines how the Jacobian is computed.

Some of these discrepancies between solvers and optimizers may make sense, but I think many do not. I think we should settle on a more or less consistent interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededoptimizersLabeled issues concern the `Optimizer`; this will eventually be moved to `GeometricOptimizers`.solversThis issue concerns solvers (both linear and nonlinear).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions