Incorrect Newton residuals with PETSc backend
Hey petsc
backend and petsc4py again.
I was then remembered of an issue that was already in another issue, but I couldn't find it:
When using the petsc backend, Newton residuals seem to be wrong in the solve
method of schemes. The following problem setup
is taken from the stokes tutorial example, but I tried to built on the saddle point preconditioners with kspoptions
. The linear
solver works as expected (e.g. I get the same results when I set up petsc4py), but I get a weird random Newton residual which keeps
the solver from converging, even though the problem is linear.
I am attaching this example file and a reference file where the same linear solver is called directly in petsc4py.
As a side note, somehow all direct solvers I tried (MUMPS, SuperLU, PETSc LU) give random results or fail, at least in my trial runs where I interfaced them through PETSc.