Hi all,
I have a question regarding solving a simple non-linear equation within the framework of fenics.
Say I have a non-linear function
f = u - ln(u) - a
and I would like to solve for f = 0
.
If a is a float number, I can use a simple bisection method with scipy like scipy.optimize.bisect(f, f(a), f(b))
to solve for u.
Now, I would like to solve the function on a 2-d mesh. u = u(x, y)
and a = a(x,y)
(a is known, like defined in different subdomains representing different mateirals.)
How should I solve for u
within the framework of fenics? the simple scipy bisection function does not work as f has to be a number, instead here f is a finite element function defined on a mesh.
Thanks.