How I can differ between two subdomains for gmsh file?

Hello everyone

I have drawn and meshed my problem by using the gmsh software, my problem was divided into two regions, each region has a different equation.
my question is as follows : how I can divide the two regions in fenics ?.

//+
Point(1) = {0, 0, 0, 1.0};
//+
Point(2) = {10, 0, 0, 1.0};
//+
Point(3) = {12, 0, 0, 1.0};
//+
Point(4) = {22, 0, 0, 1.0};
//+
Point(5) = {22, 10, 0, 1.0};
//+
Point(6) = {12, 10, 0, 1.0};
//+
Point(7) = {10, 10, 0, 1.0};
//+
Point(8) = {0, 10, 0, 1.0};
//+
Line(1) = {1, 2};
//+
Line(2) = {2, 7};
//+
Line(3) = {7, 8};
//+
Line(4) = {8, 1};
//+
Line(5) = {2, 3};
//+
Line(6) = {3, 6};
//+
Line(7) = {6, 7};
//+
Line(8) = {3, 4};
//+
Line(9) = {4, 5};
//+
Line(10) = {5, 6};
//+
Curve Loop(1) = {1, 2, 3, 4};
//+
Plane Surface(1) = {1};
//+
Curve Loop(2) = {5, 6, 7, -2};
//+
Plane Surface(2) = {2};
//+
Curve Loop(3) = {8, 9, 10, -6};
//+
Plane Surface(3) = {3};
//+
Physical Curve(“boundary”) = {1, 5, 8, 9, 10, 7, 3, 4};
//+
Physical Surface(“material 1”) = {1, 3};
//+
Physical Surface(“material 2”) = {2};

See for instance How to extract and use physical labels from GMSH surfaces on FEniCS (2D mesh)

1 Like

Thank you very much dokken, it is working fine.