phipict.solvers.amg

Algebraic-multigrid preconditioning for the Poisson-type solves.

Functions

amg_pcg_solve(rhs, x, hierarchy, *, tol, ...)

Solve A x = rhs in place with AMG-preconditioned CG.

build_amg_hierarchy(csr_mat, *[, method, ...])

Build a V-cycle hierarchy for csr_mat using pyamg on the host.

clear_interpolation_cache()

Drop all cached AMG interpolation hierarchies (frees their GPU memory).

csr_to_scipy(csr_mat)

Convert a _C.CSRmatrix to a host-side scipy CSR matrix.

galerkin_refresh(hierarchy, csr_mat, *[, ...])

Re-use the interpolation of hierarchy for a new fine-level operator.

hierarchy_for(csr_mat, *[, ...])

AMG hierarchy for csr_mat, re-using a cached interpolation if possible.

is_pyamg_available()

Return whether the optional pyamg dependency can be imported.

native_amg_available()

Return whether the compiled extension provides the CUDA AMG-PCG solver.

Classes

AMGHierarchy(levels, coarse_pinv[, ...])

A multigrid hierarchy, applied as a single V-cycle.

AMGSolveInfo(finalResidual, usedIterations, ...)

Duck-type of _C.LinearSolverResultInfo.