# Structured Triangular Type of Mesh of "T" section

**URL:** <https://community.freefem.org/t/structured-triangular-type-of-mesh-of-t-section/1661>\
**Category:** General Discussion\
**Created:** [April 11, 2022, 7:18pm UTC](https://community.freefem.org/t/structured-triangular-type-of-mesh-of-t-section/1661 "2022-04-11T19:18:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![D\_N\_Sarkar](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@D\_N\_Sarkar](https://community.freefem.org/u/D_N_Sarkar)\
**Post date:** [April 11, 2022, 7:18pm UTC](https://community.freefem.org/t/structured-triangular-type-of-mesh-of-t-section/1661/1 "2022-04-11T19:18:10Z")

</div>

I would like to mesh a “T” type of geometry as follows:

 ![Picture1](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/4/414284e58f035e2dbbf3a481b9b5787a71008329.jpeg)

How can I mesh it using structured triangular type of mesh?

Can the command “square” be used to mesh the above “T” type of geometry?

---

<div class="post-metadata">

**Author:** ![julienG](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/julieng/32/222_2.png) [@julienG](https://community.freefem.org/u/julienG)\
**Post date:** [April 12, 2022, 2:08am UTC](https://community.freefem.org/t/structured-triangular-type-of-mesh-of-t-section/1661/2 "2022-04-12T02:08:48Z")

</div>

If you insist on having a structured mesh, you can glue 2 rectangles

> mesh Th1 = square(30,10,[3\* x,y]);  
> mesh Th2 = square(10,30,[x+1,2\* y-2]);  
> mesh Th=Th1+Th2;  
> plot(Th,fill=1);

but you’ll have to choose carefully the number of points so the the vertices on the common edge coincide…

---

<div class="post-metadata">

**Author:** ![D\_N\_Sarkar](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@D\_N\_Sarkar](https://community.freefem.org/u/D_N_Sarkar)\
**Post date:** [April 12, 2022, 3:37pm UTC](https://community.freefem.org/t/structured-triangular-type-of-mesh-of-t-section/1661/3 "2022-04-12T15:37:32Z")

</div>

Ok. But what are the numbers of the boundaries? It is required for assigning boundary conditions.

---

<div class="post-metadata">

**Author:** ![Emma87](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@Emma87](https://community.freefem.org/u/Emma87)\
**Post date:** [April 13, 2022, 3:49am UTC](https://community.freefem.org/t/structured-triangular-type-of-mesh-of-t-section/1661/4 "2022-04-13T03:49:21Z")

</div>

Hi D\_N\_Sarkar, can you see:

> [@How can i make a T-shaped mesh](https://community.freefem.org/t/how-can-i-make-a-t-shaped-mesh/1215/5):
>
> Hi Daniela, You should generate the mesh counterclockwise, see the following example: // border A(t=0,0.5){x=2+t;y=0; label=1;}; border B(t=0,2.5){x=2.5;y=t;label=2;}; border C(t=0,0.5){x=2.5+t;y=2.5;label=3;}; border D(t=0,0.5){x=3;y=2.5+t;label=4;}; border E(t=0,1){x=3-1.5\*t;y=3;label=5;}; border F(t=0,0.5){x=1.5;y=3-t;label=6;}; border G(t=0,0.5){x=1.5+t;y=2.5;label=7;}; border H(t=0,2.5){x=2;y=2.5-t;label=8;}; int n=10; mesh Th=buildmesh(A(n)+ B(n)+ C(n)+ D(n)+ E(n)+ F(n)+ G(n)+ …
