How to save the intemediate results for each iteration of Newton solver?

Hello everyone,

I am using newton solver to solve a nonlinear problem, however, the calculation did not converge. Here is the command that I use to call the solver

problem = MixedNonlinearVariationalProblem(F_blocks, u.split(), bcs, J=Jacobian)
solver = MixedNonlinearVariationalSolver(problem)
prm = solver.parameters
prm['newton_solver']['absolute_tolerance'] = 1E-9
prm['newton_solver']['relative_tolerance'] = 1E-9
prm['newton_solver']['maximum_iterations'] = 10
prm['newton_solver']['relaxation_parameter'] = 1.0
solver.solve()

Although the results did not converge, I still need to see the results for each iteration. I have read the tutorial for nonlinear solver and I found that I may need to transform my nonlinear problem into iterative linear problem. Before doing that, I would like to ask if there are other ways that I can save the results by only adjusting the solver parameters?

Regards
Phuris