I’m trying to understand some of the finer details of UFL, but the documentation doesn’t explain ufl.Mesh()
. This tutorial goes over how to use ufl.Mesh()
to make a symbolic representation of the domain, but doesn’t say why it needs to take a vector element.
The following code produces an error when trying to use ufl.Mesh()
with a scalar element.
import ufl
import basix.ufl
el=basix.ufl.element('Lagrange', 'triangle', 1)
domain=ufl.Mesh(el)
For context, I’m running this code in a Python3 kernel in a Jupyter Notebook out of the dolfinx/lab:stable
Docker container.
Also, when might one want to use ufl.Mesh()
instead of the dolfinx.mesh
library?