On Mar 8, 2012, at 4:31 PM, Jed Brown wrote:

> On Thu, Mar 8, 2012 at 15:23, Barry Smith <bsmith at mcs.anl.gov> wrote:
>     ierr = PCLSCAllocate_Private(pc);CHKERRQ(ierr);
>  ierr = 
> PetscObjectQuery((PetscObject)pc->pmat,"LSC_L",(PetscObject*)&L);CHKERRQ(ierr);
>  ierr = 
> PetscObjectQuery((PetscObject)pc->pmat,"LSC_Lp",(PetscObject*)&Lp);CHKERRQ(ierr);
> 
> 
> It uses pc->pmat in both places. Is this really what you want? Wouldn't you 
> sometimes want mat?
> 
> This is just attached data for an auxiliary operator that should have some 
> properties that relate somehow to the original operator. The whole interface 
> is dirty, but I don't know a better approach (although this one could have a 
> proper API). You could put these auxiliary operators anywhere, but I think 
> attaching both to the preconditioning operator is natural. I don't mind if 
> you want it to look other places for these things.

  But the LSC_L reflects properties of the true operator while LSC_Lp reflects 
properties of the matrix from which you build the preconditioner. Hence LSC_L 
should be attached to pc->mat  

  So why not check in pc->mat first and if not there check in pc->pmat

   Barry



Reply via email to