LinearSolve.jl
LinearSolve.jl copied to clipboard
Give solver parameters as argument when defining solver type with IterativeSolvers
It would be nice to be able to give solver parameters as arguments when defining the solver type. Currently I think one has to give the solver parameters as keywordargument to the solve function.
A = rand(10,10)
b = rand(10)
prob = LinearProblem(A,b)
solver = IterativeSolversJL_CG(maxiters=100) #This currently works
LinearSolve.solve(prob, solver) #..but this throws an error because maxiters is not a valid keyword argument for Iterativesolvers.cg
Note that if I change the keyword argument maxiters
for IterativeSolversJL_CG()
to maxiter
(remove the s), it works.