# How do I obtain the matrix ordering of the boundaries?

**URL:** https://community.freefem.org/t/how-do-i-obtain-the-matrix-ordering-of-the-boundaries/2834
**Category:** General Discussion
**Created:** [December 13, 2023, 7:27pm UTC](https://community.freefem.org/t/how-do-i-obtain-the-matrix-ordering-of-the-boundaries/2834 "2023-12-13T19:27:38Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [December 18, 2023, 9:50am UTC](https://community.freefem.org/t/how-do-i-obtain-the-matrix-ordering-of-the-boundaries/2834/2 "2023-12-18T09:50:26Z")

</div>

I think , you need the list of DoF boundary.

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

fespace Vh(Th,P1);
Vh phi, w;
varf vBord(phi,w) = int1d(Th)(w);
Vh on1=vBord(0,Vh);
for(int i=0; i< Vh.ndof;++i)
if (on1[][i]>0) 
cout << i << " " << endl; 

```

---

_[View the full topic](https://community.freefem.org/t/how-do-i-obtain-the-matrix-ordering-of-the-boundaries/2834)._
