- Thank you received: 0
Degrees of freedom of Hcurl space of type 1
5 years 4 months ago #1703
by Elsakori
Degrees of freedom of Hcurl space of type 1 was created by Elsakori
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)+(Cells*3).
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:
Initial mesh:
#nedge= 19
#nface= 18
#ne= 6
fes.ndof = 183
calculated_ndof = 183
calculated_ndof-fes_ndof = 0
First refinement:
#nedge= 117
#nface= 138
#ne= 48
fes.ndof = 1177
calculated_ndof = 1323
calculated_ndof-fes_ndof = 146
Second refinement:
#nedge= 721
#nface= 1002
#ne= 384
fes.ndof = 8265
calculated_ndof = 9327
calculated_ndof-fes_ndof = 1062
I am grateful for any explanation
Find attached my python script.
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)+(Cells*3).
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:
Initial mesh:
#nedge= 19
#nface= 18
#ne= 6
fes.ndof = 183
calculated_ndof = 183
calculated_ndof-fes_ndof = 0
First refinement:
#nedge= 117
#nface= 138
#ne= 48
fes.ndof = 1177
calculated_ndof = 1323
calculated_ndof-fes_ndof = 146
Second refinement:
#nedge= 721
#nface= 1002
#ne= 384
fes.ndof = 8265
calculated_ndof = 9327
calculated_ndof-fes_ndof = 1062
I am grateful for any explanation
Find attached my python script.
Attachments:
5 years 4 months ago - 5 years 4 months ago #1704
by joachim
Replied by joachim on topic Degrees of freedom of Hcurl space of type 1
when we refine the mesh, we keep also coarse edges and faces (needed for some multigrid versions). There are no degrees of freedom assigned to the coarse grid faces, as you can check like this:
Code:
for face in mesh.faces:
print (fes.GetDofNrs(face))
Last edit: 5 years 4 months ago by joachim.
The following user(s) said Thank You: Elsakori
Time to create page: 0.096 seconds