Hi.
Your code is not reproducible because of the line
solve(form == 0, w, bc, J=derivative(form, u, du),
solver_parameters={"newton_solver": {"relative_tolerance": 1e-6, "absolute_tolerance": 1e-10, "convergence_criterion": "incremental"}})
since du
is not defined. Changing to
solve(form == 0, w, bc, J=derivative(form, w, dw),
solver_parameters={"newton_solver": {"relative_tolerance": 1e-6, "absolute_tolerance": 1e-10, "convergence_criterion": "incremental"}})
yields to the error you described. By taking a glimpse on your code, I noted that you are using (L, A, u) = w.split()
. The correct line is
(L, A, u) = split(w)
This will make your code run. The last is necessary in non-linear problems (see for example Function.split() vs Split(Function)). However, I’m not getting any convergence, so you maybe want to debug further. For example, use interpolate
instead of `project for exact solutions.
Cheers.