This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

change Newton solver tol and maximum iteration

+1 vote

Hi, I am novice user of FEniCS.

I am using solve (F == 0, w, dirichlet_u) , it automatically calls NewtonSolver and defalt tol is 1e-10 , and maxiter = 50, How can i change default tol and max iter ?

asked Jan 22, 2017 by hirshikesh FEniCS User (1,890 points)

2 Answers

+2 votes
 
Best answer
solve(F == 0, u, bc,
   solver_parameters={"newton_solver":{"relative_tolerance":1e-10},"newton_solver":{"maximum_iterations":50}})
answered Jan 23, 2017 by lhdamiani FEniCS User (2,580 points)
selected Jan 23, 2017 by hirshikesh
+1 vote

Check the Nonlinear Poisson demo.

answered Jan 22, 2017 by str FEniCS User (1,600 points)

Thank you so much

...