[petsc-users] VecGetOwnershipRanges
Satish Balay
balay at mcs.anl.gov
Tue Apr 16 10:48:22 CDT 2013
On Tue, 16 Apr 2013, Hui Zhang wrote:
> VecGetOwnershipRanges(Vec x,const PetscInt *ranges[])
>
> From the html manual page,
>
> range -array of length size+1 with the start and end+1 for each process
>
> Is it PetscInt ranges[size+1][2] or PetscInt ranges[size+1]?
Its ranges[size+1]
If you a vec of len 10 - distrbuted across 3 procs - say
proc-0 3
proc-1 3
proc-2 4
Then you have ranges[3+1] = {0,3,6,10}
Satish
>
> The function calls
>
> PetscLayoutGetRanges(PetscLayout map,const PetscInt *range[])
>
> for which the manual page says
>
> range -start of each processors range of indices (the final entry is one more then the last index on the last process)
>
> I'm sorry that I'm confused.
More information about the petsc-users
mailing list