[petsc-dev] Preconditioning systems with a submatrix of a larger matrix
Patrick Farrell
patrick.farrell at maths.ox.ac.uk
Sat Apr 11 04:30:11 CDT 2015
On 09/04/15 15:35, Matthew Knepley wrote:
> So your code is more like Fieldsplit than the SNESMultiblock?
I guess it's similar in spirit to SNESMultiblock. I know you told me about
SNESMultiblock before, but I had forgotten about it, as I could never run
anything with it. I have only skimmed the code but it looks like the features of
both could be merged.
One point where it differs: in my implementation I support taking submatrices
with different rows and columns. For example, in PDE-constrained optimisation,
you might want to solve the (equation associated with the adjoint variable)
for the forward state; so the rows you take are the IS for the adjoint, and
the columns you take are the IS for the forward (although you have to think
hard about boundary conditions in this case).
> P^T F' P
>
> and you would do something like
>
> P^T \hat J P
Well, the inverse of a submatrix isn't the submatrix of the inverse: for
example,
F' = [I A]
[0 I]
has inverse
\hat J = [I -A]
[0 I]
but if I'm extracting the A-block from F' I need to precondition very
differently than using -A. However, when I'm deflating I know how to solve
submatrices of my deflated problem and wanted to figure out how to pass
the information about the index sets over to my deflated PC. In the end
I implemented a hackish shortcut to prove the concept and have it working
now.
> so you want to know P when calculating a MF PC. Is this right? I can see two
> related ways to do this. First, the information about P should be available
> from the solver, which you get passed in the PC construction. Second, we could
> have a mode for these projected solvers where the Jacobian PC is also
> projected.
I guess the right thing to do is to have a utility function like
SNESMultiBlockGetCurrentIS so that the PC can get the information it needs
when we get around to doing a proper C implementation.
Let's talk more about this when I'm in Chicago, I'd really like to see this
feature in PETSc master.
Patrick
More information about the petsc-dev
mailing list