scikit-fem
scikit-fem copied to clipboard
Nédélec element availble for MeshTet but not for MeshQuad
There exist the lowest order Nédélec element skfem.element.ElementTetN0 for 3D tetrahedral mesh, but no such equivalent for other meshes like the 2D MeshQuad.
By looking at the file element_tet_n0.py, the code for defining a new element type seems relatively simple. But I am not sure how to verify the correctness of a new implementation (make sure it works with the rest of the codebases such as matrix assembly). The unit test file test_elements.py does not contain the class ElementTetN0 as of version 5.2.0
but no such equivalent for other meshes like the 2D MeshQuad
The docstring for the superclass ElementHcurl does say
https://github.com/kinnala/scikit-fem/blob/04730d80d612470b7e802eed4c21dd96b89cef61/skfem/element/element_hcurl.py#L9
Do you have an application for H (curl) in two dimensions? I can sort of imagine it, but I don't think I've seen it before. It'd be much like ElementQuadRT0, wouldn't it, with all the vectors rotated through a right-angle? I wonder whether curl is different enough in two and three dimensions that it might make sense to treat these separately rather than trying to generalize the current three-dimensional ElementHcurl.
The unit test file test_elements.py does not contain the class ElementTetN0 as of version 5.2.0
ElementTetN0 does appear in
https://github.com/kinnala/scikit-fem/blob/04730d80d612470b7e802eed4c21dd96b89cef61/docs/examples/ex33.py#L24
and so is tested indirectly to some extent in
https://github.com/kinnala/scikit-fem/blob/04730d80d612470b7e802eed4c21dd96b89cef61/tests/test_examples.py#L281
but yes something appropriate and more direct in tests.test_elements might be good too.
I suggest we add also a convergence test for ElementTetN0. Could be a manufactured solution, any other suggestions?
No, that seems best. I was looking at ex33 again in this context and then Schneebeli's ‘An H(curl; Ω)-conforming FEM’, on which it's based. I assume f in (33) for the PDE (1) is from a manufactured solution but I don't see the expression for u… an exercise for the reader? I'll see if I can reverse that next week if you haven't already.
This paper also treats the ElementQuadN0 (§2.3.1).
I'll see if I can reverse that next week
No, too hard; I propose manufacturing a new u.
Do you have an application for H (curl) in two dimensions?
I came across one: eq. 3.6 and §4.1 of
- Gao, H. & Sun, W. (2015). An efficient fully linearized semi-implicit Galerkin-mixed FEM for the dynamical Ginzburg–Landau equations of superconductivity. Journal of Computational Physics 294:329–345
They do have a nice manufactured solution in Example 4.1 as well as more physically interesting examples in Examples 4.2 – 4.4. There's also a three-dimensional manufactured solution in Example 4.5; however the system is rather more involved than our ex33 so not so suitable for a test.
Could be a manufactured solution, any other suggestions?
What about the eigenvalue problem curl curl u = λ u in Ω, n × u = 0 on ∂Ω? For the box 0 < (x/a, y/b, z/c) < π, the eigenvalues are λ = (k0/a)² + (k1/a)² + (k2/c)², where at most one of the ki can vanish at the same time; see (2.7) and (6.4) of
- Adam, S., Arbenz, P. & Geus, R. (1997). Eigenvalue solvers for electromagnetic fields in cavities (Technische Berichte 275). ETH Zürich, Departement Informatik
This has moved forward; there is now ElementTriN0 also and ElementHcurl supports 2D meshes.
Fixed in #959