11// 2D Rectangle: 4m (width) x 2m (height)
2- // With Physical Lines for boundary labeling
32// Use the command "gmsh rect.geo -2" to generate the mesh
43
5- lc = 0.7 ; // Characteristic length (mesh density)
6- // Note: In the structured case, the lc = 0.2 no longer directly determines the mesh size,
7- // as the Transfinite Curve commands explicitly set the number of elements along each boundary
8-
4+ lc = 0.7 ; // Characteristic length
95// Points (x, y, z, mesh size)
10- Point(1 ) = {0 , 0 , 0 , lc}; // Bottom left
11- Point(2 ) = {4 , 0 , 0 , lc}; // Bottom right
12- Point(3 ) = {4 , 2 , 0 , lc}; // Top right
13- Point(4 ) = {0 , 2 , 0 , lc}; // Top left
6+ Point(1 ) = {0 , 0 , 0 , lc}; // Bottom left
7+ Point(2 ) = {4 , 0 , 0 , lc}; // Bottom right
8+ Point(3 ) = {4 , 2 , 0 , lc}; // Top right
9+ Point(4 ) = {0 , 2 , 0 , lc}; // Top left
1410
1511// Lines
1612Line(1 ) = {1 , 2 }; // bottom
@@ -28,7 +24,7 @@ Physical Line("right") = {2};
2824Physical Line("top") = {3 };
2925Physical Line("left") = {4 };
3026
31- // Physical Surface (optional, for FEM domains)
27+ // Physical Surface
3228Physical Surface("domain") = {1 };
3329
3430// Create structured mesh
0 commit comments