firedrake-adjoint does not respect nest= flag

Issue #43 new
Former user created an issue

When in the forward model a system is assembled with a nest=False/True argument to assemble() - this setting is not replicated in the associated assembly of the adjoint system. This flag which determines whether or not a PETSc MatNest matrix type is used, needs to be set correctly to work in combination with certain solver settings: - nest=True does not work with direct solvers - nest=True is required for fieldsplit

A workaround is to use the global parameters['matnest']=True/False, but this is only a solution if all systems require the same setting, which is not generally the case.

Comments (2)

  1. Stephan Kramer

    Oh sorry, I see that I wasn't logged in. For context: this is in Thetis with firedrake-adjoint.

  2. Lawrence Mitchell

    FWIW, you don't need nest=True for fieldsplit. The problem is in compatibility.py _extract_args drops a lot of stuff on the floor in the firedrake case. In solving.py at around line 85 you can see how these are used. I don't see how the solver_parameters make it through into the callback to the firedrake solve. But the problem is that additionally the nest kwarg is not a "solver parameter" so I don't know how to send the appropriate information through.

  3. Log in to comment