Skip to content

Feature/dynamicpolymorphism

Christian Engwer requested to merge feature/dynamicpolymorphism into master

This is the first MR in a series to implement #26 (closed).

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 for solver/precoditioner/scalarproduct/linearoperator.

The main change is that the category isn't an enum anymore, but virtual method catergory().

This MR contains 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.
  • add SolverCategory::category(object) to be be backwards compatible
  • add a cmake switch to enable/disable the backwards compatibility
  • 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
    • remove static dependency of PropertiesGraphCreator on the category

This MR partially incorporates commits from !5 (closed) and !1 (closed).

Merge request reports