[petsc-users] Curiosity about MatSetOptionsPrefix on a_11 in PCSetUp_FieldSplit

Matthew Knepley knepley at gmail.com
Thu Sep 11 11:52:05 CDT 2014


On Thu, Sep 11, 2014 at 11:47 AM, Eric Chamberland <
Eric.Chamberland at giref.ulaval.ca> wrote:

> On 09/11/2014 12:26 PM, Matthew Knepley wrote:
>
>> I am trying to understand the problem. This matrix is created by by the
>> MatGetSubMatrix() call.
>>
>
> If this is right, then I misunderstood the effect of MatGetSubMatrix on a
> MatNest.  We created a MatNest which holds the a_11 matrix...
>

MatNest is absolutely the worst thing in the PETSc interface. You should
never ever ever ever
be calling MatNest directly. You should be assembling into one matrix from
views. Then MatNest
can be used for optimization in the background.


>>    1) What options are you trying to pass to it?
>>
>
> mat_type sbaij
> mat_block_size  3 (not in this example however)
>

These are reasonable, but they really apply at creation time (since you
would not want
to convert after values have been set), and it sounds like that is what you
are doing.


>
>>    2) Why would they interfere with the KSP options?
>>
>
> I didn't mentioned that they could interfere, just that the name was
> changed and that it was "curious" from my point of view.
>

Okay, so the name change is strange, and happens because MatNest returns a
reference
to the inner matrix rather than some view which gets created and destroyed.
Let me talk
to Jed.

  Thanks,

     Matt


> But if the sub-matrix extracted from the matnest is not the a_11 matrix we
> gave to the matnest, then maybe we did something wrong?  Or you can't
> verify that the extracted matrix did exists before the extraction?
>
> Again, the options we gave are treated correctly, since we create the
> matrix and give it to the nest.  The "curious" thing is when petsc retreive
> (the same?) matrix and changes its name...
>
> Thanks again!
>
> Eric
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140911/6ac54a74/attachment.html>


More information about the petsc-users mailing list