# Exporting boundary value

**URL:** <https://community.freefem.org/t/exporting-boundary-value/2028>\
**Category:** General Discussion\
**Created:** [September 27, 2022, 7:21pm UTC](https://community.freefem.org/t/exporting-boundary-value/2028 "2022-09-27T19:21:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [September 27, 2022, 8:59pm UTC](https://community.freefem.org/t/exporting-boundary-value/2028/2 "2022-09-27T20:59:39Z")

</div>

I would just use something like the following (based on [this](https://community.freefem.org/t/how-to-identify-the-boundary-label-for-an-import-mesh/161/2) post):

```auto
fespace Vh(Th, [P2,P2,P2,P1]);
Vh [ux, uy, uz, p];
Vh [xx, xy, xz, xp] = [x,x,x,x];
Vh [yx, yy, yz, yp] = [y,y,y,y];
varf vBC1([u1, u2, u3, p], [v1, v2, v3, q]) = 
            on(1, u1 = 1.); // variational formulation to set the values corresponding to the velocity x at label1 to 1
real[int] bcLab1vec = vBC1(0,Vh,tgv=-1); 
for(int i=0; i< bcLab1vec .n; i++) {
    if(abs(bcLab1vec[i]-1)<1e-10)
         file1 << xx[][i]<< " " << yx[][i] << " " << ux[][i] << endl;
}

```

---

_[View the full topic](https://community.freefem.org/t/exporting-boundary-value/2028)._
