Basis of DG elements

Hi,

I’m confused about the basis used for the DG elements of order 1 on triangular elements:

The following code, which assembles the mass matrix of the pressure space Ph, gives a diagonal matrix, which surprises me. Can you tell me exactly how the basis for the space L2(mesh, order=1) looks? Because in another code, it corresponds to {x, y, 1-x-y} on each element, which leads to a block tridiagonal mass matrix.

Vh = VectorH1(mesh, order=2)
Ph = L2(mesh, order=1)
Wh = FESpace([Vh, Ph])

a = BilinearForm(Wh)
a += p * q * dx
a.Assemble()

Thank you in advance.

We are using the so called Dubiner basis, an L2-orthogonal basis on triangles.

Have a look here:
https://jschoeberl.github.io/iFEM/pversion/hpfem.html#orthogonal-polynomials-on-triangles

and continue with Sec. 31

Joachim