I am trying to implement a new finite element, Crouzeix-Raviart of degree 3 in dimension 2. But I actually don’t speak C++, so I kind of tried to combine P3 and P1nc (Crouzeix-Raviart of degree 1) and changed the basis of P1nc according to the definition.
Element_P3nc.zip (2.6 KB)
Obvouisly it doesn’t work yet. Could anyone help and take a look at what I did wrong and what I should change?
Thank you very much!
Definition of CR-element of degree 3:
Theorem 3.3 in https://arxiv.org/pdf/2105.14981.pdf
So we have the normal Lagrange basis of degree 3, except on the vertices, where we use the edge bubble, 1/2 * (5*(1 - (lambda_Ai)*2)^3 - 3 * (1 - (lambda_Ai)*2)) with lambda being the baricentric coordinate of the node Ai.