Sorry, my mistake. I assumed that the naming would follow PETSc convention 
and there would be MatGetLocalSubMatrix_something() as there is 
MatGetLocalSubMatrix_IS() and MatGetLocalSubMatrix_Nest(). Instead 
MatGetLocalSubMatrix() is hardwired to call MatCreateLocalRef() if the 
method is not provide for the original matrix. 

  Now interestingly MatCreateLocalRef() has its own manual page which states: 
Most will use MatGetLocalSubMatrix(). I am not sure why MatCreateLocalRef() is 
a public function (that is why it would ever be called directly). Perhaps a 
note could be added to its manual page indicating why it is public. My 
inclination would be to make it private and call it 
MatGetLocalSubMatrix_Basic(). There is harm in having multiple similar public 
functions unless there is a true need for them.

  Barry

I don't remember the names of anything in PETSc, I only remember the naming 
conventions, hence when something is nonstandard I tend to get lost.


> On May 29, 2019, at 11:13 PM, Jed Brown <j...@jedbrown.org> wrote:
> 
> "Smith, Barry F. via petsc-users" <petsc-users@mcs.anl.gov> writes:
> 
>>   This is an interesting idea, but unfortunately not directly compatible 
>> with libMesh filling up the finite element part of the matrix. Plus it 
>> appears MatGetLocalSubMatrix() is only implemented for IS and Nest matrices 
>> :-(
> 
> Maybe I'm missing something, but MatGetLocalSubMatrix *is* implemented
> for arbitrary Mats; it returns a view that allows you to set entries
> using local submatrix indexing.  That was a key feature of the MatNest
> work from so many years ago and a paper on which you're coauthor.  ;-)

Reply via email to