The approaches#

The library provides three representations of a space with a cell-wise polynomial degree. All of them assemble the same discrete problem, and give the same solution up to the quadrature. Problems with vector valued fields, several fields or fields on the boundary (linear elasticity, Stokes and Signorini) are only implemented for the submesh approach.

Approach

Space

Continuous spaces

Demo

SubmeshApproach

One space per degree on the submesh of its cells, coupled through entity maps

Yes

Submesh

RestrictedApproach

One space per degree on the whole mesh, with its dofmap restricted to the cells of that degree

Yes

Restricted

HierarchicalApproach

Sub-matrices of a Legendre DG space of degree \(p_{max}\), which is hierarchical [Dub91]

No

Hierarchical

Restricted dofmaps#

Every iteration keeps the degrees of freedom of the parent space \(V_i\) in the closure of the cells of degree \(i\), computes their parallel layout with dolfinx.common.create_sub_index_map(), and creates a new dofmap on the same mesh. The results are the same as with submeshes, but the dofmaps are made by hand:

  • A kernel of an interior facet integral always tabulates both cells of the facet. A cell outside the restriction that neighbours it must therefore point to the degrees of freedom of its neighbour, which receive zero contributions.

  • The dofmap of every degree is kept on the whole mesh.

  • Anything beyond assembly over the restricted cells (output, interpolation on all cells, locating degrees of freedom) has to be done with care.

A hierarchical basis#

A cell of degree \(p_K\) keeps the first \(\dim P_{p_K}\) (on quadrilaterals and hexahedra \(\dim Q_{p_K}\)) degrees of freedom of a DG space of degree \(p_{max}\) with an orthonormal basis that is ordered by degree (hierarchical_element()). The matrices are extracted with petsc4py.PETSc.Mat.createSubMatrix(). With a fixed penalty \(\sigma=\alpha p_{max}^2\), the matrices are only assembled once. However:

  • it is limited to discontinuous spaces and scalar problems,

  • the operator of the maximal degree is assembled and stored on every cell,

  • every cell is integrated with the quadrature of the maximal degree,

  • with a degree dependent penalty, the matrices are assembled at every iteration.

Continuous spaces with Nitsche coupling#

With Parameters(continuous=True), the space of each degree is continuous within its region, and the regions are coupled weakly with Nitsche’s method on the interfaces [Nit71]. The submesh and the restricted dofmap approaches support this: the degrees of freedom of \(V_i\) on an interface are separate from those of \(V_j\), so the coupling is discontinuous exactly where the Nitsche terms are applied. A hierarchical basis cannot do this, as selecting rows and columns of a continuous space cannot break its continuity at the interfaces, which move at every iteration. See the continuous demo.

[Dub91]

Moshe Dubiner. Spectral methods on triangles and other domains. Journal of Scientific Computing, 6(4):345–390, 1991. doi:10.1007/BF01060030.

[Nit71]

Joachim Nitsche. Über ein Variationsprinzip zur Lösung von Dirichlet-Problemen bei Verwendung von Teilräumen, die keinen Randbedingungen unterworfen sind. Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg, 36(1):9–15, 1971. doi:10.1007/BF02995904.