Tell me more ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer

up vote 2 down vote accepted

Use MatIncreaseOverlap() just like PCASM (additive Schwarz preconditioner) to get the overlapping region, then MatGetSubMatrices() (also like PCASM) to pull out the overlapping part of the matrix.

For further technical discussion of implementation, we encourage you to subscribe to petsc-dev@mcs.anl.gov or just email petsc-maint@mcs.anl.gov.

share|improve this answer
Many thanks! That worked out exactly as expected. – Massimiliano Aug 22 '12 at 13:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.