Basix | basix.ElementFamily.DPC, dpc_variant=basix.DPCVariant.simplex_equispaced, discontinuous=True ↓ 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 dPc degree 1 on a quadrilateral element = basix.create_element(basix.ElementFamily.DPC, basix.CellType.quadrilateral, 1, dpc_variant=basix.DPCVariant.simplex_equispaced, discontinuous=True)
# Create dPc degree 2 on a quadrilateral element = basix.create_element(basix.ElementFamily.DPC, basix.CellType.quadrilateral, 2, dpc_variant=basix.DPCVariant.simplex_equispaced, discontinuous=True)
# Create dPc degree 3 on a quadrilateral element = basix.create_element(basix.ElementFamily.DPC, basix.CellType.quadrilateral, 3, dpc_variant=basix.DPCVariant.simplex_equispaced, discontinuous=True) This implementation is correct for all the examples below that it supports. Correct: quadrilateral,1; quadrilateral,2; quadrilateral,3 Not implemented: interval,1; interval,2; interval,3 |
Basix.UFL | basix.ElementFamily.DPC, dpc_variant=basix.DPCVariant.simplex_equispaced, discontinuous=True ↓ 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 dPc degree 1 on a quadrilateral element = basix.ufl.element(basix.ElementFamily.DPC, basix.CellType.quadrilateral, 1, dpc_variant=basix.DPCVariant.simplex_equispaced, discontinuous=True)
# Create dPc degree 2 on a quadrilateral element = basix.ufl.element(basix.ElementFamily.DPC, basix.CellType.quadrilateral, 2, dpc_variant=basix.DPCVariant.simplex_equispaced, discontinuous=True)
# Create dPc degree 3 on a quadrilateral element = basix.ufl.element(basix.ElementFamily.DPC, basix.CellType.quadrilateral, 3, dpc_variant=basix.DPCVariant.simplex_equispaced, discontinuous=True) This implementation is correct for all the examples below that it supports. Correct: quadrilateral,1; quadrilateral,2; quadrilateral,3 Not implemented: interval,1; interval,2; interval,3 |
FIAT | FIAT.DPC ↓ 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 dPc degree 1 element = FIAT.DPC(FIAT.ufc_cell("interval"), 1)
# Create dPc degree 2 element = FIAT.DPC(FIAT.ufc_cell("interval"), 2)
# Create dPc degree 3 element = FIAT.DPC(FIAT.ufc_cell("interval"), 3)
# Create dPc degree 1 element = FIAT.DPC(FIAT.reference_element.UFCQuadrilateral(), 1)
# Create dPc degree 2 element = FIAT.DPC(FIAT.reference_element.UFCQuadrilateral(), 2)
# Create dPc degree 3 element = FIAT.DPC(FIAT.reference_element.UFCQuadrilateral(), 3) This implementation is correct for all the examples below. |
Symfem | "dPc" ↓ 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 dPc degree 1 on a interval element = symfem.create_element("interval", "dPc", 1)
# Create dPc degree 2 on a interval element = symfem.create_element("interval", "dPc", 2)
# Create dPc degree 3 on a interval element = symfem.create_element("interval", "dPc", 3)
# Create dPc degree 1 on a quadrilateral element = symfem.create_element("quadrilateral", "dPc", 1)
# Create dPc degree 2 on a quadrilateral element = symfem.create_element("quadrilateral", "dPc", 2)
# Create dPc degree 3 on a quadrilateral element = symfem.create_element("quadrilateral", "dPc", 3) This implementation is used to compute the examples below and verify other implementations. |
(legacy) UFL | "DPC" ↓ 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 dPc degree 1 on a interval element = ufl_legacy.FiniteElement("DPC", "interval", 1)
# Create dPc degree 2 on a interval element = ufl_legacy.FiniteElement("DPC", "interval", 2)
# Create dPc degree 3 on a interval element = ufl_legacy.FiniteElement("DPC", "interval", 3)
# Create dPc degree 1 on a quadrilateral element = ufl_legacy.FiniteElement("DPC", "quadrilateral", 1)
# Create dPc degree 2 on a quadrilateral element = ufl_legacy.FiniteElement("DPC", "quadrilateral", 2)
# Create dPc degree 3 on a quadrilateral element = ufl_legacy.FiniteElement("DPC", "quadrilateral", 3) |