# Movemesh does not work properly

**URL:** https://community.freefem.org/t/movemesh-does-not-work-properly/883
**Category:** General Discussion
**Created:** [March 31, 2021, 11:27am UTC](https://community.freefem.org/t/movemesh-does-not-work-properly/883 "2021-03-31T11:27:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sgkkr](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@sgkkr](https://community.freefem.org/u/sgkkr)
#### Post date: [March 31, 2021, 11:27am UTC](https://community.freefem.org/t/movemesh-does-not-work-properly/883/1 "2021-03-31T11:27:36Z")

</div>

I built discrete analytical expressions for transforming a rectangular mesh into a bump shape. I derived the expressions using spline curves on python and I am trying to use the same in FreeFem++ but it does not give me the desired transformed geometry for the mesh (as required). Below is the piece of the code used in FreeFem++ for the same.  
gh refers to the rectangular mesh which extends from 0 \<= x \<= 3.2895 and 0 \<= y \<= 2

gh = movemesh(gh,[x, ((x == 0.)_(0.) + (0. \< x \<= 1.2622)_(((- 8.04576683e-07) + y\*(2. - (- 8.04576683e-07 + 1.82453782e-04_x + 5.34970465e-03_(x)^2 + 4.81687917e-02\*(x)^3 + 1.03840134e-03\*(x)^4 - 2.05216562e-03\*(x)^5))/2. + 1.82453782e-04_x + 5.34970465e-03_(x)^2 + 4.81687917e-02\*(x)^3 + 1.03840134e-03\*(x)^4 - 2.05216562e-03\*(x)^5)) + (1.2622 \< x \<= 2.5372)_(((- 1.21682548) + y_(2. - (- 1.21682548 + 3.46330834_x - 3.84020385_(x)^2 + 2.11549888\*(x)^3 - 0.53002281\*(x)^4 + 0.04873513\*(x)^5))/2. + 3.46330834_x - 3.84020385_(x)^2 + 2.11549888\*(x)^3 - 0.53002281\*(x)^4 + 0.04873513\*(x)^5)) + (2.5372 \< x \<= 3.1748)_(((30.84120707) + y_(2. - (30.84120707 - 55.44215109_x + 39.41337914_(x)^2 - 13.738279\*(x)^3 + 2.36768666\*(x)^4 - 0.16226731\*(x)^5))/2. - 55.44215109_x + 39.41337914_(x)^2 - 13.738279\*(x)^3 + 2.36768666\*(x)^4 - 0.16226731\*(x)^5)) + (3.1748 \< x \<= 3.2895)_(((- 45.55263021) + y_(2. - (- 45.55263021 + 71.59032958_x - 45.04785632_(x)^2 + 14.32888663\*(x)^3 - 2.29397151\*(x)^4 + 0.14731438\*(x)^5))/2. + 71.59032958_x - 45.04785632_(x)^2 + 14.32888663\*(x)^3 - 2.29397151\*(x)^4 + 0.14731438\*(x)^5)))]);

Any sort of help will be highly appreciated.
