Skip to main content

amg_vcycle

Function amg_vcycle 

Source
pub fn amg_vcycle<R, C>(
    client: &C,
    hierarchy: &AmgHierarchy<R>,
    rhs: &Tensor<R>,
    level: usize,
) -> Result<Tensor<R>>
where R: Runtime<DType = DType>, R::Client: SparseOps<R>, C: SparseOps<R> + BinaryOps<R> + UnaryOps<R> + ReduceOps<R> + ScalarOps<R>,
Expand description

Apply one AMG V-cycle: smooth → restrict → coarse-solve → prolongate → smooth

This is the preconditioner application: given residual r, compute z ≈ A^{-1} r