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
Opand distributed datayusing conjugate gradient iterations.- Parameters:
- Op
pylops_mpi.MPILinearOperatororpylops_mpi.MPIStackedLinearOperator Operator to invert of size \([N \times N]\)
- Op
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