# TAO Nonlinear Least-Squares integration

**URL:** <https://community.freefem.org/t/tao-nonlinear-least-squares-integration/3150>\
**Category:** Feature Request\
**Created:** [April 25, 2024, 6:50pm UTC](https://community.freefem.org/t/tao-nonlinear-least-squares-integration/3150 "2024-04-25T18:50:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarolinePascal](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/carolinepascal/32/2281_2.png) [@CarolinePascal](https://community.freefem.org/u/CarolinePascal)\
**Post date:** [April 25, 2024, 6:50pm UTC](https://community.freefem.org/t/tao-nonlinear-least-squares-integration/3150/1 "2024-04-25T18:50:51Z")

</div>

Hi everyone !

I’ve recently started using TAO to solve ill-posed problems, and I’d like to give a try to Tikhonov regularization methods. However, TAO least-squares solvers ([TAO: Optimization Solvers — PETSc 3.21.0 documentation](https://petsc.org/release/manual/tao/#sec-tao-leastsquares)) are not yet supported (missing `TaoSet(Jacobian)Residual()` routines).

Do you think it would be possible to add these solvers to FreeFem TAO wrapper ?

If an alternative is already available, do not hesitate to mention it as well 🙂

Thank you in advance for your help, and for your work in FreeFem !

Best regards,

Caroline.

---

<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 26, 2024, 11:17am UTC](https://community.freefem.org/t/tao-nonlinear-least-squares-integration/3150/2 "2024-04-26T11:17:56Z")

</div>

It would be a very nice addition to the PETSc plugin in `plugin/mpi/PETSc-code.hpp` if you are willing to pitch in.
