Basix | basix.ElementFamily.bubble ↓ 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 bubble degree 2 on a interval element = basix.create_element(basix.ElementFamily.bubble, basix.CellType.interval, 2)
# Create bubble degree 3 on a interval element = basix.create_element(basix.ElementFamily.bubble, basix.CellType.interval, 3)
# Create bubble degree 3 on a triangle element = basix.create_element(basix.ElementFamily.bubble, basix.CellType.triangle, 3)
# Create bubble degree 4 on a triangle element = basix.create_element(basix.ElementFamily.bubble, basix.CellType.triangle, 4) This implementation is correct for all the examples below. |
Basix.UFL | basix.ElementFamily.bubble ↓ 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 bubble degree 2 on a interval element = basix.ufl.element(basix.ElementFamily.bubble, basix.CellType.interval, 2)
# Create bubble degree 3 on a interval element = basix.ufl.element(basix.ElementFamily.bubble, basix.CellType.interval, 3)
# Create bubble degree 3 on a triangle element = basix.ufl.element(basix.ElementFamily.bubble, basix.CellType.triangle, 3)
# Create bubble degree 4 on a triangle element = basix.ufl.element(basix.ElementFamily.bubble, basix.CellType.triangle, 4) This implementation is correct for all the examples below. |
FIAT | FIAT.Bubble ↓ 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 bubble degree 2 element = FIAT.Bubble(FIAT.ufc_cell("interval"), 2)
# Create bubble degree 3 element = FIAT.Bubble(FIAT.ufc_cell("interval"), 3)
# Create bubble degree 3 element = FIAT.Bubble(FIAT.ufc_cell("triangle"), 3)
# Create bubble degree 4 element = FIAT.Bubble(FIAT.ufc_cell("triangle"), 4) This implementation is correct for all the examples below. |
Symfem | "bubble" ↓ 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 bubble degree 2 on a interval element = symfem.create_element("interval", "bubble", 2)
# Create bubble degree 3 on a interval element = symfem.create_element("interval", "bubble", 3)
# Create bubble degree 3 on a triangle element = symfem.create_element("triangle", "bubble", 3)
# Create bubble degree 4 on a triangle element = symfem.create_element("triangle", "bubble", 4) This implementation is used to compute the examples below and verify other implementations. |
(legacy) UFL | "Bubble" ↓ 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 bubble degree 2 on a interval element = ufl_legacy.FiniteElement("Bubble", "interval", 2)
# Create bubble degree 3 on a interval element = ufl_legacy.FiniteElement("Bubble", "interval", 3)
# Create bubble degree 3 on a triangle element = ufl_legacy.FiniteElement("Bubble", "triangle", 3)
# Create bubble degree 4 on a triangle element = ufl_legacy.FiniteElement("Bubble", "triangle", 4) |