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

Does NonlinearVariationalSolver perform line search under the hood ?

+1 vote

I am using it as below:

U = Function(W)     # the most recently computed solution
R  = action(F, U)     # residual at  U
DR  = derivative(R,  U)   # Gateaux derivative in dir. of  U at U
problem = NonlinearVariationalProblem(R, U, bcs, DR)
solver  = NonlinearVariationalSolver(problem)

I understand NonlinearVariationalSolver does a Newton-Raphson under the hood. Does it also do a line search to calculate the next iterate for the solution ?

asked Jun 15, 2014 by shriram FEniCS User (1,540 points)
edited Jun 16, 2014 by shriram

1 Answer

+3 votes
 
Best answer

Nope. If you want that, switch to the PETSc snes solver by adding the following:

solver.parameters['nonlinear_solver']='snes' 
solver.parameters['snes_solver']['line_search'] = 'bt' 
info(solver.parameters, True)

The last line will output the other options you can choose from.

answered Jun 16, 2014 by mwelland FEniCS User (8,410 points)
selected Jun 16, 2014 by shriram
...