[petsc-users] Retrieve a partial solution vector from AX=B

tibo at berkeley.edu tibo at berkeley.edu
Sat Sep 29 14:55:23 CDT 2012


Hi everyone,

I am using petsc to solve a system AX=B. I use the classical user approach
with a KSP context. In particular I use a LU factorization once (using the
external package MUMPS here, but it could be something else) and then use
KSP solve to solve for multiple different right hand sides.

However in my problem, I am only interested in a few elements (Let's say
as an example only the first 10 elements out of 100000) of the solution
vector.

Is there a way in petsc to ask to only retrieve the first few elements of
the solution vector, or do I have to perform the full vector calculation
and then "manually" retrieve the elements I want ?

Thank you for your help,

Tibo



More information about the petsc-users mailing list