Using Function Spaces with Varying Polynomial Degrees for hp-FEM in FEniCS(X)

Is it possible to have function spaces with spatially varying polynomial degrees, similar to what is used in hp-refinement (hp-FEM)? Are they implemented in FeNiCS(X)? If yes, are there any set of examples for getting started? If no, what are the alternative viable solutions?

A strong enforcement of the continuity condition between different P-refinements are currently not available in FEniCSx. However, you can use a weak enforcement (DG/nitsche type).
I have for instance done this at:

where I couple a P4 space and a P2 space with a DG method across the interfaces, resulting in the following figure:

1 Like