[petsc-dev] Problem with SNES and FieldSplit

Jed Brown jed at 59A2.org
Tue Mar 15 18:16:44 CDT 2011


On Wed, Mar 16, 2011 at 00:09, Barry Smith <bsmith at mcs.anl.gov> wrote:

> Why not pass your Mat (maybe a global MPIAIJ) as the mat and pass your
> MatNest as your pmat and have some of the subblocks in the MatNest be
> defined by submatrices of of the MPIAIJ matrix.


That's what I had in mind.


By retaining ownership, I mean get rid of this awkward MAT_INITIAL_MATRIX
stuff, have the original matrix save the submatrix in a private table
(isrow, iscol, submat), and return a reference. Then if two users ask for
the same submatrix, it would only be extracted once and this reference would
be returned. If you need an _exclusive_ copy of a submatrix (you plan to
modify it in a way that would make shared copies incorrect), then you would
copy it [1], but I think that is much more rare.

[1] Or use a flag that says that you want an exclusive copy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110316/91db1fb3/attachment.html>


More information about the petsc-dev mailing list