# Compile error in a problem definition

**URL:** <https://community.freefem.org/t/compile-error-in-a-problem-definition/1212>\
**Category:** General Discussion\
**Created:** [September 16, 2021, 2:47am UTC](https://community.freefem.org/t/compile-error-in-a-problem-definition/1212 "2021-09-16T02:47:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaojiemo](https://avatars.discourse-cdn.com/v4/letter/x/a4c791/32.png) [@xiaojiemo](https://community.freefem.org/u/xiaojiemo)\
**Post date:** [September 16, 2021, 2:47am UTC](https://community.freefem.org/t/compile-error-in-a-problem-definition/1212/1 "2021-09-16T02:47:59Z")

</div>

hello, I meet some trouble in problem definition.  
problem order(fi,dfi)=int2d(th1)(dfi_alpha_fi/M)  
-int2d(th1)(dfi_dpfi_(rawf\*(cl-ci)_(setaf1_log(setaf1/273.15)-setaf1+seff))  
+int2d(th1)(dfi_dpfi_rawf\*(sl-si)_seff_(setaf1-seff)/seff)  
//+int2d(th1)(dfi_dpfi_gfi\*(rawi-rawl)_W)  
// -int2d(th1)(dfi_W_dgfi_dpfi)  
// +int2d(th1)(dfi_dpfi_pre1\*(rawl-rawi))  
and the software tell me that the code after “//” are wrong. The error is

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/ec97dc893bb6ea2c1b51349e15e4c2b85d34c9b1.png)  
who can tell me how to make it correct?

---

<div class="post-metadata">

**Author:** ![sumantkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sumantkr/32/2681_2.png) [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Post date:** [September 16, 2021, 6:13am UTC](https://community.freefem.org/t/compile-error-in-a-problem-definition/1212/2 "2021-09-16T06:13:02Z")

</div>

It seems non-linear problem. So first linearize it using Newtons method.

It is given here.  
[https://doc.freefem.org/tutorials/navierStokesNewton.html](https://doc.freefem.org/tutorials/navierStokesNewton.html)

Also, if possible mention the governing equation.

---

<div class="post-metadata">

**Author:** ![xiaojiemo](https://avatars.discourse-cdn.com/v4/letter/x/a4c791/32.png) [@xiaojiemo](https://community.freefem.org/u/xiaojiemo)\
**Post date:** [September 16, 2021, 6:27am UTC](https://community.freefem.org/t/compile-error-in-a-problem-definition/1212/3 "2021-09-16T06:27:14Z")

</div>

the governing equation is like below,

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/686663f2f8391bcd168b10008b249f961e38430b.png)  
in which the pfi=(6_fi_fi-15\*fi+10)\*fi^3 and gfi=pow(fi,2)\*pow(1-fi,2).

---

<div class="post-metadata">

**Author:** ![sumantkr](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/sumantkr/32/2681_2.png) [@sumantkr](https://community.freefem.org/u/sumantkr)\
**Post date:** [September 16, 2021, 6:51am UTC](https://community.freefem.org/t/compile-error-in-a-problem-definition/1212/4 "2021-09-16T06:51:25Z")

</div>

your gov PDE is too big but I can say, few terms of your problem are in non-linear form.

So, first, linearize them using Newton’s method then only you can solve it.

Few links will help you in linearization process:

([FreeFem++ users | Main \>\> Newton2](https://www.um.es/freefem/ff++/pmwiki.php?n=Main.Newton2))

[Newton 3D](https://www.um.es/freefem/ff++/pmwiki.php?n=Main.Newton3D)

[https://doc.freefem.org/tutorials/navierStokesNewton.html](https://doc.freefem.org/tutorials/navierStokesNewton.html)

---

<div class="post-metadata">

**Author:** ![xiaojiemo](https://avatars.discourse-cdn.com/v4/letter/x/a4c791/32.png) [@xiaojiemo](https://community.freefem.org/u/xiaojiemo)\
**Post date:** [September 16, 2021, 12:43pm UTC](https://community.freefem.org/t/compile-error-in-a-problem-definition/1212/5 "2021-09-16T12:43:05Z")

</div>

you mean to linearlize it and get a weak form? I get the equation from an article and it provides the weak form like below,  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/85331e015d05dd0a299288e34670a940d1bea972.png)  
and I wrote the code based on the weak form.
