I am currently trying to code the CA-CG method within the PETSc framework. A mandatory step in this process is the implementation of the "matrix powers kernel" algorithm for a generic sparse matrix.
This requires the computation of the index set obtained exploring the graph associated with the sparse matrix for s-steps, starting from the index set of the local rows "owned" by each process.
Is there a clean way to retrieve this kind of information using the PETSc API?