Generating contour plots with Matplotlib, specifically with tricontourf on nonregular domains, can be extremely slow on 2D meshes with a few thousand elements. On the isentropic vortex case, with 50x50 rectangles (total of 5000 triangles), Matplotlib takes 4 mins to post process if the regular mesh setting is used, and about 30 mins if regular mesh is set to false. Since certain 2D problems of interest (such as oblique shocks) cannot be post processed with a regular mesh, it is desired to find an alternative tool chain to produce these plots more efficiently.
Some profiling was done to verify that this is a Matplotlib issue, not a Quail issue. Attached is an icicle plot from cProfile/Snakeviz that shows that almost all of the run time for this case was spent in Matplotlib's tricontourf function.
Suggested Solutions
There are several potential options for post processing. Paraview is a commonly used CFD post processing library that is free and open source, and has a Python interface. Other potential libraries of interest may be VTK or Mayavi. Software such as Tecplot may not be desirable, since it is not open source.
Problem
Generating contour plots with Matplotlib, specifically with tricontourf on nonregular domains, can be extremely slow on 2D meshes with a few thousand elements. On the isentropic vortex case, with 50x50 rectangles (total of 5000 triangles), Matplotlib takes 4 mins to post process if the regular mesh setting is used, and about 30 mins if regular mesh is set to false. Since certain 2D problems of interest (such as oblique shocks) cannot be post processed with a regular mesh, it is desired to find an alternative tool chain to produce these plots more efficiently.
Some profiling was done to verify that this is a Matplotlib issue, not a Quail issue. Attached is an icicle plot from cProfile/Snakeviz that shows that almost all of the run time for this case was spent in Matplotlib's tricontourf function.
Suggested Solutions
There are several potential options for post processing. Paraview is a commonly used CFD post processing library that is free and open source, and has a Python interface. Other potential libraries of interest may be VTK or Mayavi. Software such as Tecplot may not be desirable, since it is not open source.