Hi Di Yang,
to check the number of degrees of freedom on a single quad for different polynomial orders you can use the following code
Code:
from ngsolve import *
from ngsolve.meshes import MakeStructured2DMesh
mesh = MakeStructured2DMesh(quads=True,nx=1,ny=1)
Draw(mesh)
print("RT")
for p in range(6):
fes = HDiv(mesh, order=p, RT=True)
print(p,":",fes.ndof)
print("BDM")
for p in range(6):
fes = HDiv(mesh, order=p+1)
print(p,":",fes.ndof)
which gives the output
RT: 0 : 4, 1 : 12, 2 : 24, 3 : 40, 4 : 60, 5 : 84
BDM: 0 : 12, 1 : 24, 2 : 40, 3 : 60, 4 : 84, 5 : 112
As you can see they coincide (RT is "shifted"). The reason for this is that RT elements are available for triangles and tetrahedra, but not for quadrilaterals, hexahedra, or prisms. So there are only BDM elements for quads.
Best
Michael