# Implement itereative method

**URL:** <https://community.freefem.org/t/implement-itereative-method/261>\
**Category:** General Discussion\
**Created:** [February 19, 2020, 8:52pm UTC](https://community.freefem.org/t/implement-itereative-method/261 "2020-02-19T20:52:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Healhart](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@Healhart](https://community.freefem.org/u/Healhart)\
**Post date:** [February 19, 2020, 8:52pm UTC](https://community.freefem.org/t/implement-itereative-method/261/1 "2020-02-19T20:52:17Z")

</div>

![Capture-dcran-de-2020-02-19-21-36-28-ConvertImage](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/511c874aa37aebdc5606ff623082780e1522014a.png)

Hi everyone, i’m working on a fluid structure interaction problem and I want to solve it with the iteration method on the image.  
With Gamma\_0 a circle (r=1) contained in a bigger circle Gamma (r=6).

The iteration part of my code is:  
fespace Vh(Th,P2);  
Vh psi,v;  
Vh ro = 1.0;  
fespace ZVh(Local,P2);

for(int i = 0; i \< 2; i++){  
solve potential(psi,v) =

- int2d(Th)(ro\*((dx(psi)_dx(v)+dy(psi)dy(v))+eps(psi)_(v)))

- int1d(Th,BigCircle)(ro \* Ub\*(N.x+N.y) \* v);

ZVh ZcoeffPot, coeffPot;  
coeffPot = -1.0\*(dx(psi)^2 + dy(psi)^2);  
ro = (1+(gamma-1)/(gamma+1)_coeffPot)^(1/gamma - 1);  
ZVh Zro = ro;  
ZcoeffPot = -1.0_coeffPot;  
plot(ZcoeffPot, fill = 1, value = 1);  
}

And I’d like to know if my code is correct for the iteration (just for this part). Thank you for your help.
