# Edge number/label

**URL:** <https://community.freefem.org/t/edge-number-label/1503>\
**Category:** General Discussion\
**Created:** [February 16, 2022, 8:19pm UTC](https://community.freefem.org/t/edge-number-label/1503 "2022-02-16T20:19:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![larismartins](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/larismartins/32/2712_2.png) [@larismartins](https://community.freefem.org/u/larismartins)\
**Post date:** [February 16, 2022, 8:19pm UTC](https://community.freefem.org/t/edge-number-label/1503/1 "2022-02-16T20:19:29Z")

</div>

Is there a way to get the edge numbering? For boundary edges and internal edges.  
For example:

 ![Imagem capturada-16-02-2022 17-08-25](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/f2faba64edfac8ac0252098f24a61167dc9d294e.png)

I want to number each edge from a given mesh

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [February 17, 2022, 12:53pm UTC](https://community.freefem.org/t/edge-number-label/1503/2 "2022-02-17T12:53:16Z")

</div>

You can use a P0Ege Finite element,

```auto
fespace Eh(Th,P0Egde);
for (int k=O, k<Th.nt;++k)
  for(int i=0; i<3;++i) // in 2d 
    { int nu = Eh(k,i) ;
    // nu the a number of edge i in triangle k
     int i1 = Th[k][(i+1)%3];
     int i2 = Th[k][(i+2)%3];
    int orientation = i1 < i2; 
}

```

---

<div class="post-metadata">

**Author:** ![larismartins](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/larismartins/32/2712_2.png) [@larismartins](https://community.freefem.org/u/larismartins)\
**Post date:** [February 19, 2022, 7:19pm UTC](https://community.freefem.org/t/edge-number-label/1503/3 "2022-02-19T19:19:19Z")

</div>

This way I’m numbering the edges. Is this the same for the labels? To establish boundary conditions.
