[petsc-users] VecGetValuesBlocked

Barry Smith bsmith at mcs.anl.gov
Mon Feb 29 14:10:11 CST 2016


> On Feb 29, 2016, at 2:04 PM, Manav Bhatia <bhatiamanav at gmail.com> wrote:
> 
> Hi, 
> 
>  VecGetValuesBlocked is referenced by some documentation pages (http://www.mcs.anl.gov/petsc/petsc-3.6/docs/manualpages/Vec/VecGetValues.html), but does not seem to be in the code any more. 

  Yes looks like VecGetValuesBlocked doesn't exist

> 
>   Is VecGetValues the default method to get values from blocked storage of vectors as well?

   Yes
> If so, then are the rows in a single block assumed to be continuously numbered? 

   Yes


   An alternative to using VecGetValues() is to use VecGetArray() and then access the needed values from the array. To convert from global indices to the local indices needed in accessing in the array you can use VecGetOwnershipRange() and subtract off the "low" amount.

  Barry

> 
> Thanks,
> Manav
> 
> 



More information about the petsc-users mailing list