Dear Emmanuel,

You want to divide the boundary \Gamma_{east} into three in order to impose Dirichlet boundary condition with a different value in each of those sub-boundaries, right? One way to do that is creating three rectangular meshes and then you can glue them. Here is one example with two rectangles:

int m = 2 ; int n = m;

real x0= 0.0 , x1= 2.0 ;

real y0= 0.0 , y1= 0.5 , y2= 1.0;

int[int] l1 = [1,2,3,4] ;

int[int] l2 = [3,2,6,4] ;

mesh Th1 = square(20*n,10*m,[x0+(x1-x0)*x,y0+(y1-y0)**y],label=l1,flags=0);*

mesh Th2 = square(20n,10m,[x0+(x1-x0)*x,y1+(y2-y1)*y],label=l2,flags=0);

mesh Th = Th1+Th2;

Hope it helps you.

Best regards,

Jorge Morvan