Hello,
I am trying to import to Fenics a mesh generated with Gmsh. I have taken the simple mesh “t1.msh” of the documentation of Gmsh (“t1.geo”). Following a previous discussion in this forum
However there are some errors when trying to use the mesh “mesh2d”. Precisely, when I try to plot the mesh in Fenics, I find the message “‘Mesh’ object has no attribute ‘ufl_domain’”, while when I try to define a finite element space the message error is “‘Mesh’ object has no attribute ‘ufl_cell’”.
It seems like the imported mesh is incomplete. I would like to ask if this is a fault of my “.msh” file or if there is something missing in the code above. Thanks!
Thank you very much!
Now I have completed the code as shown below (just for completeness).
But I have still a small question. The geometric dimension of the “mesh2d” which is created with this code is 3, so it is a triangular mesh immersed in R^3. How can I do to obtain a mesh of geometric dimension 2? I tried using “prune_z=True” when calling “create_mesh”:
Hello @dokken
How can I export mesh from gmsh to FEnCSx?. Previously, in FEniCS, I exported through terminal with this command
dolfin-convert mesh.msh mesh.xml
I also generated two additional archives with boundary_markers and physical_groups, and I want to replicate this in FeniCSx. Is there another way to do it?