I would like to configure the nonlinear solver in petxc, in the same spirit as what is done in the demo Solver configuration โ FEniCSx tutorial for linear solvers. I tried the following command
problem = dolfinx.fem.petsc.NonlinearProblem(residual, u, bcs=[bc], petsc_options={"pc_type": "lu"})
but this yields an error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In [25], line 2
1 # We use dolfinx newton solver
----> 2 problem = dolfinx.fem.petsc.NonlinearProblem(residual, u, bcs=[bc], petsc_options={"pc_type": "lu"})
TypeError: __init__() got an unexpected keyword argument 'petsc_options'