brahmap.base.InverseLO
¶
Bases: LinearOperator
Construct the inverse operator of a matrix A
, as a linear operator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
A
|
_type_
|
description |
required |
method
|
_type_
|
description, by default None |
None
|
preconditioner
|
_type_
|
description, by default None |
None
|
Source code in brahmap/base/linop.py
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 |
|
converged
property
¶
provides convergence information:
- 0 : successful exit;
-
0 : convergence to tolerance not achieved, number of iterations;
- <0 : illegal input or breakdown.
method
property
¶
The method to compute the inverse of A. \
It can be any :mod:scipy.sparse.linalg
solver, namely :func:scipy.sparse.linalg.cg
,
:func:scipy.sparse.linalg.bicg
, etc.
preconditioner
property
¶
Preconditioner for the solver.
isconverged(info)
¶
It returns a Boolean value depending on the exit status of the solver.
Parameters
info
: {int} output of the solver method (usually :func:scipy.sparse.cg
).
Source code in brahmap/base/linop.py
mult(x)
¶
It returns :math:y=A^{-1}x
by solving the linear system :math:Ay=x
with a certain :mod:scipy
routine (e.g. :func:scipy.sparse.linalg.cg
)
defined above as method
.