One way to do this is to call ISPartitioningCount() first to get the number of 
indices on each process and then call ISInvertPermutation() to get the IS that 
has the original global index. Here's what I've done in one of my code.

/* Convert the processor mapping IS to new global numbering */
    ierr = ISPartitioningToNumbering(is,&is_globalnew);CHKERRQ(ierr);
    PetscInt *nloc;
/* Convert new global numbering to old global numbering */
    ierr = PetscMalloc(nps*sizeof(PetscInt),&nloc);CHKERRQ(ierr);
    ierr = ISPartitioningCount(is,nps,nloc);CHKERRQ(ierr);  // nps is the 
number of processors.
    ierr = ISDestroy(is);CHKERRQ(ierr);
    ierr = ISInvertPermutation(is_globalnew,nloc[rank],&is);CHKERRQ(ierr);

The resultant "is" is the index set in the old global numbering.

Shri

On Aug 7, 2013, at 5:46 AM, 丁老师 wrote:

> In the ISPartitioningToNumbering(IS part,IS *is) 
> is define thee index set that defines the global numbers on each part.
> but how to get the original global index. 
> 
> 
> 

Reply via email to