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:
Gnumpy.ndarray

Multi-dimensional convolution kernel of size \([n_{\text{slice}} \times n_x \times n_y]\)

nzint, optional

Additional dimension of model

saveGtbool, optional

Save G and G.H to speed up the computation of adjoint (True) or create G.H on-the-fly (False) Note that saveGt=True will double the amount of required memory

usematmulbool, optional

Use numpy.matmul (True) or for-loop with numpy.dot (False). As it is not possible to define which approach is more performant (this is highly dependent on the size of G 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_commmpi4py.MPI.Comm, optional

MPI Base Communicator. Defaults to mpi4py.MPI.COMM_WORLD.

dtypestr, optional

Type of elements in input array.

Attributes:
shapetuple

Operator 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