[petsc-users] Calling MatDestroy on MatGetDiagonalBlock

Barry Smith bsmith at mcs.anl.gov
Tue Jan 5 19:36:47 CST 2016


> On Jan 5, 2016, at 7:29 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Matthew Knepley <knepley at gmail.com> writes:
> 
>> How devastating would it be for Deal.II if we renamed them
>> MatCreateSubMatrix()? ;)
> 
> I know it's consistent with respect to reference counting semantics, but
> it might be harder for new users to find when searching the docs.  I
> have no data either way.  I recall discussing years ago that having
> paired MatGetSubMatrix/MatRestoreSubMatrix would simplify bookkeeping in
> PCFieldSplit and some common user code.

  Hmm, I don't recall this at all but it sounds like an intriguing idea.

  Barry

> 
> If the name is changed, it's easy to support the deprecated name from C.



More information about the petsc-users mailing list