I’m running the following code:
from ngsolve import * from netgen.geom2d import SplineGeometry geo = SplineGeometry() geo.AddRectangle( (0.0, 0.0), (1.0, 1.0), bc=1 ) mesh = Mesh( geo.GenerateMesh(maxh=1.6)) mesh.Refine() mesh.Refine() mesh.Refine() Q = FacetFESpace(mesh, order=1) print("ndof qfe:", Q.ndof)
For the FacetFESpace, for order 1, I expect 2 DOFs per edge, but it seems I’m getting slightly more. There are a total of 208 edges, and I get a total of 493 DOFs for the whole mesh (I expect 416). For order 2, I expect to 624 DOFs, but get 701. As I increase the order, I realised that the total number of DOFs I get for the FacetFESpace, for the given mesh, is: DOFs = (p+1)*nrEdges + 77. Could you explain to me where the 77 extra DOFs comes from?