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

More
3 years 7 months ago #3664 by Younghigh
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
More
3 years 7 months ago #3666 by mneunteufel
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
More
3 years 7 months ago #3667 by Younghigh
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.
More
3 years 7 months ago #3668 by mneunteufel
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
Code:
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];
The following user(s) said Thank You: Younghigh
Time to create page: 0.100 seconds