[petsc-users] VecGetOwnershipRanges

Hui Zhang mike.hui.zhang at hotmail.com
Tue Apr 16 10:59:57 CDT 2013


On Apr 16, 2013, at 5:48 PM, Satish Balay wrote:

> 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

Thanks a lot! 
> 
>> 
>> 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