Bubble element of quadrilateral cells

Hello everyone!

Is it possible to use bubble element stabilization in FEniCSX for quadrilateral cells? Apparently not, since in the ufl the bubble element is registered only for simplices.

Attempt to create the bubble enriched element with the code

vector_u  = VectorElement(
      FiniteElement( "Lagrange", mesh.ufl_cell(), 1 ), 
      FiniteElement( "Bubble", mesh.ufl_cell(), mesh.topology.dim + 1 )

leads to the error

Cellname "quadrilateral" invalid for "Bubble" finite element.

Will there be support for bubble elements for quadrilaterals in the near future, or is there some other way to implement a mini element stabilization in FEniCSX?

See: Creating a custom element — Basix documentation

1 Like

Thank you!

I used the example from demo/python/demo_custom_element.py, wrapped the element in a VectorElement and now everything works fine

This is now possible in FEniCSx:

import ufl
import basix.ufl_wrapper

vector_u = ufl.VectorElement(ufl.EnrichedElement(
    ufl.FiniteElement("Lagrange", "quadrilateral", 1),
    basix.ufl_wrapper.create_element("bubble", "quadrilateral", 2)))
1 Like