[petsc-dev] Question on extracting submatrixes from global projection when using FS + external DMShell + MG

Matthew Knepley knepley at gmail.com
Wed Oct 10 19:20:58 CDT 2018


On Wed, Oct 10, 2018 at 12:23 PM Boris Boutkov <borisbou at buffalo.edu> wrote:

> Hello again all,
>
> I've been trying to get GMG+FS to work with an external DMShell provided
> by libMesh, see for reference
> https://www.mail-archive.com/petsc-dev@mcs.anl.gov/msg23497.html .
>
> The situation is that while I've managed to successfully attach some extra
> hooks to CreateSubDM_Shell to set appropriate interpolation, restriction,
> and a few other operators that I call,  I now encounter matrix
> multiplication size mismatches when computing the Galerkin triple product
> to produce the coarser operators during the MG setup. As it stands, libMesh
> is computing a global projection matrix and I was hoping to be able to
> extract sub matrices out of it corresponding to the various fields but am
> not sure about the right way to go about this.
>
> Since we are using DMShell and provide Section information I was hoping to
> use something along the lines of MatCreateSubmatrix and extract from the
> global projection Mat, only projections corresponding to the fields in
> question. Doing this seems to entail the need to provide the row and column
> ISs.
>

Yes, that is right. You just need the ISes.


> While I can extract Index Set lists from the incoming DMs during
> DMCreateInterpolation via DMCreateFieldIS, I'm not sure what the right way
> to extract the row and column information from these IS would be. Is there
> a natural way to achieve such a thing from PETSc's side or am I going about
> this in the completely wrong way and need to construct field based
> projections from my end?
>

I am not sure what is being asked. Your hooks are transfered during
DMCreateSubDM(). It creates the IS for the subfield, so at that point you
know it. Either store that or use it right there to extract your
interpolation.

  Thanks,

     Matt


> Thanks as always for any information you can provide,
> - Boris
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20181010/55d2d347/attachment.html>


More information about the petsc-dev mailing list