// Parameters :
//=====================================================================================

LX = 100;
LY = 10;
Nparts = 10;
ep = 1;


nl=1;
lel = LY/NelementsY;

// Geometry
//=====================================================================================

idx=0;
For i In {1:Nparts+1}
	Point(2*i-1) = {LX*(i-1)/Nparts,0,0,lel};
	Point(2*i) = {LX*(i-1)/Nparts,LY,0,lel};
	Line(i*10+1) = {2*i-1,2*i};
	If (i > 1)
		Line(i*10+3) = {2*i-3,2*i-1};
		Line(10*i+2) = {2*i,2*i-2};

		Line Loop (i) = {10*i+1,10*i+2,-(10*(i-1)+1),10*i+3};
		Plane Surface(i) = {i};

		SurfNb[idx] = i;
		VolIdx[idx] = idx+1;
		idx++;
	EndIf
EndFor


AllVol []  = Extrude {0, 0, ep} {
  Surface{SurfNb[]}; Layers{nl};
};


		
For i In{0:#VolIdx[]-1}
	Physical Volume(i+1) = {VolIdx[i]};
EndFor


}

