# Why is my code note working ?( simple code)

**URL:** <https://community.freefem.org/t/why-is-my-code-note-working-simple-code/2961>\
**Category:** General Discussion\
**Created:** [February 11, 2024, 9:36pm UTC](https://community.freefem.org/t/why-is-my-code-note-working-simple-code/2961 "2024-02-11T21:36:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brrrr](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@brrrr](https://community.freefem.org/u/brrrr)\
**Post date:** [February 11, 2024, 9:36pm UTC](https://community.freefem.org/t/why-is-my-code-note-working-simple-code/2961/1 "2024-02-11T21:36:50Z")

</div>

Good eveneing everyone , I am a begginer on freemfem++. My programm doesnt compile and i just cant understand why. The problems seems to be due to the int2d function. Thank you for your help! Error message : "int2d(Vh) error operator ( \<PP5v\_fes\>  
List of (hoices \<20CDomainOfIntegration\> : … )  
( \<20CDomainOfIntegration\> : … )  
( \<20CDomainOfIntegration\> : … )

Error line number 21, "  
: the programm is as follow ( the comments are in french ).  
real a = 1; // Demi axe vertical

real r0 = 1.5; // Demi axe horizontal

real R = 5; // Taille de la boîte englobante

real f=20; //precision du maillage

border omega(t=0, pi){x =r0_sin(t); y = a_cos(t);label=0;};

border axis2(t=-a,-R){x=0;y=t;label=1;};

border side3(t=0,R){x=t;y=-R;label=1;};

border side4(t=-R,R){x=R;y=t;label=1;};

border side5(t=R,0){x=t;y=R;label=1;};

border axis1(t=R,a){x=0;y=t;label=1;};

plot(omega(f/2)+axis2(f)+side3(f)+side4(2\*f)+side5(f)+axis1(f));

mesh maillage =buildmesh (omega(f/2)+axis2(f)+side3(f)+side4(2\*f)+side5(f)+axis1(f));

//plot(maillage);

//mesh maillageup=adaptmesh(maillage,50);

//plot(maillageup);

fespace Vh(maillage ,P1);

Vh uh,vh;

problem MonProbleme(uh,vh)=

int2d(Vh)(dx(uh)\*dx(vh) + dy(uh)\*dy(vh))

+on(1,uh=0)

+on(0,uh=1);

MonProbleme;

---

<div class="post-metadata">

**Author:** ![julienG](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/julieng/32/222_2.png) [@julienG](https://community.freefem.org/u/julienG)\
**Post date:** [February 12, 2024, 8:56am UTC](https://community.freefem.org/t/why-is-my-code-note-working-simple-code/2961/2 "2024-02-12T08:56:07Z")

</div>

Integration must be on the mesh, not the FE-space, so: `int2d(maillage)(...);`
