Skip to content

Dynamic order DG basis

This is an implementation of a Discontinous Galerkin (DG) basis that supports (element-wise) varying local finite elements. In particular, one can set the local polynomial degree at runtime. Currently, this is only fully implemented for a Qk basis, but most parts should be interchangeable:

  • The DynamicDGPreBasis is quite universal, one has to modify the Node
  • The DynamicOrderNode takes a Cache template parameter. This cache gives local FE which are asked for by order.
  • The DynamicOrderLocalFiniteElementCache implements such a cache taking another Factory which produces the actual finite element (so if you want different elements, say, e.g., Gauss-Lobatto, you only need to provide a suitable factory and change the template parameter)

If you need a more general Node (e.g. to deal with varying geometries (which are assumed to be uniform in the DynamicOrderNode)), you'd have to implement a node similar to the given one. However, I can't make the Node type a template parameter of the DynamicDGPreBasis (which would be cleaner) as the nodes needs also a TreePath template argument itself which I do not know beforehand. However, aside from the hardcoded Node type (and the form of its constructor), the pre-basis does not make any further Qk-specific assumptions as far as I can see.

I haven't tested this too broadly, yet (before this, I used another implementation which made more assumptions), so comments and tests are highly appreciated. Also, if things can be done better or differently, I'm open for comments.

Cosmetic things I see that maybe should be discussed:

  • the whole DynamicFooBar class naming scheme
  • code spread through three different header

Merge request reports