# Assertion fail:(ie==nbe) in msh2.cpp

**URL:** <https://community.freefem.org/t/assertion-fail-ie-nbe-in-msh2-cpp/1133>\
**Category:** General Discussion\
**Created:** [August 2, 2021, 4:21pm UTC](https://community.freefem.org/t/assertion-fail-ie-nbe-in-msh2-cpp/1133 "2021-08-02T16:21:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [August 2, 2021, 4:21pm UTC](https://community.freefem.org/t/assertion-fail-ie-nbe-in-msh2-cpp/1133/1 "2021-08-02T16:21:11Z")

</div>

Dear all,

I have a 3D mesh generated by GID, which has an internal surface as shown in the following figure.  
Using **one processor** there is no problem of reading the mesh and executing my parallel code. However, the code cannot deal with the mesh correctly if I use more that one processor, and the error is:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/3d32f46004ceef8fa678d6455c9c3219d99f505a.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/531565c05b6a1d92ced86fe53ee02375496a1800.png)  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/7c32a2d3b2393842d5586c8b85190d835516712a.png)

Does this error occur when executing **buildDmesh(Th)**?  
Does any one have an ideas what’s going wrong?

Best,  
Yongxing.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [August 2, 2021, 4:36pm UTC](https://community.freefem.org/t/assertion-fail-ie-nbe-in-msh2-cpp/1133/2 "2021-08-02T16:36:38Z")

</div>

Most probably your mesh is not a closed surface and there is a problem with the boundary elements.  
If you just try to load the mesh and do `Th = trunc(Th, 1, split = 2);` in a sequential script, do you have an error?

---

<div class="post-metadata">

**Author:** ![yongxing](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/yongxing/32/3632_2.png) [@yongxing](https://community.freefem.org/u/yongxing)\
**Post date:** [August 2, 2021, 6:01pm UTC](https://community.freefem.org/t/assertion-fail-ie-nbe-in-msh2-cpp/1133/3 "2021-08-02T18:01:21Z")

</div>

Thank you very much! I did find a problem the surface mesh.  
Yongxing.
