[petsc-users] Visualizing a 3D parallel DMPLEX mesh

Matthew Knepley knepley at gmail.com
Sat Oct 3 21:19:09 CDT 2020


On Sat, Oct 3, 2020 at 8:36 PM Swarnava Ghosh <swarnava89 at gmail.com> wrote:

> Hi Petsc users,
>
> I have a 3D distributed DMPLEX mesh. I would like to visualize the mesh.
> Specifically, I want to see domain ownership of every MPI rank, i.e. each
> rank with a different color. . Would you please suggest the best way to do
> this?
>

I do it this way. I use DMViewFromOptions(dm, NULL, "-dm_view") in my code.
Then I run it

  ./my_prog -dm_view hdf5:mesh.h5 -dm_partition_view
  ${PETSC_DIR}/lib/petsc/bin/petsc_gen_xdmf.py mesh.h5

which creates mesh.h5 and mesh.xmf which can be loaded in Paraview. There
is a "rank" field there that you can visualize over the mesh.

  Thanks,

     Matt


> Sincerely,
> SG
>


-- 
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/20201003/ca7d4b65/attachment.html>


More information about the petsc-users mailing list