[petsc-users] Get a smaller vector with PETSc

Jed Brown jedbrown at mcs.anl.gov
Tue Oct 8 14:55:01 CDT 2013


Matthew Knepley <knepley at gmail.com> writes:
>> What about VecGetSubVector()<http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecGetSubVector.html>?
>>
>
> Only works for local subsets.

Actually, VecGetSubVector() should work since in the case where the IS
is not both local and contiguous, it creates a VecScatter internally.
If you want a separate vector that you can keep (don't have to
VecRestoreSubVector) then you should use VecScatter yourself.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131008/9bc6fc72/attachment.pgp>


More information about the petsc-users mailing list