Gmsh: extrusion help
Posted: 20 Mar 2024, 19:28
Using the C API, I finally got gmsh to feed ElmerGrid a 2D mesh I like, but I can not get an extrusion to 3D. gmsh reports it is happy, but there are no 3D points in the output mesh file, so ElmerGrid reports it meshed a 3D volume, but ElmerGUI does not see anything but the 2D mesh.
The surface before the extrusion is fine: After this is created I use the following code
where "tag" is the result of the AddPhysicalGroup for the final surface. What am I not doing that is required?
gmsh reports
and ElmerGrid reports
So there is some 3D info somewhere. Just not visible. What am I doing wrong?
Any pointers appreciated!
The surface before the extrusion is fine: After this is created I use the following code
Code: Select all
elist[0] = 5;
elist[1] = 5;
tlist[0] = 2; // dimension
tlist[1] = tag; // tag
gmshModelGeoExtrude(tlist, 2, 0.0, 0.0, 1.0, NULL, 0, elist, 1, NULL, 0, 1, &ierr);
gmshModelGeoSynchronize(&ierr);
gmshModelMeshGenerate(3, &ierr);
gmshWrite("mymesh_test.msh", &ierr);
gmsh reports
Code: Select all
Info : Meshing 3D...
Info : Meshing volume 1 (Extruded)
Info : Done meshing 3D (Wall 0.0040657s, CPU 0.002608s)
Code: Select all
Reading 12 entities in 0D
Reading 17 entities in 1D
Reading 8 entities in 2D
Reading 1 entities in 3D
Any pointers appreciated!