Closed clason closed 1 month ago
See this https://github.com/JuliaMath/IterativeSolvers.jl/blob/01af27fe76069e6be566abfd862664f928997638/test/cg.jl#L12 for reference. There is only one function to be defined ldiv!(y, P, x)
.
Yes, that works, thank you!
Still, for this use case, the old behavior was much more convenient. Could I make the feature request to again provide a method that accepts an anonymous function for Pl
-- or was there some compelling technical reason for dropping this?
Another convenience function might be to accept a LinearMap
representing $P^{-1}$ -- i.e., whose mul!
function implements ldiv!
for $P$.
Check out Preconditioners.jl, which lets you do Pl = DiagonalPreconditioner([πe;πte])
.
The following used to work
where
H
is aLinearMap
andPl
implements a diagonal preconditioner for it (I don't think the details are relevant, but let me know if you need more code), but now gives aWhat is now the recommended way of implementing such a simple preconditioner? Do I need to define a full structure implementing all the different methods from the manual (which seems like overkill)?