[petsc-users] how to set the matrix with the new cell ordering with metis

Smith, Barry F. bsmith at mcs.anl.gov
Sun Nov 24 21:40:04 CST 2019


  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 <knepley at gmail.com> wrote:
> 
> On Sun, Nov 24, 2019 at 5:23 PM Peng Ding <ztdepyahoo at gmail.com> 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
> ztdepyahoo at gmail.com
> 签名由 网易邮箱大师 定制
> 
> 
> -- 
> 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/



More information about the petsc-users mailing list