[petsc-users] Partitioning a mesh with petsc4py

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Wed Jul 8 07:17:09 CDT 2015


> On 8 Jul 2015, at 12:53, Javier Quinteros <javier at gfz-potsdam.de> wrote:
> 
> Signed PGP part
> Hi Matthew.
> Thanks for the answer. We've checked again and actually it is working
> with chaco. But we haven't found any example/way to use it with metis,
> that it's what we wanted.
> 
> I've seen that there is a new Partitioner class, but I could not find
> how to pass it to the DMPlex (in petsc4py).
> 
> Thanks in advance for any hint.

I think you do:

dm = PETSc.DMPlex().create()

part = dm.getPartitioner()

part.setType(part.Type.PARMETIS)

part.setUp()

now when you call dm.distribute() I think it will use the parmetis partitioner.

You can also pass the -petscpartitioner_type option to set things that way.

Lawrence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150708/9c5af278/attachment.pgp>


More information about the petsc-users mailing list