# Strange behaviour with int2d (Freefem 4.10)

**URL:** <https://community.freefem.org/t/strange-behaviour-with-int2d-freefem-4-10/1662>\
**Category:** General Discussion\
**Created:** [April 12, 2022, 7:54am UTC](https://community.freefem.org/t/strange-behaviour-with-int2d-freefem-4-10/1662 "2022-04-12T07:54:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trophime](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/trophime/32/215_2.png) [@Trophime](https://community.freefem.org/u/Trophime)\
**Post date:** [April 12, 2022, 7:54am UTC](https://community.freefem.org/t/strange-behaviour-with-int2d-freefem-4-10/1662/1 "2022-04-12T07:54:33Z")

</div>

Hi,  
I’ve defined a Th mesh with a region Coil1.

```auto
func Pk = P1;
fespace Ah(Th, Pk);
Ah Coil = 1*(Th(x,y).region == Coil1);

real Area = int2d(Th, qforder=6)(Coil);
real Area1 = int2d(Th, qforder=6)(1*(Th(x,y).region == Coil1));

```

This gives me:  
S=0.000979574 m2, 0.00126 m2

Why Area and Area1 does not display the same value?

---

<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 12, 2022, 10:24am UTC](https://community.freefem.org/t/strange-behaviour-with-int2d-freefem-4-10/1662/2 "2022-04-12T10:24:48Z")

</div>

Well, without the mesh, it’s kind of hard to reproduce, but I don’t see why you would expect the same results whenever `func Pk != P0`.

---

<div class="post-metadata">

**Author:** ![Trophime](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/trophime/32/215_2.png) [@Trophime](https://community.freefem.org/u/Trophime)\
**Post date:** [April 12, 2022, 11:01am UTC](https://community.freefem.org/t/strange-behaviour-with-int2d-freefem-4-10/1662/3 "2022-04-12T11:01:22Z")

</div>

It’s true that this will depend on Pk space on integration scheme used  
But the result is very different which is somehow unexpected.

The computed magnetic field from this model is quite different from what is expected (by a factor 1/2 !!) unless I’ve made some mistake

PS: I’ve send you the corresponding edp file by email as I haven’t managed to attach the file to this email
