Operators¶
Classes and functions for creating custom instances of scipy.sparse.linalg.LinearOperator
.

class
pyiga.operators.
BaseBlockOperator
(shape, ops, ran_out, ran_in)¶

pyiga.operators.
BlockDiagonalOperator
(*ops)¶ Return a
LinearOperator
with block diagonal structure, with the given operators on the diagonal.

pyiga.operators.
BlockOperator
(ops)¶ Construct a block operator.
Parameters: ops (list) – a rectangular list of lists of operators or matrices. All operators in a given row should have the same height (output dimension). All operators in a given column should have the same width (input dimension). Empty blocks should use NullOperator
as a placeholder.Returns: LinearOperator – a block structured linear operator. Its height is the total height of one input column of operators, and its width is the total width of one input row. See also
numpy.bmat()
, which has analogous functionality for dense matrices.

class
pyiga.operators.
DiagonalOperator
(diag)¶ A
LinearOperator
which acts like a diagonal matrix with the given diagonal.

class
pyiga.operators.
IdentityOperator
(n, dtype=<class 'numpy.float64'>)¶ Identity operator of size n.

class
pyiga.operators.
KroneckerOperator
(*ops)¶ A
LinearOperator
which efficiently implements the application of the Kronecker product of the given input operators.

class
pyiga.operators.
NullOperator
(shape, dtype=<class 'numpy.float64'>)¶ Null operator of the given shape which always returns zeros. Used as placeholder.

class
pyiga.operators.
PardisoSolverWrapper
(shape, dtype, solver)¶ Wraps a PARDISO solver object and frees up the memory when deallocated.

pyiga.operators.
SubspaceOperator
(subspaces, Bs)¶ Implements an abstract subspace correction operator.
Parameters:  subspaces (seq) – a list of k prolongation matrices \(P_j \in \mathbb R^{n \times n_j}\)
 Bs (seq) – a list of k square matrices or instances of
LinearOperator
\(B_j \in \mathbb R^{n_j \times n_j}\)
Returns: LinearOperator – operator with shape \(n \times n\) that implements the action
\[Lx = \sum_{j=1}^k P_j B_j P_j^T x\]

pyiga.operators.
make_kronecker_solver
(*Bs)¶ Given several square matrices, return an operator which efficiently applies the inverse of their Kronecker product.

pyiga.operators.
make_solver
(B, symmetric=False, spd=False)¶ Return a
LinearOperator
that acts as a linear solver for the (dense or sparse) square matrix B.If B is symmetric, passing
symmetric=True
may try to take advantage of this. If B is symmetric and positive definite, passspd=True
.