[petsc-dev] What's the easiest route (for a beginner) to visualize a solution from a PETSc example?

Dave May dave.mayhem23 at gmail.com
Thu Jul 25 09:36:56 CDT 2019


On Wed, 24 Jul 2019 at 23:33, Patrick Sanan via petsc-dev <
petsc-dev at mcs.anl.gov> wrote:

> This came up in the beginner's working group meeting. We all seemed to
> agree that a very powerful thing for beginners is to be able to run a set
> of well-defined instructions to go from 0 to being able to solve and
> visualize a simple problem (I'm imagining a PDE on a 2D spatial domain).
>
> PETSc itself isn't a visualization library, obviously, so there are many
> ways to visualize data but most involve some external tools. We'd be
> interested in opinions on what we should recommend to beginners, for
> example one or more of:
>

Why only one?

I'd describe how to use the binary dump and how to generate vtk files.

The first is the most universal as it's completely generic and does not
depend on a dm, thus users with their own mesh data structure and or don't
have a mesh at all can use it. Would be worth while also providing a
minimal python+mathplotlib script which loads the data and spits out a PDF
so folks don't have to depend on matlab.

Vtk is fine but its not super easy to if you want to do some custom
quantitative analysis (rather than just look at the solution visually)

- Dump binary, load into MATLAB/Octave/Python+numpy+matplotlib
> - Dump something which Paraview and/or VisIt can open
> - Use PETSc's native drawing (X window) capabilities
> - Include custom script for the tutorials, say which requires libpng and
> produces an image
> - ASCII art
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190725/5b36e199/attachment.html>


More information about the petsc-dev mailing list