# [Gmsh] [Generate a simple mixed mesh issues]

```Hi everyone,

Recently, I am trying to generate a simple mixed mesh using Gmsh. The
domain consists of 2 volumes. I want the first volume is unstructured and
it consists of Hexahedons only. The second volume consists of whatever
mixed cells, like Tetrahedron, Prism, Pyramid, Hexahedron.```
```

Here is my .geo file:
// generate a mixed mesh
lc = 0.3;

nx=10;
ny=10;
nz=3;

hd=5; //half width
Point(1) = {-hd, -hd, -hd/2, lc};
Point(2) = {hd, -hd, -hd/2, lc};
Point(3) = {hd, hd, -hd/2, lc};
Point(4) = {-hd, hd, -hd/2, lc};
Point(5) = {-hd, -hd, hd/2, lc};
Point(6) = {hd, -hd, hd/2, lc};
Point(7) = {hd, hd, hd/2, lc};
Point(8) = {-hd, hd, hd/2, lc};

Point(9) = {-hd, -hd, hd/2+hd, lc};
Point(10) = {hd, -hd, hd/2+hd, lc};
Point(11) = {hd, hd, hd/2+hd, lc};
Point(12) = {-hd, hd, hd/2+hd, lc};

Line(1) = {4,3};
Line(2) = {3,2};
Line(3) = {2,1};
Line(4) = {1,4};
Line(6) = {5,6};
Line(7) = {6,7};
Line(8) = {7,8};
Line(9) = {8,5};
Line(10) = {1,5};
Line(11) = {4,8};
Line(12) = {2,6};
Line(13) = {3,7};

Line(14) = {8,12};
Line(15) = {7,11};
Line(16) = {6,10};
Line(17) = {5,9};
Line(18) = {12,11};
Line(19) = {11,10};
Line(20) = {10,9};
Line(21) = {9,12};

Line Loop(14) = {3,4,1,2};
Plane Surface(15) = {14};
Line Loop(16) = {6,7,8,9};
Plane Surface(17) = {16};
Line Loop(18) = {10,-9,-11,-4};
Plane Surface(19) = {18};
Line Loop(20) = {-8,11,-1,-13};
Plane Surface(21) = {20};
Line Loop(22) = {-12,-7,13,-2};
Plane Surface(23) = {22};
Line Loop(24) = {-6,12,-3,-10};
Plane Surface(25) = {24};

Surface Loop(1) = {17,-25,-23,-21,19,15};
Volume(1) = {1};

Line Loop(26) = {18,-15,8,14};
Line Loop(27) = {14,-21,-17,-9};
Line Loop(28) = {20,-17,6,16};
Line Loop(29) = {16,-19,-15,-7};
Line Loop(30) = {18,19,20,21};

Plane Surface(26)={26};
Plane Surface(27)={27};
Plane Surface(28)={28};
Plane Surface(29)={29};
Plane Surface(30)={30};

Surface Loop(2) = {-17,27,26,29,30,28};
Volume(2) = {2};

// transfinite volume 1
Transfinite Line{1,3,6,8} = nx;
Transfinite Line{2,4,7,9} = ny;
Transfinite Line{10,11,12,13} = nz;

Transfinite Surface {15} = {1,2,3,4};
Transfinite Surface {17} = {5,6,7,8};
Transfinite Surface {19} = {1,5,8,4};
Transfinite Surface {21} = {8,7,3,4};
Transfinite Surface {23} = {6,7,3,2};
Transfinite Surface {25} = {5,6,2,1};
Transfinite Volume{1} = {1,2,3,4,5,6,7,8};
Recombine Surface{15,19,17,21,23,25};

// transfinite volume 2
Transfinite Line{14,15,16,17} = 3;
Transfinite Line{18,19,20,21} = 5;

Transfinite Surface {27} = {5,9,12,8};
Transfinite Surface {26} = {12,11,7,8};
Transfinite Surface {29} = {10,11,7,6};
Transfinite Surface {30} = {9,10,11,12};
Transfinite Surface {28} = {9,10,6,5};
Transfinite Volume{2} = {5,6,7,8,9,10,11,12};

Mesh.Algorithm3D = 4;

The error is very strange:
Incompatible surface 27 in transfinite volume 2
Cannot use frontal 3D algorithm with quadrangles on boundary

Did you encounter this kind of issue? Thank you.

--
-------------------------------------------------
Feilin Jia, Research Assistant
Department of Aerospace Engineering
University of Kansas
Lawrence, Kansas, USA
-------------------------------------------------
```
```_______________________________________________
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh
```