[petsc-dev] LSC question

Barry Smith bsmith at mcs.anl.gov
Fri Mar 9 11:05:31 CST 2012


On Mar 9, 2012, at 11:28 AM, Jed Brown wrote:

> On Fri, Mar 9, 2012 at 10:24, Barry Smith <bsmith at mcs.anl.gov> wrote:
>    Please modify MatGetSchurComplement() to forward the L and Lp. I think is should be automatic.
> 
> How should we attach L and Lp to the matrix? Note that there could be many Lp matrices that we would like to attach because there are many pairs of index sets that we could use when defining the Schur complement. Even for 2x2 systems like mixed elasticity, how do I distinguish between the Lp that arises when I eliminate displacements versus when I eliminate pressure?

  Jed,

    Here is the problem. We cannot use LSC with user provided L (and Lp) and PCFIELDSPLIT  now AT ALL!! That sucks, maybe we shouldn't be looking for a perfect solution but for now just one that works somewhat!


    I will suggest the following approach. Attach various L to the original Jacobian with a different name for each. In your case L_displacement  and L_pressure, have PCFIELDSPLIT propagate them to the Schur matrix.  Then have  -prefixfromfieldsplit_pc_type lsc -prefixfromfieldplit_lsc_name L_displacement to tell LSC which one to use.

   Barry

Not perfect since the user could name the wrong lsc for the Schur index sets used but it is better than nothing.
    
>  
> 
> > This is better because there are multiple ways to take a Schur complement, thus "L" cannot be defined without knowing the index sets.
> >
> > Additionally, the original matrix does not currently retain ownership, so the user can't actually attach anything to the Schur complement without implementing MatGetSchurComplement() themselves.
> >
> > Worse yet, MatGetSchurComplement() is probably going to call MatGetSubMatrix() with exactly the same arguments as the outer PCFieldSplit, because both of them will need the submatrices.
> 
>  Yes, this is why we cannot use MatGetSchurComplement() inside the PCFIELDSPLIT
> 
>   So we are stuck with having PCFIELDSPLIT forward the and L and Lp from the outer matrix. Will you add this?
> 




More information about the petsc-dev mailing list