[petsc-dev] Problem with SNES and FieldSplit

Matthew Knepley knepley at gmail.com
Tue Mar 15 16:07:48 CDT 2011


On Tue, Mar 15, 2011 at 3:57 PM, Jed Brown <jed at 59a2.org> wrote:

> On Tue, Mar 15, 2011 at 21:51, Matthew Knepley <knepley at gmail.com> wrote:
>
>> Really? That seems perverse. I have to build some global PC matrix, with
>> pieces I do not even have. How is that going to happen? Is
>> this really how we want to handle it?
>>
>
> The alternatives don't compose properly, we'd need a whole new interface
> for disassembling solvers. Currently MatGetSubMatrix() is our way of taking
> things apart. If each "physics" is maintained separately, then you can use
> MatGetLocalSubMatrix(), see snes ex28.c, to decompose the global problem so
> that each physics module is stand-alone and has no global knowledge. It will
> also remain modular if you do splits inside of multigrid or multigrid inside
> of splits.
>

I guess I have no problem with MatGetSubMatrix() being the interface for
this, since all solvers get the Mat object. However, my point was
really that the interface for creating such things is horrible. There is no
easy way for me to do what I want, and the hard way is too hard for
me (a developer) without looking at a lot of code, trying things and seeing
where they break, and probably some crying. This will have to
change or no one will use this.


> Also, I really need this to work now.
>>
>
> It should work now.
>
> So baring some other idea, I am going to put something in
>> PETSc that lets me set this operator during the SNES loop.
>>
>
> On the first SNES iteration, the KSP has not been set up yet.
>

I set it up.

  Matt

-- 
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-dev/attachments/20110315/8dc1a1d9/attachment.html>


More information about the petsc-dev mailing list