Skip to content

[WIP] add dynamic interface for category check to solver/precoditioner/scalarproduct/linearoperator

Christian Engwer requested to merge feature/dynamicpolymorphism into master

The solver interfaces use dynamic polymorphism, but currently it is not possible to fully benefit from this feature. We want to allow the user to take full benefit from a dynamic interface.

We intend the following changes:

  • new method category() to check for the same SolverCategory of different components at run time. This is a slight drawback compared to the current compile time checks, but it adds a lot of flexibility as we will be able to write factory classes for solvers and compose/exchange solvers at runtime.
    • update solvers to the new interface
    • update preconditioners to the new interface
    • update scalar products to the new interface
    • update operators to the new interface
    • update AMG implementation to the new interface
  • an additional intermediate class IterativeSolver encapsulates the data of almost all solvers
    • the solvers inherit from IterativeSolver and can usually reuse its constructor
    • the solvers only have to implement one apply method, the other is implemented generically
    • update all solvers to implement the apply method taking a reduction parameter
  • cleanup interface headers
    • move ScalarProduct base class to a separate header
    • move interface headers to dune/istl/common
  • cleanup object creation
    • add a unified constructor interface taking a ParameterTree
    • add factory classes to create solvers/preconditioners/etc.
    • get rid of ScalarProductChooser

(no guarantee that the list is complete 😃 )

Merge request reports