FreeFem / FreeFem-sources

FreeFEM source code
https://freefem.org/
Other
775 stars 191 forks source link

Nonlinear solver #114

Closed linwaytin closed 5 years ago

linwaytin commented 5 years ago

Hi there,

I am working on a nonlinear PDE. It seems the "problem" supports only a linear problem, and users have to write nonlinear solvers by themselves like this https://www.um.es/freefem/ff++/pmwiki.php?n=Main.NonlinearEllipticEquation

However I do see FreeFEM++ has interface to PETSc, which contains nonlinear solvers. Is there any way I can solve a nonlinear problem easily, just like linear problems?

Thank you.

prj- commented 5 years ago

Sure, here are some examples:

These examples are in 2D so that it is easier to visualize results, but of course, it works in 3D as well. If you need some more help, you can have a look at this tutorial. FreeFEM has no automatic differentiation, but if you have two func (one for updating a Jacobian and another for computing a residual), then you are all set.

linwaytin commented 5 years ago

Thank you so much. That's what I want.

The tutorial looks perfect. I would suggest putting those links to the official website. I never found them on the Internet. (This is probably due to my poor searching technique.) It would be better that people can find these resources on the official website.

prj- commented 5 years ago

Thank you for your kind words. I'll put a link in the documentation to the tutorial. Unless you have further questions, could you please close the issue? If you have very specific issues, you can always contact me via email directly later on. Thanks.

linwaytin commented 5 years ago

Thank you.