# Visualizing discontinuous Galerkin/finite element data

I would like to visualize simulation results, obtained using the discontinuous Galerkin (DG) approach, within ParaView. Similarly to finite volume methods, the problem domain is divided into cube-shaped cells ("elements"). As opposed to finite volume methods, within each cell there is not just one value for the solution vector $\mathbf{u}$, but each cell contains the solution $\mathbf{u}$ at multiple Gauss integration points.

My question is whether anyone has experience with visualizing such data efficiently with ParaView/VTK, and what approach you chose to represent the data in VTK. Several possible ways come to my mind, but I do not know which one is the most promising:

(1) Use voxels
Use one voxel for each integration point.
Pro: All plugins that work with the standard VTK unstructured cell types will continue to work without changing anything.
Con: Since the integration points are not distributed evenly, it might be difficult to find the correct location of the vertices. Also, the solution can be defined twice on the cell surfaces, as the DG framework allows discontinuous solutions. Also, the hierarchical information (domain divided into elements, each element contains several points) is lost.

(2) Use polyvertices
Use one vertex per integration point.
Pro: Easiest to implement, easy to specify multiple points at the same location with different solutions.
Con: Capability to visualize data as "cells" is lost, plus the same disadvantages as above.

Use the built-in support for quadrature schemes.
Pro: Rather straightforward implementation, preserves all relations and properties of the original solution.
Con: Since this is a completely new cell type, many (most) of the existing plugins will not work anymore and will probably have to be rewritten.

-
 Could someone with editing rights please add the (new) tags paraview, vtk, discontinuous-galerkin? Thank you. – Michael Schlottke Aug 14 '12 at 9:42 Okay, added the tags. – Aron Ahmadia Aug 15 '12 at 12:43 Thank you, @AronAhmadia – Michael Schlottke Aug 16 '12 at 8:37

deal.II uses option (2) for a long time already with very good success. In other words, in 2d, every vertex appears 4 times in the output file which means there is more data to be written but fields can be discontinuous. The only other drawback I am aware of is that some visualization programs can't follow interfaces between cells that don't share vertices when doing streamlines, though today they seem to have become better.

You may also want to look at this entry in our FAQs: http://dealii.sourceforge.net/index.php/Deal.II_Questions_and_Answers#The_graphical_output_files_don.27t_make_sense_to_me_.E2.80.94_they_seem_to_have_too_many_degrees_of_freedom.21

-
 Thanks, Wolfgang, this is exactly the kind of answer I was looking for. – Michael Schlottke Aug 16 '12 at 12:46