# Lgfem.cpp : pb occuring while remeshing with periodic boundary conditions

**URL:** <https://community.freefem.org/t/lgfem-cpp-pb-occuring-while-remeshing-with-periodic-boundary-conditions/205>\
**Category:** General Discussion\
**Created:** [December 24, 2019, 9:52am UTC](https://community.freefem.org/t/lgfem-cpp-pb-occuring-while-remeshing-with-periodic-boundary-conditions/205 "2019-12-24T09:52:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JHD](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@JHD](https://community.freefem.org/u/JHD)\
**Post date:** [December 24, 2019, 9:52am UTC](https://community.freefem.org/t/lgfem-cpp-pb-occuring-while-remeshing-with-periodic-boundary-conditions/205/1 "2019-12-24T09:52:39Z")

</div>

Hi Everyone,

I have problems while remeshing a mesh with periodic boundary conditions. I get an error when I reinterpolate fields on the new mesh.  
The issue occurs with the file lgfem.cpp… but by looking at it, I am missing what it actually does.

Do you know what are the variables x0 and x1 ? I would like to understand this to understand the error I get,

I have an h quite small (h=0.005819), and a difference of xmx (=max(all x1,x0)?) - xmn (=min(all x0 x1)?) quite big (4.281e+04) and the ratio should not be too large if I trust the code; but in my case it is over 1e7 … ☹

If you have any indication, I would be glad!

Julien

PS: my error :

–Update: periodic 0 4.281e+04 h=0.005819  
current line = 363  
Assertion fail : (coef\>1e-10 && (xmx-xmn)\*coef \< 1.e7)  
line :1109, in file lgfem.cpp

PS2: the code states that 0 is xmn and 4.281e+04 is xmx

PS3 My mesh is also a sum of two meshes that are remeshed separetely, but I am not sure if this is relevant or not

---

<div class="post-metadata">

**Author:** ![JHD](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@JHD](https://community.freefem.org/u/JHD)\
**Post date:** [January 20, 2020, 9:55am UTC](https://community.freefem.org/t/lgfem-cpp-pb-occuring-while-remeshing-with-periodic-boundary-conditions/205/2 "2020-01-20T09:55:35Z")

</div>

Hi everyone, I am encountering again this error:

Assertion fail : (coef\>1e-10 && (xmx-xmn)\*coef \< 1.e7)  
line :1109, in file lgfem.cpp  
Assertion fail : (coef\>1e-10 && (xmx-xmn)\*coef \< 1.e7)  
line :1109, in file lgfem.cpp  
err code 5 , mpirank 0

Does anyone have any piece of information about lgfem.cpp ? that would be very useful ! Thanks a lot!

Julien
