pylops_mpi.signalprocessing.MPIFredholm1#
- class pylops_mpi.signalprocessing.MPIFredholm1(G, nz=1, saveGt=False, usematmul=True, base_comm=<mpi4py.MPI.Intracomm object>, dtype='float64')[source]#
Fredholm integral of first kind.
Implement a multi-dimensional Fredholm integral of first kind distributed across the first dimension
- Parameters:
- G
numpy.ndarray
Multi-dimensional convolution kernel of size \([n_{\text{slice}} \times n_x \times n_y]\)
- nz
int
, optional Additional dimension of model
- saveGt
bool
, optional Save
G
andG.H
to speed up the computation of adjoint (True
) or createG.H
on-the-fly (False
) Note thatsaveGt=True
will double the amount of required memory- usematmul
bool
, optional Use
numpy.matmul
(True
) or for-loop withnumpy.dot
(False
). As it is not possible to define which approach is more performant (this is highly dependent on the size ofG
and input arrays as well as the hardware used in the computation), we advise users to time both methods for their specific problem prior to making a choice.- base_comm
mpi4py.MPI.Comm
, optional MPI Base Communicator. Defaults to
mpi4py.MPI.COMM_WORLD
.- dtype
str
, optional Type of elements in input array.
- G
- Attributes:
- shape
tuple
Operator shape
- shape
- Raises:
- NotImplementedError
If the size of the first dimension of
G
is equal to 1 in any of the ranks
Notes
A multi-dimensional Fredholm integral of first kind can be expressed as
\[d(k, x, z) = \int{G(k, x, y) m(k, y, z) \,\mathrm{d}y} \quad \forall k=1,\ldots,n_{slice}\]on the other hand its adjoint is expressed as
\[m(k, y, z) = \int{G^*(k, y, x) d(k, x, z) \,\mathrm{d}x} \quad \forall k=1,\ldots,n_{\text{slice}}\]This integral is implemented in a distributed fashion, where
G
is split across ranks along its first dimension. The inputs of both the forward and adjoint are distributed arrays with broadcast partion: each rank takes a portion of such arrays, computes a partial integral, and the resulting outputs are then gathered by all ranks to return a distributed arrays with broadcast partion.Methods
__init__
(G[, nz, saveGt, usematmul, ...])adjoint
()Adjoint MPI LinearOperator
conj
()Complex conjugate operator
dot
(x)Matrix Vector Multiplication
matvec
(x)Matrix-vector multiplication.
rmatvec
(x)Adjoint Matrix-vector multiplication.
transpose
()Transposition of MPI LinearOperator