Basix | basix.ElementFamily.N1E ↓ Show Basix examples ↓↑ Hide Basix examples ↑Before running this example, you must install Basix: pip3 install fenics-basix This element can then be created with the following lines of Python: import basix
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a triangle element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.triangle, 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a triangle element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.triangle, 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a quadrilateral element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.quadrilateral, 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a quadrilateral element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.quadrilateral, 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a tetrahedron element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.tetrahedron, 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a tetrahedron element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.tetrahedron, 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a hexahedron element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.hexahedron, 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a hexahedron element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.hexahedron, 2)
# Create Nedelec (first kind) (Legendre variant) degree 1 on a triangle element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.triangle, 1, lagrange_variant=basix.LagrangeVariant.legendre)
# Create Nedelec (first kind) (Legendre variant) degree 2 on a triangle element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.triangle, 2, lagrange_variant=basix.LagrangeVariant.legendre)
# Create Nedelec (first kind) (Legendre variant) degree 1 on a quadrilateral element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.quadrilateral, 1, lagrange_variant=basix.LagrangeVariant.legendre)
# Create Nedelec (first kind) (Legendre variant) degree 2 on a quadrilateral element = basix.create_element(basix.ElementFamily.N1E, basix.CellType.quadrilateral, 2, lagrange_variant=basix.LagrangeVariant.legendre) This implementation is correct for all the examples below that it supports. Correct: triangle,1,lagrange; triangle,2,lagrange; quadrilateral,1,lagrange; quadrilateral,2,lagrange; tetrahedron,1,lagrange; tetrahedron,2,lagrange; hexahedron,1,lagrange; hexahedron,2,lagrange; triangle,1,legendre; triangle,2,legendre; quadrilateral,1,legendre; quadrilateral,2,legendre Not implemented: prism,1,lagrange; prism,2,lagrange |
Basix.UFL | basix.ElementFamily.N1E ↓ Show Basix.UFL examples ↓↑ Hide Basix.UFL examples ↑Before running this example, you must install Basix.UFL: pip3 install fenics-basix fenics-ufl This element can then be created with the following lines of Python: import basix import basix.ufl
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a triangle element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.triangle, 1, lagrange_variant=basix.LagrangeVariant.equispaced)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a triangle element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.triangle, 2, lagrange_variant=basix.LagrangeVariant.equispaced)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a quadrilateral element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.quadrilateral, 1, lagrange_variant=basix.LagrangeVariant.equispaced)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a quadrilateral element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.quadrilateral, 2, lagrange_variant=basix.LagrangeVariant.equispaced)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a tetrahedron element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.tetrahedron, 1, lagrange_variant=basix.LagrangeVariant.equispaced)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a tetrahedron element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.tetrahedron, 2, lagrange_variant=basix.LagrangeVariant.equispaced)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a hexahedron element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.hexahedron, 1, lagrange_variant=basix.LagrangeVariant.equispaced)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a hexahedron element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.hexahedron, 2, lagrange_variant=basix.LagrangeVariant.equispaced)
# Create Nedelec (first kind) (Legendre variant) degree 1 on a triangle element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.triangle, 1)
# Create Nedelec (first kind) (Legendre variant) degree 2 on a triangle element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.triangle, 2)
# Create Nedelec (first kind) (Legendre variant) degree 1 on a quadrilateral element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.quadrilateral, 1)
# Create Nedelec (first kind) (Legendre variant) degree 2 on a quadrilateral element = basix.ufl.element(basix.ElementFamily.N1E, basix.CellType.quadrilateral, 2) This implementation is correct for all the examples below that it supports. Correct: triangle,1,lagrange; triangle,2,lagrange; quadrilateral,1,lagrange; quadrilateral,2,lagrange; tetrahedron,1,lagrange; tetrahedron,2,lagrange; hexahedron,1,lagrange; hexahedron,2,lagrange; triangle,1,legendre; triangle,2,legendre; quadrilateral,1,legendre; quadrilateral,2,legendre Not implemented: prism,1,lagrange; prism,2,lagrange |
Bempp | "SNC" ↓ Show Bempp examples ↓↑ Hide Bempp examples ↑Before running this example, you must install Bempp: pip3 install numba scipy meshio pip3 install bempp-cl This element can then be created with the following lines of Python: import bempp.api grid = bempp.api.shapes.regular_sphere(1)
# Create Nedelec (first kind) degree 1 element = bempp.api.function_space(grid, "SNC", 0) |
FIAT | FIAT.Nedelec(..., variant="integral") ↓ Show FIAT examples ↓↑ Hide FIAT examples ↑Before running this example, you must install FIAT: pip3 install git+https://github.com/firedrakeproject/fiat.git This element can then be created with the following lines of Python: import FIAT
# Create Nedelec (first kind) (Legendre variant) degree 1 element = FIAT.Nedelec(FIAT.ufc_cell("triangle"), 1, variant="integral")
# Create Nedelec (first kind) (Legendre variant) degree 2 element = FIAT.Nedelec(FIAT.ufc_cell("triangle"), 2, variant="integral") This implementation is correct for all the examples below that it supports. Correct: triangle,1,legendre; triangle,2,legendre Not implemented: triangle,1,lagrange; triangle,2,lagrange; quadrilateral,1,lagrange; quadrilateral,2,lagrange; tetrahedron,1,lagrange; tetrahedron,2,lagrange; hexahedron,1,lagrange; hexahedron,2,lagrange; prism,1,lagrange; prism,2,lagrange; quadrilateral,1,legendre; quadrilateral,2,legendre |
Symfem | "N1curl", variant="legendre" (triangle, Legendre; tetrahedron, Legendre)
"Qcurl", variant="legendre" (quadrilateral, Legendre; hexahedron, Legendre)
"Ncurl", variant="legendre" (prism, Legendre)
"N1curl" (triangle, Lagrange; tetrahedron, Lagrange)
"Qcurl" (quadrilateral, Lagrange; hexahedron, Lagrange)
"Ncurl" (prism, Lagrange) ↓ Show Symfem examples ↓↑ Hide Symfem examples ↑Before running this example, you must install Symfem: pip3 install symfem This element can then be created with the following lines of Python: import symfem
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a triangle element = symfem.create_element("triangle", "N1curl", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a triangle element = symfem.create_element("triangle", "N1curl", 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a quadrilateral element = symfem.create_element("quadrilateral", "Qcurl", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a quadrilateral element = symfem.create_element("quadrilateral", "Qcurl", 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a tetrahedron element = symfem.create_element("tetrahedron", "N1curl", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a tetrahedron element = symfem.create_element("tetrahedron", "N1curl", 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a hexahedron element = symfem.create_element("hexahedron", "Qcurl", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a hexahedron element = symfem.create_element("hexahedron", "Qcurl", 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a prism element = symfem.create_element("prism", "Ncurl", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a prism element = symfem.create_element("prism", "Ncurl", 2)
# Create Nedelec (first kind) (Legendre variant) degree 1 on a triangle element = symfem.create_element("triangle", "N1curl", 1, variant="legendre")
# Create Nedelec (first kind) (Legendre variant) degree 2 on a triangle element = symfem.create_element("triangle", "N1curl", 2, variant="legendre")
# Create Nedelec (first kind) (Legendre variant) degree 1 on a quadrilateral element = symfem.create_element("quadrilateral", "Qcurl", 1, variant="legendre")
# Create Nedelec (first kind) (Legendre variant) degree 2 on a quadrilateral element = symfem.create_element("quadrilateral", "Qcurl", 2, variant="legendre") This implementation is used to compute the examples below and verify other implementations. |
(legacy) UFL | "N1curl" (triangle, Lagrange; tetrahedron, Lagrange)
"RTCE" (quadrilateral, Lagrange)
"NCE" (hexahedron, Lagrange) ↓ Show (legacy) UFL examples ↓↑ Hide (legacy) UFL examples ↑Before running this example, you must install (legacy) UFL: pip3 install setuptools pip3 install fenics-ufl-legacy This element can then be created with the following lines of Python: import ufl_legacy
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a triangle element = ufl_legacy.FiniteElement("N1curl", "triangle", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a triangle element = ufl_legacy.FiniteElement("N1curl", "triangle", 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a quadrilateral element = ufl_legacy.FiniteElement("RTCE", "quadrilateral", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a quadrilateral element = ufl_legacy.FiniteElement("RTCE", "quadrilateral", 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a tetrahedron element = ufl_legacy.FiniteElement("N1curl", "tetrahedron", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a tetrahedron element = ufl_legacy.FiniteElement("N1curl", "tetrahedron", 2)
# Create Nedelec (first kind) (Lagrange variant) degree 1 on a hexahedron element = ufl_legacy.FiniteElement("NCE", "hexahedron", 1)
# Create Nedelec (first kind) (Lagrange variant) degree 2 on a hexahedron element = ufl_legacy.FiniteElement("NCE", "hexahedron", 2) |