-
I'm searching for the base type of preconditioner and solver. Background is, that I want parametrize both in the application and then assemble the preconditioner to the solver and store the solver as attribute. As worst, I could store shared pointers for a selection of solvers (double and complex) but still it would help to have the preconditioner first base on selection and then add to the solver. Thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
First we need to differentiate between the configuration of a solver/preconditioner and an actual instance based on a matrix. A solver or preconditioner configuration can be represented by a If you are just looking for an easy way to make solvers configurable without recompilation, you should probably take a look at our config file setup, i.e. |
Beta Was this translation helpful? Give feedback.
First we need to differentiate between the configuration of a solver/preconditioner and an actual instance based on a matrix. A solver or preconditioner configuration can be represented by a
LinOpFactory
, while a solver/preconditioner on a specific matrix is represented by aLinOp
. The preconditioner configuration is part of the overall solver configuration, so it sounds like you should operate on theLinOpFactory
level rather than on theLinOp
level. If you want to configure the preconditioner for an unknown solver, you need to wrap that solver itself in a factory function that takes a preconditioner LinOpFactory and returns the solver LinOpFactory.If you are just looking for an easy wa…