Skip to content

Conversation

jalvesz
Copy link
Contributor

@jalvesz jalvesz commented May 17, 2025

This daft PR introduces the base for iterative solvers.

Two methods are proposed:

  • Conjugate Gradient (CG)
  • Preconditioned Conjugate Gradient (PCG)

Each method is made public with two public interface flavors:

  • solve_<method>_kernel: All arguments are mandatory (no optionals/no internal allocations), it contains the methods steps. The linear system (and preconditioner) is defined through a public DT linop which enables to extend two key procedures: apply equivalent to a matrix-vector product and inner equivalent to the dot_product. This is the interface recommended to extend the method when dealing with a matrix type not available in stdlib or when working in distributed-memory frameworks for which the matvec, dot_product and factorization steps need to be adapted to account for parallel synchronization.
  • solve_<method>: API with optional arguments, the linear system can be defined with dense or CSR_<>_type matrices. For the PCG, the following preconditioners are available: none (identity), jacobi (1/diagonal). It internally uses solve_<method>_kernel.
  • tests
  • examples
  • documentation

jalvesz and others added 30 commits March 2, 2025 22:26
jalvesz and others added 30 commits September 16, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants