# Segmentation error with fine mesh

**URL:** https://community.freefem.org/t/segmentation-error-with-fine-mesh/1668
**Category:** General Discussion
**Created:** [April 13, 2022, 2:46pm UTC](https://community.freefem.org/t/segmentation-error-with-fine-mesh/1668 "2022-04-13T14:46:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Loic](https://avatars.discourse-cdn.com/v4/letter/l/e9c0ed/32.png) [@Loic](https://community.freefem.org/u/Loic)
#### Post date: [April 13, 2022, 2:46pm UTC](https://community.freefem.org/t/segmentation-error-with-fine-mesh/1668/1 "2022-04-13T14:46:59Z")

</div>

[Plane\_5.zip](https://community.freefem.org/uploads/short-url/hRMKkZbJuYFkXWkC8P8f4Wv3ekO.zip) (5.7 KB)

Hello all,  
I have the following mesh. When I try to open it like this:

```auto
mesh Th1=gmshload("Plane_5.msh");

```

I get the following errror:

`Assertion fail : (area > 0) line :303, in file ../seq/include/fem.hpp Assertion fail : (area > 0) line :303, in file ../seq/include/fem.hpp err code 6 , mpirank 0 `  
This error happens only when the mesh is refined. Indeed, if I consider coarser elements, this problem does not occur.

Could someone help to understand what is the problem ?

Thank you in advance,

Best regards,

Loïc,

---

<div class="post-metadata">

### Author: ![Loic](https://avatars.discourse-cdn.com/v4/letter/l/e9c0ed/32.png) [@Loic](https://community.freefem.org/u/Loic)
#### Post date: [April 13, 2022, 3:09pm UTC](https://community.freefem.org/t/segmentation-error-with-fine-mesh/1668/2 "2022-04-13T15:09:58Z")

</div>

I attach also the same mesh with coarser elements.  
[Plane\_5.zip](https://community.freefem.org/uploads/short-url/pTjfDNVqwQIzg4XWSXlD9jYgGh1.zip) (3.6 KB)

I have no problem to open this one.

Best regards,

Loïc,

---

<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: [April 13, 2022, 3:10pm UTC](https://community.freefem.org/t/segmentation-error-with-fine-mesh/1668/3 "2022-04-13T15:10:47Z")

</div>

Are you sure about your mesh?

```auto
load "PETSc"
DM dm("Plane_5.msh");
mesh Th = dm;
fespace Vh(Th, P1);
Vh u = x + y;
plot(u);

```

 ![Screenshot 2022-04-13 at 5.09.40 PM](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/4/47eeda9e455624986595fa79a9bb87a4a43ab1e3.png)

---

<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: [April 13, 2022, 3:11pm UTC](https://community.freefem.org/t/segmentation-error-with-fine-mesh/1668/4 "2022-04-13T15:11:32Z")

</div>

The second mesh looks better, no weird corner on the bottom left.

---

<div class="post-metadata">

### Author: ![Loic](https://avatars.discourse-cdn.com/v4/letter/l/e9c0ed/32.png) [@Loic](https://community.freefem.org/u/Loic)
#### Post date: [April 13, 2022, 3:15pm UTC](https://community.freefem.org/t/segmentation-error-with-fine-mesh/1668/5 "2022-04-13T15:15:13Z")

</div>

Hello @prj ,

Thank you for this vizualization.  
I see my error now, the weird corner on the bottom left should not be there.

Best regards,

Loïc,
