Higher-Order elements with curved elements and GMSH support

I am interested in using FEniCS for my research, particularly in developing the framework FSI problems, by porting the existing FreeFEM code.

I would like to know

  1. If there is straightforward support for reading GMSH meshes along with their tags instead of the hassle of XDMF files.
  2. If FEniCS supports higher-order elements with curved elements for meshes generated with GMSH.
  3. Other mesh generation tools that I can use for generating meshes with higher-order elements.

Thanks in advance for your time and assistance!

For dolfinx: see for instance dolfinx/python/demo/demo_gmsh.py at v0.8.0 · FEniCS/dolfinx · GitHub to verify that the answer to 1 and 2 is yes for dolfinx. Further lower level details are shown in dolfinx/python/test/unit/mesh/test_higher_order_mesh.py at main · FEniCS/dolfinx · GitHub

The answer to 3 is probably yes too, except that you’ll need to write your own reader.

For dolfin: see for instance Is it possible to program (from scratch) a 2nd-order tetrahedron in FeniCs Legacy? . The short answer is that we’d suggest moving on to dolfinx anyways.

1 Like

An example of how to use GMSH with second order elements is shown in
where I employ a second order mesh directly from the gmsh model in the GMSH Python API.

DOLFINx also supports reading msh files using dolfinx.io.gmshio.read_from_msh dolfinx.io.gmshio — DOLFINx 0.8.0 documentation

I am planning to write a general mesh IO framework for DOLFINx at GitHub - jorgensd/mesh_converter: A mesh converter from EXODUS 2 to XDMF which currently adds exodus2 support to XDMF files. However, I am not going to implement any format under the sun, and I would need to get good examples of mesh formats that are usable to continue this development.

It is rather straightforward to read in meshes in DOLFINx from raw data arrays, as for instance shown in

Thank you very much! I will check the suggested links.

Thank you very much! I will go through your suggestions.