Hi all,

In DG methods over quadrilateral meshes, we tend to use L2 Qk element, like L2 Q1 basis is

{1, x, x*y, y},

L2 Q2 basis is

{1, x, x*y, x*y**2, x**2, x**2*y, x**2*y**2, y, y**2},

…

We want to know the ranking of L2 Qk element basis in NGSolve, especially for high number k.

Best,

Di Yang

Hi Di Yang,

Q_k is a tensor product, Q_k = P_k(x) x P_k(y), and as dim(P_k) = k+1there holds dim(Q_k) = (k+1)^2.

Best

Michael

Thank u. I mean the ranking of degree of freedom in L2 Qk element basis, like Q1,

the order is 1, x, xy, y, but I have no idea about high k.

In fem/l2hofe_impl.hpp in function L2HighOrderFE_Shape<ET_QUAD> ::T_CalcShape about line 430 the code for the computation of the quad basis reads

```
LegendrePolynomial (p, xi, polx);
LegendrePolynomial (q, eta, poly);
for (size_t i = 0, ii = 0; i <= p; i++)
for (size_t j = 0; j <= q; j++)
shape[ii++] = polx[i] * poly[j];
```