Closed loiseaujc closed 1 year ago
I have just send a PR for this. For the moment, preconditioning is only effective for gmres
. I need to dig a bit deeper to see how preconditioning impacts the cg
and bicgstab
iterations. It will be needed eventually but I think we can get away with just gmres
for the time being.
At the moment, none of our linear solvers (
gmres
,bicgstab
, andcg
) actually support preconditioning. How about creating anabstract_precond
type with type-bound proceduresapply(x)
andundo(x)
(or something along those lines)?If we take
gmres
as an example (assuming we standardize the interface as suggested in #25), the interface could beand we have some
P%apply(x)
andP%undo(x)
wherever needed. For the sake of simplicity, I think only right preconditioning should be supported, i.e. $\mathbf{A} \mathbf{P} \mathbf{P}^{-1} \mathbf{x} = \mathbf{b}$ where $\mathbf{P} \simeq \mathbf{A}^{-1}$.What do you think?