# Boundary condition on mesh

**URL:** <https://community.freefem.org/t/boundary-condition-on-mesh/911>\
**Category:** General Discussion\
**Created:** [April 13, 2021, 9:40am UTC](https://community.freefem.org/t/boundary-condition-on-mesh/911 "2021-04-13T09:40:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [April 13, 2021, 9:40am UTC](https://community.freefem.org/t/boundary-condition-on-mesh/911/1 "2021-04-13T09:40:08Z")

</div>

Dear all,

I only have mesh imported from a TetGen output. How should I enforce the boundary conditions in this case (the corresponding boundary nodes are labelled)?

Thank you in advance!  
Yongxing

---

<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:** [April 14, 2021, 7:29am UTC](https://community.freefem.org/t/boundary-condition-on-mesh/911/2 "2021-04-14T07:29:24Z")

</div>

Sorry,

Your question too vague,

you can get the list of label of mesh3 Th

```
  int[int] labs = labels(Th); 
  cout << labs < endl; 

```

or you can build the surface mesh  
load “msh3”  
laid “medit”  
Th = buildBdMesh(Th); // build the surface mesh  
meshS Th1 = Th.Gamma;  
plot(Th1,wait=1);  
medit(“Th1”,Th1); // to see label of region of Th1 …

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [April 15, 2021, 3:15pm UTC](https://community.freefem.org/t/boundary-condition-on-mesh/911/3 "2021-04-15T15:15:40Z")

</div>

Thank you very much Prof. Hecht! This works pretty well for me.  
Yongxing.
