[petsc-users] Using parmetis from petsc

Matthew Knepley knepley at gmail.com
Wed Feb 10 06:12:18 CST 2021


On Wed, Feb 10, 2021 at 4:07 AM Edoardo alinovi <edoardo.alinovi at gmail.com>
wrote:

> Hello PETSc friends,
>
> I am working on a code to partition a mesh in parallel and I am looking
> at parmetis. As far as I know petsc is interfaced with metis and parmetis
> and I have seen people using it within dmplex. Now, I am not using dmplex,
> but  I have petsc compiled along with my code for the linear system part.
> I am wondering if there is a way to load up a mesh file in the parmetis
> format and use petsc to get the elements partitioning only in output. Is
> that possible?
>

ParMetis does not really have a mesh format. It partitions distributed
graphs. Most people want to partition cells in their mesh, and
then ParMetis would want the graph for cell connectivity. This is not
usually what people store, so typically there is a conversion process
here. If you want to use PETSc for partitioning, and not use DMPlex, the
easiest way to do it is to put your cell connectivity in a Mat,
storing the adjacency graph for cells. Then use MatPartitioning.

 Thanks,

     Matt


> Thank you for the help,
>
> Edoardo
>
-- 
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/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210210/de480852/attachment.html>


More information about the petsc-users mailing list