[petsc-dev] FieldSplit fixes in 3.3

Barry Smith bsmith at mcs.anl.gov
Wed Aug 22 08:35:04 CDT 2012


On Aug 22, 2012, at 6:40 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Wed, Aug 22, 2012 at 1:16 AM, Dmitry Karpeev <karpeev at mcs.anl.gov> wrote:
> 
> How are these superfluous? Without them -ksp_monitor formatting is wrong. The inner PC has to be indented, not just the KSP.
> 
> Come on, we just discussed this a few messages earlier in this very thread. Tons of PCs create inner KSPs, but all of them behave correctly without KSPIncrementTabLevel() because they increment the tab level *before* the inner PC is created. Two out of three places in fieldsplit.c also follow this pattern, therefore the old code was fine. As far as I can tell, there is only one place in all of PETSc that requires KSPIncrementTabLevel() and it is because MatCreateSchurComplement() cannot use a KSP that has been passed in, yet it calls KSPSetOperators() which forces creation of the inner PC. Perhaps we should get rid of KSPIncrementTabLevel() so people don't get confused and conclude that they need to use it?
> 

    Should MatCreateSchurComplement() be done properly the  PETSc way:   that is normal usage is

     MatSetType(mat,MATSCHURCOMPLEMENT);
     /* now if you want you can muck with the inner KSP */
           MatSchurComplementGetKSP(mat,&ksp);
           …….
     MatSchurComplementSetSubMats(mat,……)       note: could merge with MatSchurComplementUpdate() 
      …..

       and MatCreateSchurComplement() is just a convenience routine that calls the pieces in order and is NOT used directly by field split

    Barry

  


      
      




More information about the petsc-dev mailing list