# Flexible GMRES (fgmres)

**URL:** <https://community.freefem.org/t/flexible-gmres-fgmres/2804>\
**Category:** General Discussion\
**Created:** [November 15, 2023, 4:43pm UTC](https://community.freefem.org/t/flexible-gmres-fgmres/2804 "2023-11-15T16:43:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Talal](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@Talal](https://community.freefem.org/u/Talal)\
**Post date:** [November 15, 2023, 4:43pm UTC](https://community.freefem.org/t/flexible-gmres-fgmres/2804/1 "2023-11-15T16:43:58Z")

</div>

I’m utilizing fGMRES and require guidance on how to implement the restart number.

---

<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:** [November 15, 2023, 4:46pm UTC](https://community.freefem.org/t/flexible-gmres-fgmres/2804/2 "2023-11-15T16:46:24Z")

</div>

`-ksp_gmres_restart XYZ`?

---

<div class="post-metadata">

**Author:** ![Talal](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@Talal](https://community.freefem.org/u/Talal)\
**Post date:** [November 26, 2023, 7:42pm UTC](https://community.freefem.org/t/flexible-gmres-fgmres/2804/3 "2023-11-26T19:42:49Z")

</div>

Would you kindly provide me with examples relevant to my case, such as the Navier-Stokes or Stokes equations using “-ksp\_gmres\_restart”? Additionally, I’m currently working with splitting the solution of the linear system into three variables (u, ksi, p) in order to calculate erroru, errorksi, and errorp. I need to use the fieldsplit preconditioner to split the linear system. If possible, please provide examples if you have it to support my case. Thank you.

---

<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:** [November 26, 2023, 7:43pm UTC](https://community.freefem.org/t/flexible-gmres-fgmres/2804/4 "2023-11-26T19:43:56Z")

</div>

There are many examples in [https://github.com/FreeFem/FreeFem-sources/tree/master/examples/hpddm](https://github.com/FreeFem/FreeFem-sources/tree/master/examples/hpddm).
