# Getting errors in adaptive finite element FF++ code of Heat equation

**URL:** <https://community.freefem.org/t/getting-errors-in-adaptive-finite-element-ff-code-of-heat-equation/3814>\
**Category:** General Discussion\
**Created:** [March 19, 2025, 4:18pm UTC](https://community.freefem.org/t/getting-errors-in-adaptive-finite-element-ff-code-of-heat-equation/3814 "2025-03-19T16:18:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)\
**Post date:** [March 19, 2025, 4:18pm UTC](https://community.freefem.org/t/getting-errors-in-adaptive-finite-element-ff-code-of-heat-equation/3814/1 "2025-03-19T16:18:32Z")

</div>

Dear all experts, i am getting errors in **adaptive finite element FF++ code of Heat equation.**  
Here, is my code\>  
[Heat\_adapt.edp](https://community.freefem.org/uploads/short-url/kIIaSFv0trthJdlIIy7vPe4r8z6.edp) (5.5 KB)

Here, is the error\>  
Error in the def of sub domain 0 form border 4/4: Bad sens 0 -1  
Error in the def of sub domain 1 form border 3/4: Bad sens 1 -1  
Error in the def of sub domain 2 form border 2/4: Bad sens 2 -1  
Error in the def of sub domain 3 form border 1/4: Bad sens 3 -1  
Fatal error in the meshgenerator 777  
current line = 138  
Meshing error: Bamg  
number : 777,  
catch Err bamg  
ffgui: Socket::Read: ffsock: Connection reset by peer  
ffgui: FreeFem++ has stopped unexpectedly.

**In this code, i have used the adaptmesh code of poisson equation from tutorial example but i have to use space-time adaptive algorithm. How can i do that in this code??.**  
I will be very grateful if i get any suggestion to avoid this errors.

Thanks in advance!.

---

<div class="post-metadata">

**Author:** ![Monirul25](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/monirul25/32/3287_2.png) [@Monirul25](https://community.freefem.org/u/Monirul25)\
**Post date:** [March 26, 2025, 8:12am UTC](https://community.freefem.org/t/getting-errors-in-adaptive-finite-element-ff-code-of-heat-equation/3814/2 "2025-03-26T08:12:35Z")

</div>

Dear all experts, **i have done the code still good results is not coming.**  
Here, is my code\>  
[Heat\_adapt\_new.edp](https://community.freefem.org/uploads/short-url/qwQ29jMECliWIaurI5j5Ziz42CM.edp) (7.1 KB)

Thanks in advance!.
