You can possibly use the PETSc object AO (see AOCreate()) to manage the 
reordering. The non-contiguous order you start with is the application ordering 
and the new contiguous ordering is the petsc ordering. Note you will likely 
need to reorder the cell vertex or edge numbers as well. 

   Barry


> On Nov 24, 2019, at 5:29 PM, Matthew Knepley <[email protected]> wrote:
> 
> On Sun, Nov 24, 2019 at 5:23 PM Peng Ding <[email protected]> wrote:
> 
> Dear sir:
>      I generate the 3D mesh with Tetgen for FVM computation.  I reordered the 
> cells and partitioned them with metis.  Then i got an array which records the 
> distribution of each cells.  For example, on CPU -0., I have:
>       1, 3, 6 , 7 ....11, 22......
>     But all these cells have non-continuos index, how to set the matrix in 
> petsc.
> 
> You will have to renumber them.
> 
>   Thanks,
> 
>     Matt
>  
> Regards
>     
> 
>       
> ztdepyahoo
> [email protected]
> 签名由 网易邮箱大师 定制
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments 
> is infinitely more interesting than any results to which their experiments 
> lead.
> -- Norbert Wiener
> 
> https://www.cse.buffalo.edu/~knepley/

Reply via email to