I am not at a computer right now, so cant tell you why your snippet doesn’t work. However, as you use Gmsh, you are able to mark the Facets for each boundary there. These can be loaded to dolfin with meshio. See Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio for a full code snippet of how to do it with 3D meshes. (Small modifications needed for 2D: i.e. Tetra->triangle, triangle->line, dimension in meshvaluecollection 2->1)
dokken
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Boundary Conditions Not Matching when using GMSH imported msh file | 13 | 675 | June 22, 2023 | |
|
Navier Stokes equiation 3D
|
6 | 1333 | October 8, 2020 | |
| Error in boundary conditions when importing Gmsh msh file | 7 | 498 | June 27, 2023 | |
| Mesh 2D gmsh to fenics legacy (2019.2) | 3 | 182 | September 27, 2024 | |
| Issues with Defining Boundary Conditions for Stokes Problem Using GMSH Mesh Tags | 10 | 463 | March 19, 2024 |