/////////////////////////
//geo.file
/////////////////////////

SetFactory("OpenCASCADE");

Lx = 10;
Ly = 10;
Nx = 2;
Ny = 2;

Point(1) ={0, 10, 0, .3};
Point(2) ={5, 10, 0, 1};
Point(3) ={0, 5, 0, 1};
Point(4) ={5, 5, 0, 1};

Line(1) = {1, 2};
Line(2) = {2, 4};
Line(3) = {4, 3};
Line(4) = {3, 1};
Curve Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};

For j In {1:1}
Translate {0, -5*j, 0} {Duplicata { Surface{1}; }}
EndFor

all_surfaces[] = Surface "*";

For i In {1:1}
Translate {5*i, 0, 0} {Duplicata { Surface{all_surfaces[]}; }}
EndFor

For k In {1:4}
Physical Surface(k) = {k};
EndFor

Coherence; // == BooleanFragments of all surfaces

Compound Curve{4,7};
Compound Surface{1,2};
