# How to access the boundary triangles

**URL:** https://community.freefem.org/t/how-to-access-the-boundary-triangles/1329
**Category:** General Discussion
**Created:** [November 16, 2021, 5:12pm UTC](https://community.freefem.org/t/how-to-access-the-boundary-triangles/1329 "2021-11-16T17:12:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Amin](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@Amin](https://community.freefem.org/u/Amin)
#### Post date: [November 16, 2021, 5:12pm UTC](https://community.freefem.org/t/how-to-access-the-boundary-triangles/1329/1 "2021-11-16T17:12:41Z")

</div>

Hello,  
I want to access all triangles with at least one boundary vertex. And then the boundary vertices in each of these triangles need to be find.  
I tried the following code and got an error at the start.  
the following figure shows what I mean by boundary triangle.

 ![Triangle](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/e3b1a8df6323797b6e71230c17afb65189ec2802.png)

any help would be appreciated.

```auto
border C1(t=0,2*pi){x=10*cos(t);y=10*sin(t);}
mesh Th=buildmesh(C1(10));

int Triangle = Th.be(1).Element;
int Adjacent = Th[Triangle].adj(0);

```

the error:

```auto
8 : int Adjacent = Th[Triangle].adj(0) error operator <N12_GLOBAL__N_19lgElement3AdjE>, <l>       
 List of choices
         ( <N12_GLOBAL __N_19lgElementE> : <N12_GLOBAL__ N_19lgElement3AdjE>, <Pl> )

 Error line number 8, in file Test.edp, before token )

```

---

<div class="post-metadata">

### Author: ![Jamal](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/jamal/32/1527_2.png) [@Jamal](https://community.freefem.org/u/Jamal)
#### Post date: [July 20, 2022, 11:43am UTC](https://community.freefem.org/t/how-to-access-the-boundary-triangles/1329/2 "2022-07-20T11:43:53Z")

</div>

See:  
[https://doc.freefem.org/documentation/mesh-generation.html](https://doc.freefem.org/documentation/mesh-generation.html)
