Square elements in a mesh

Hi guys,

simple question: How can I create a 2D mesh where each element is a square and not a triangle ?


There is very limited support for quadrilateral elements in dolfin. However, this support has been extended in dolfinx, see Defining FunctionSpace over a Quadrature Element in dolfinx

Thanks @dokken !
And without dolfinx, is there not a simple way to create custom mesh inside FEniCS ?

There are built in meshes in dolfinx (and dolfin), like the unitsquare, where you can use quadrilateral elements. In general, you can use Gmsh to create quadrilateral meshes.

1 Like

Thank you! is there a simple way to convert then from gmsh format to dolfin XML ?

I would not use dolfin-xml, as it is not suited for parallel computing. I suggest using: Converter from GMSH to XDMF (with physical groups)