I try to solve problems like \nabla^2 u= A*u^(-n)+f in 2D cylindrical coordinates, where A is a constant, n a positive integer, and f a given scalar function. It doesn’t converge by simply modifying the nonlinearpoisson_code example. Where can I find information on solver options? The API reference is not very helpful. Suggestion on how to approach the problem is also welcome!!
(Regular and newbie user here.) Did you try PETSc documentation as suggested in the tutorial that you mentioned? Did you see the tutorial for the Newton solver on that same website? FEniCSx allows you to pass (almost?) any option to PETSc. I even saw something with MUMPS somewhere. There is also the NewFrac website. Good luck (I’ll need it).
this block is a complete mystery to me:
"
ksp = solver.krylov_solver
opts = PETSc.Options()
option_prefix = ksp.getOptionsPrefix()
opts[f"{option_prefix}ksp_type"] = “cg”
opts[f"{option_prefix}pc_type"] = “gamg”
opts[f"{option_prefix}pc_factor_mat_solver_type"] = “mumps”
ksp.setFromOptions()"
For example, I can’t find description of krylov_solver, or its siblings. Maybe they are all in the PETSc documentation. I’ll take a closer look. Thx.
Indeed, that is not really FEniCSx, that is PETSc.