I noticed your developer note. The function name was preserved from what Barry originally wrote when I added alternatives a couple years ago and it should certainly be changed to include "Set". But I don't know a good name that isn't a whole sentence.<div>
<br></div><div>I think the root of the problem is that we don't have a systematic way for PCFieldSplit to decide where to look to find the preconditioning matrix. It's pretty dirty (and semantically incorrect) to put it into the diagonal block of the preconditioning matrix. I really don't like the user providing it through this function because that matrix is something that can change in a nonlinear or transient solve, and the user should not have to touch the PC in that context (because it's very ugly for nested solvers, they should only mess with the PC during configuration).</div>
<div><br></div><div><br></div><div>So what about a different API along the lines of</div><div><br></div><div>MatSetApproximateSchurComplement(Mat A,IS row0,IS col0,IS row1,IS col1,Mat S);</div><div><br></div><div>The user would typically call this function on the preconditioning matrix and PCFieldSplit would look there first.</div>
<div><br></div><div>The implementation of this function could (at least for now) PetscObjectCompose() the matrix S and then MatGetSchurComplement() would return it for the preconditioning matrix.</div><div><br></div><div>
Is this nuts?</div>