[petsc-dev] Why separate PCASMGetSubKSP/PCGASMGetSubKSP/PCBJacobiGetSubKSP?

Barry Smith bsmith at mcs.anl.gov
Wed Sep 20 18:15:18 CDT 2017


  I think it is mostly historical reasons, we never refactored to have a common API and use the PetscUseMethod() to implement. I'd be happy to consider a refactorization in a pull request.


> On Sep 20, 2017, at 6:08 PM, Richard Tran Mills <rtmills at anl.gov> wrote:
> 
> Folks,
> 
> I see that we have separate interface routines PCASMGetSubKSP(), PCGASMGetSubKSP(), and PCBJacobiGetSubKSP(), all of which have an identical interface and do the same thing. It seems like there ought to instead be just one routine called something like PCGetSubKSP(). Is there a good reason that we don't have this? Perhaps because there is also PCFieldSplitGetSubKSP(), which has a different interface? We'd need a name other than PCGetSubKSP() to prevent confusion between these. I suppose the ASM/GASM/BJacobi routines really all do the same thing, but we break our naming conventions if we have to have a get sub-KSP routine that works for these there things, and then one that works for FieldSplit.
> 
> OK, I think maybe I just answered my question, but I'd like to know if Barry or others have thoughts on this.
> 
> --Richard



More information about the petsc-dev mailing list