Global to Local Vector Mapping

Tim Stitt timothy.stitt at ichec.ie
Mon Dec 3 12:23:36 CST 2007


I have a problem Matthew...this is a Fortran code..which I don't think 
this routine is compatible with. Is there any other way?

Matthew Knepley wrote:
> On Dec 3, 2007 11:49 AM, Tim Stitt <timothy.stitt at ichec.ie> wrote:
>   
>> Hi all,
>>
>> Is there a quick way to map a global index for a parallel vector to a
>> local mapping tuple (p,i) were 'p' represents the process containing the
>> value and 'i' is the local index number on that process?
>>     
>
> PetscMapGetGlobalRange(&v->map,const &range);
> for(p = 0; p < numProcs; ++p) if (range[p+1] > globalInd) break;
> localInd = globalInd - range[p];
>
>    Matt
>
>   
>> As always, thanks in advance for any information provided.
>>
>> Tim.
>>
>> --
>> Dr. Timothy Stitt <timothy_dot_stitt_at_ichec.ie>
>> HPC Application Consultant - ICHEC (www.ichec.ie)
>>
>> Dublin Institute for Advanced Studies
>> 5 Merrion Square - Dublin 2 - Ireland
>>
>> +353-1-6621333 (tel) / +353-1-6621477 (fax)
>>
>>
>>     
>
>
>
>   


-- 
Dr. Timothy Stitt <timothy_dot_stitt_at_ichec.ie>
HPC Application Consultant - ICHEC (www.ichec.ie)

Dublin Institute for Advanced Studies
5 Merrion Square - Dublin 2 - Ireland

+353-1-6621333 (tel) / +353-1-6621477 (fax)




More information about the petsc-users mailing list