# Problem in boundary condition implementation while using mesh formed by movemesh

**URL:** <https://community.freefem.org/t/problem-in-boundary-condition-implementation-while-using-mesh-formed-by-movemesh/3666>\
**Category:** General Discussion\
**Created:** [December 30, 2024, 2:44pm UTC](https://community.freefem.org/t/problem-in-boundary-condition-implementation-while-using-mesh-formed-by-movemesh/3666 "2024-12-30T14:44:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaghunathBandha](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/raghunathbandha/32/1843_2.png) [@RaghunathBandha](https://community.freefem.org/u/RaghunathBandha)\
**Post date:** [December 30, 2024, 2:44pm UTC](https://community.freefem.org/t/problem-in-boundary-condition-implementation-while-using-mesh-formed-by-movemesh/3666/1 "2024-12-30T14:44:50Z")

</div>

Hello!  
I have solved the Poisson problem with Dirichlet boundary condition for an ellipse domain. I transformed the ellipse into a circle solved the problem in circle then got the solution in ellipse by inverse transformation. You can see here  
[exp2.edp](https://community.freefem.org/uploads/short-url/yTsOfRd61MicDUC3uqbDCl3Z7iL.edp) (766 Bytes)  
I got the answer without using movemesh. But while using movemesh I am facing difficulty in setting boundary condition in the transformed mesh, which is generated from original mesh by using movemesh.  
Please help with this.  
[exp1.edp](https://community.freefem.org/uploads/short-url/qSFaSZSGGoXyMEtAUFgWMJpaavu.edp) (779 Bytes)

---

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [January 3, 2025, 2:53pm UTC](https://community.freefem.org/t/problem-in-boundary-condition-implementation-while-using-mesh-formed-by-movemesh/3666/2 "2025-01-03T14:53:13Z")

</div>

Hello,  
when using `movemesh`, the labels for the transformed mesh Th are taken from the original mesh Sh. Thus the boundary label is “1”. You just have to set  
`solve TPoisson(U,V) = int2d(Th)((b/a)*dx(U)*dx(V)+(a/b)*dy(U)*dy(V))-int2d(Th)(13*a*b*V)+on(1,U=Uexact);`  
If you want to change the labels, you have to use the command `change`

---

<div class="post-metadata">

**Author:** ![RaghunathBandha](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/raghunathbandha/32/1843_2.png) [@RaghunathBandha](https://community.freefem.org/u/RaghunathBandha)\
**Post date:** [January 3, 2025, 4:11pm UTC](https://community.freefem.org/t/problem-in-boundary-condition-implementation-while-using-mesh-formed-by-movemesh/3666/3 "2025-01-03T16:11:16Z")

</div>

Hello Dear,  
I have tried the same problem with Neumann boundary. I am facing difficulty in the line 1D boundary integral under transformation. If du/dn=q given then q_v_ ds is transformed to Q_V_ dS. If du/dn is not given then what about discretized du/dn. Please look at this-  
[exp1.edp](https://community.freefem.org/uploads/short-url/3P5S64MeR09JJdTInb0JEFh5reA.edp) (939 Bytes)
