pylops_mpi.optimization.cls_basic.CG#

class pylops_mpi.optimization.cls_basic.CG(Op, callbacks=None)[source]#

Conjugate gradient

Solve a square system of equations given either an MPILinearOperator or an MPIStackedLinearOperator Op and distributed data y using conjugate gradient iterations.

Parameters:
Oppylops_mpi.MPILinearOperator or pylops_mpi.MPIStackedLinearOperator

Operator to invert of size \([N \times N]\)

Notes

Solve the \(\mathbf{y} = \mathbf{Op}\,\mathbf{x}\) problem using conjugate gradient iterations.

Methods

__init__(Op[, callbacks])

callback(x, *args, **kwargs)

Callback routine

finalize([show])

Finalize solver

run(x[, niter, show, itershow])

Run solver

setup(y, x0[, niter, tol, show])

Setup solver

solve(y, x0[, niter, tol, show, itershow])

Run entire solver

step(x[, show])

Run one step of solver