# Meshing in FreeFem++

Hi, I am creating a 2D mesh for my crack problem. I need one edge to be discretized into 100 parts. So, I used border commands for creation. It creates mesh. but the issue here is, Freefem++ considers that edge as the boundary. So It looks like parts are divided. I also attaching my code.

``````real d = 0.05;
border L1(t=0,1) {x=-0.5; y=-0.5+(0.5-d)*t;}
border C1(t=0,1) {x=-0.5+0.5*t; y=-d+d*t;}
border CC1(t=0,1){x=0; y=0-0.5*t;}
border B1(t=0,1) {x=0-0.5*t; y=-0.5;}
border C2(t=0,1) {x =0-0.5*t;y = 0+d*t ;}
border L2(t=0,1) {x = -0.5; y=d+(0.5-d)*t; }
border T1(t=0,1) {x = -0.5+0.5*t; y=0.5; }
border CC2(t=0,1){x = 0; y=0.5-0.5*t;}
border C3(t=0,1) {x= 0+0.5*t; y=0;  }
border R1(t=0,1) {x= 0.5; y=0-0.5*t;}
border B2(t=0,1) {x=0.5-0.5*t; y=-0.5;}
border T2(t=0,1) {x = 0+0.5*t; y=0.5;}
border R2(t=0,1) {x = 0.5;y=0.5-0.5*t; }

int n = 10;
//plot(L1(-n) + C1(-n) + CC1(-n) + B1(-n) + C2(-n) + L2(-n) +T1(-n)
//     + CC2(-n) + C3(-n) + R1(-n) +B2(-n) + T2(-n) + R2(-n) , wait=true);

mesh Th = buildmesh(L1(-n) + C1(-n) + B1(-n) + C2(-n) + L2(-n) +T1(-n)
+ C3(-100) + R1(-20) +B2(-n) + T2(-n) +R2(-20) );

plot(Th, wait=true);
``````

I don’t want C3 as a boundary. How should I use discretization without boundaries?

Previously I tried to import the mesh from GMSH but it not working.

I am note sure to understand why there is a problem here. Your mesh contains an internal border (C3) but is still simply connected. The mesh contains two closed regions, so when you plot it there are two colors, but the regions (parts) are not divided.
As a remark, you gave no labels to the borders, so you will not be able to set boundary conditions.
For controlling the mesh without boundaries you can look at the `adaptmesh()` function: Mesh Generation

To remove the internal boundary you can do

``````     Th=change(Th,rmInternalEdges=1);
``````

and to haveolso only one region 0

``````      Th=change(Th,rmInternalEdges=1,fregion=0);
``````

after build mesh Th.

Thanks, both for your remarks. It solved the problem of internal boundary problems.