an encyclopedia of finite element definitions

Contributing to DefElement

Suggesting additions and corrections

If you find an error or inaccuracy in a DefElement entry, please open an issue on GitHub. You can also open an issue to suggest a new element that should be added to the database.

Contributing directly

You can contribute to DefElement by forking the DefElement GitHub repo, making changes, then opening a pull request.

The functional information and examples on the element pages are generated using Symfem, a symbolic finite element definition library. Before adding an element to DefElement, it should first be implemented in Symfem.

Defining an element

Elements in the DefElement database are defined using a yaml file in the elements/ folder. The full file for a Lagrange element is:

name: Lagrange
html-name: Lagrange
  - Polynomial
  - Galerkin
  - DGT (facets)
  - Hdiv trace (facets)
  - Q (quadrilateral and hexahedron)
  - DGT and Hdiv trace are names given to this element when it is defined on the facets of a mesh.
  - P
  - CG
  - DG
  - P-,0,simplex
  - P,0,simplex
  - Q-,0,tp
  - P-,d,simplex
  - P,d,simplex
  - Q-,d,tp
  - TNT,d,tp
    formula: k+1
    oeis: A000027
    formula: (k+1)(k+2)/2
    oeis: A000217
    formula: (k+1)(k+2)(k+3)/6
    oeis: A000292
    formula: (k+1)^2
    oeis: A000290
    formula: (k+1)^3
    oeis: A000578
    formula: (k+1)^2(k+2)/2
    oeis: A002411
    formula: (k+1)(k+2)(2k+3)/6
    oeis: A000330
    formula: 1
    oeis: A000012
    formula: k-1
    oeis: A000027
      formula: (k-1)(k-2)/2
      oeis: A000217
      formula: (k-1)^2
      oeis: A000290
      formula: (k-1)(k-2)(k-3)/6
      oeis: A000292
      formula: (k-1)^3
      oeis: A000578
      formula: (k-1)^2(k-2)/2
      oeis: A002411
      formula: (k-1)(k-2)(2k-3)/6
      oeis: A000330
min-order: 1
  - scalar
reference elements:
  - interval
  - triangle
  - tetrahedron
  - quadrilateral
  - hexahedron
  - prism
  - pyramid
  vertices: point evaluations
  edges: point evaluations
  faces: point evaluations
  volumes: point evaluations
polynomial set:
  interval: poly[k]
  triangle: poly[k]
  tetrahedron: poly[k]
  quadrilateral: qoly[k]
  hexahedron: qoly[k]
  prism: [\operatorname{span}\left\{x_1^{p_1}x_2^{p_2}x_3^{p_3}\middle|\max(p_1+p_2,p_3)\leqslant k\right\}]
  pyramid: [\operatorname{span}\left\{x_1^{p_1}x_2^{p_2}x_3^{p_3}\middle|p_3\leqslant k-1,p_1+p_3\leqslant k,p_2+p_3\leqslant k\right\}] && [\operatorname{span}\left\{x_3^k\right\}]
  interval: Lagrange
  triangle: Lagrange
  tetrahedron: Lagrange
  quadrilateral: Q
  hexahedron: Q
  prism: Lagrange
  pyramid: Lagrange
basix: P lagrange_variant=equispaced
  interval: Lagrange
  triangle: Lagrange
  tetrahedron: Lagrange
  quadrilateral: Q
  hexahedron: Q
  triangle: P orders=1
  - interval,1
  - interval,2
  - interval,3
  - triangle,1
  - triangle,2
  - triangle,3
  - quadrilateral,1
  - quadrilateral,2
  - quadrilateral,3
  - tetrahedron,1
  - tetrahedron,2
  - hexahedron,1
  - hexahedron,2
  - prism,1
  - prism,2
  - pyramid,1
  - pyramid,2

The entries in this yaml file are:

nameThe name of the element (ascii).
html-nameThe name of the element, including HTML special characters.
alt-namesAlternative (HTML) names of the element.
short-namesAbbreviated names of the element.
exterior-calculusThe family name and exerior derivatuve order.
ndofsThe number of DOFs the element has and the A-numbers of the OEIS sequence(s) giving the number of DOFs.
entity-ndofsThe number of DOFs the element has per subentity type and the A-numbers of the OEIS sequence(s) giving the number of DOFs.
min-orderThe minimum order of the element
max-orderThe maximum order of the element
categoriesCategories the element belongs to. Categories are defined in the file /data/categories.
reference elementsThe reference element(s) that this finite element can be defined on.
dofsDescription of the DOFs of this element.
polynomial setThe polynomial set of this element. This can use sets defined in the file /data/polysets. Other sets can be given by writing [LaTeX definition of set]. Unions of multiple sets can be given, separated by && .
examplesReference elements and orders to be included in the examples section of the entry.
symfemThe string used to define this element in Symfem's create_element function.
basixThe name of the enum item used to define this element in Basix's create_element function.
uflThe string used to define this element in UFL.
bemppThe string used to define this element in Bempp.
notesNotes about the element.

Adding yourself to the contributors

Once you have contributed to DefElement, you should add your name and some information about yourself to the contributors page. To do this, you should add info about yourself to the file data/contributors. If you wish to include a picture of yourself, add a square-shaped image to the pictures/ folder.