// Variables
long = 8 ;
larg = 5 ;
ch_length = 0.2 ;
ch_rep1_x = 1 ;
ch_rep1_y = 0.5 ;
ch_rep1_larg = 2 ;
ch_rep1_long = 3 ;
ch_rep2_x = 1 ;
ch_rep2_y = 5.5 ;
ch_rep2_larg = 4 ;
ch_rep2_long = 1 ;

// Geometrie dalle
Point(1) = {0, 0, 0, 0.2} ;
Point(2) = {larg, 0, 0, 0.2} ;
Point(3) = {larg, long, 0, 0.2} ;
Point(4) = {0, long, 0, 0.2} ;

// Geometrie charge repartie 1
Point(5) = {ch_rep1_x, ch_rep1_y, 0, 0.2} ;
Point(6) = {ch_rep1_x + ch_rep1_larg, ch_rep1_y, 0, 0.2} ;
Point(7) = {ch_rep1_x + ch_rep1_larg, ch_rep1_y + ch_rep1_long, 0, 0.2} ;
Point(8) = {ch_rep1_x, ch_rep1_y + ch_rep1_long, 0, 0.2} ;

// Geometrie charge repartie 2
Point(9) = {ch_rep2_x, ch_rep2_y, 0, 0.2} ;
Point(10) = {ch_rep2_x + ch_rep2_larg, ch_rep2_y, 0, 0.2} ;
Point(11) = {ch_rep2_x + ch_rep2_larg, ch_rep2_y + ch_rep2_long, 0, 0.2} ;
Point(12) = {ch_rep2_x, ch_rep2_y + ch_rep2_long, 0, 0.2} ;

// Contour dalle
Line(1) = {1, 2} ;
Line(2) = {2, 3} ;
Line(3) = {3, 4} ;
Line(4) = {4, 1} ;

// Contour charge repartie 1
Line(5) = {5, 6} ;
Line(6) = {6, 7} ;
Line(7) = {7, 8} ;
Line(8) = {8, 5} ;

// Contour charge repartie 2
Line(9) = {9, 10} ;
Line(10) = {10, 11} ;
Line(11) = {11, 12} ;
Line(12) = {12, 9} ;

// Surface dalle
Line Loop (1) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} ;
Plane Surface (1) = {1} ;

// Surface charge repartie 1
Line Loop (2) = {5, 6, 7, 8} ;
Plane Surface (2) = {2} ;

// Surface charge repartie 2
Line Loop (3) = {9, 10, 11, 12} ;
Plane Surface (3) = {3} ;

// Affinage des lignes
Transfinite Line {1, 3} = 1 + larg * 1 / ch_length ;
Transfinite Line {2, 4} = 1 + long * 1 / ch_length ;
Transfinite Line {5, 7} = 1 + ch_rep1_larg * 1 / ch_length ;
Transfinite Line {6, 8} = 1 + ch_rep1_long * 1 / ch_length ;
Transfinite Line {9, 11} = 1 + ch_rep2_larg * 1 / ch_length ;
Transfinite Line {10, 12} = 1 + ch_rep2_long * 1 / ch_length ;
