# Library for generating Discontinuous Galerkin FEM mesh

There are a number of packages available for generating Continuous Galerkin (CG) FEM meshes (gmsh, tetgen, netgen, etc.), but I have been unable to find one that generates Discontinuous Galerkin (DG) FEM meshes.

I'm currently interested in focusing on the solver part of DG, not the mesh construction, so a package that creates a simple DG quadrilateral/triangle mesh would be fine. I'm looking for an array of coordinates, node numbers, and element/node connectivity. Converting a CG mesh file (such as Gmsh) into a discontinuous one would also be fine.

Has this been done before - and if yes, what is available for personal use?

• How does a mesh for DG differ from one for CG? Why can't you just use a mesh generated by gmsh, tetgen, netgen etc.? Nov 11, 2016 at 16:30
• I don't think there is any difference between a CG and DG mesh as you define it (coordinates, node numbers, and element connectivity). you can use a gmsh mesh in a DG solver, for example, as was done here. The differences between the two methods come about when you define your finite elements (for DG, they have only local support and neighboring elements are weakly coupled via local fluxes), DOFs, quadrature points, mappings ... Nov 11, 2016 at 16:30
• As far as I understand it, for a basic linear 1D mesh of n dofs in a CG mesh, there are n*2-2 dofs in a DG mesh, all internal nodes are doubled. If the nodes are doubled, how is that reflected in the mesh file itself? From your comments I'm beginning to think I don't understand DG at all Nov 11, 2016 at 16:57
• @cbcoutinho A mesh node and a DoF are different concepts. The mesh file/object knows nothing about the DoFs; the latter are determined by your choice of elements, discretization order, number of quadrature points, etc. Nov 11, 2016 at 17:22
• You're right, in general mesh nodes and DoFs are not the same, but for a basic heat equation, where there is only 1 state variable, these are identical - correct? And as for my other point w.r.t the DoFs between internal nodes of CG and DG, and I'm missing the mark here? Nov 11, 2016 at 17:39