Closed loiseaujc closed 1 year ago
This is probably the easiest issue among #27, #26 and this one. I'll start working on it later tonight. I think I can get it done in an hour or so. I will create a dedicated branch and send a PR as soon as I'm done.
The interface for
gmres
readsgmres(A, b, x, info, kdim, maxiter, tol, verbosity, transpose)
while that for
bicgstab
(before my modifications in #24) isbicgstab(A, b, x, info, maxiter, tol, verbosity, transpose)
Likewise, the interface for
cg
iscg(A, b, x, info, maxiter, tol, verbosity)
It would be nice to somehow standardise these interfaces, most notably if we include additional linear solvers later on which might require the definition of new input parameters. How about some
abstract_opts_type
that we extend for each different solvers? Takinggmres
as an example, the header of the subroutine would look likewhere
gmres_opts
is a type extendingabstract_opts_type
and containing the standard fields such askdim
,maxiter
,tol
andverbosity
. The interface for all other linear solvers would then look the same, i.e.That would be particularly useful in the
rational_arnoldi_factorization
for instance where I pass a subroutinesolve
as input argument to solve the problem $\left( \mathbf{I} - \mathbf{A}/\sigma \right) \mathbf{x} = \mathbf{b}$. Having a standardized interface would allow us to pass any linear solver we want, even those that aren't yet implemented.What do you think?