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?

  • 4
    $\begingroup$ 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.? $\endgroup$ – Christian Clason Nov 11 '16 at 16:30
  • $\begingroup$ 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 ... $\endgroup$ – GoHokies Nov 11 '16 at 16:30
  • 1
    $\begingroup$ 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 $\endgroup$ – cbcoutinho Nov 11 '16 at 16:57
  • 1
    $\begingroup$ @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. $\endgroup$ – GoHokies Nov 11 '16 at 17:22
  • $\begingroup$ 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? $\endgroup$ – cbcoutinho Nov 11 '16 at 17:39

You are confused about different concepts. A mesh is really just a collection of cells defined by the vertices of the mesh and which vertices together form each cell. Consequently, a mesh is an entirely geometric object. It knows nothing about finite element spaces one may define on it -- that's for a later step in your workflow. It's also important that mesh generators really only work on these geometric objects: They know nothing about CG, or DG, or any other function spaces.

Entirely separate from the mesh are the function spaces that you define on the mesh. Oftentimes, though not always, they are built by interpolating between nodes. If you have lowest order, continuous elements, these nodes happen to be located at vertices, but they are separate logical concepts. Likewise, if you use DG methods, the nodes are duplicated -- i.e., in 1d, you will have 2 nodes on each vertex, but there is still only one vertex.

The finite element spaces are defined in finite element codes, which are traditionally separate from mesh generators. As a consequence, you will just read a regular mesh, and then in your own code assign multiple degrees of freedom ("nodes") to each vertex.

| cite | improve this answer | |
  • $\begingroup$ Thanks for the answer. I think I was thrown off by the fact that a mesh maps directly to a CG function space for a system of 1 DoF per vertex, but that was just a consequence of my problem. Obviously a system of 2 DoFs would create a matrix of 2n*2n, but I didn't carry that over into my understanding of DG. $\endgroup$ – cbcoutinho Nov 11 '16 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.