[SciPy-Dev] bicgstab

Dieter Werthmüller dieter at werthmuller.org
Fri Nov 2 13:16:07 EDT 2018


On 02/11/2018 00:20, Stefan van der Walt wrote:
> On Thu, 01 Nov 2018 13:10:53 -0600, Dieter Werthmüller wrote:
>> Taking the opportunity for another question: Is it possible to create
>> `LinearOperator`s with more than one input variable, and provide it to,
>> e.g., `bigstabc`?
> 
> You can construct LinearOperators however you like, as long as they
> provide the API outlined in the docstring of
> `scipy.sparse.LinearOperator`.

I guess my doubt/question is if the other variables are updated. If I 
define the matrix M in the following form (for brevity with lambda, but 
equally with a function or with a class I guess)

M = LinearOperator((len(y), len(z)), matvec=lambda x: myfunc(x, y, z))

are the variables y and z then updated within M if they get changed 
during the call to, e.g., bicgstab? (My concern is specifically related 
to the preconditioner M for A, not for A itself.)

I might have a knot here in my thinking.

Thanks Stéfan. I will make a pull request next week regarding the docs.

Dieter

> I presumed you meant that you wanted to parameterize the construction of
> your operator, but I may have misunderstood.
> 
> Best regards,
> Stéfan


More information about the SciPy-Dev mailing list