Anton,
> Modifying the constructor of FE_TraceQ fixes half of the problem. The
> implementation of constraints_are_implemented() and constraints()
> in FiniteElement are (methinks) wrong for FE_FaceQ/P. These are the
> elements with dofs on faces but w/o meaningful dof constraints, are
> they not?
The elements FE_FaceQ/P put all degrees of freedom on faces. When two
faces meet, the field is the same from both sides. For this reason, you
also need to have hanging node constraints for FE_FaceQ when the
refinement level from the two sides of the element differs. Therefore,
these elements have constraints just as usual continuous elements, even
though the solution space is discontinuous over vertices (and edges in
3D).
One might argue that the way we use constraints for FE_FaceQ in step-51
is suboptimal, though. Constraints in deal.II are constructed such that
one always takes the solution space from the coarse side. However, in
the HDG context such as step-51 you typically want to use the solution
space from the finer side because that is the richer solution space. We
have not really thought deeply about that, but I guess one could create
reasonable approximations for that case.
Thinking about the original problem a bit more, namely the constraints
for FE_TraceQ, lead me to the conclusion that you should also overload
get_face_interpolation_matrix, get_subface_interpolation_matrix,
hp_constraints_are_implemented, and compare_for_face_domination. See the
definition of FE_FaceQ. Only the first two methods require
implementation, for which you could again use the respective methods in
FE_Q_Base. (These methods are not called very often, so it is OK to
create a temporary FE_Q object within these methods.)
Best,
Martin