How is the L2 Qk element basis ranked? Is there a law about its ranking?

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, xy, xy2, x2, x2*y, x2*y2, y, y2},

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

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.


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];