I am using NGSolve to solve Maxwell’s equations in time-harmonic form. I created a finite element space as:
fes = HCurl(mesh, order=3, type1=True, dirichlet=“outer")
which is the Nedelec space of first type of order 3.
Based on Nedelec’s definition of the first kind elements, the number of DOF is given by:
N_DOF=(Edges *3)+(Faces 6)+(Cells3).
In the initial mesh, I got an identical number of the DOF, but when I refine the mesh the resulted DOF number doesn’t match the number calculated by the above formula.
Here is the outputs:
fes.ndof = 183
calculated_ndof = 183
calculated_ndof-fes_ndof = 0
fes.ndof = 1177
calculated_ndof = 1323
calculated_ndof-fes_ndof = 146
fes.ndof = 8265
calculated_ndof = 9327
calculated_ndof-fes_ndof = 1062
I am grateful for any explanation
Find attached my python script.