[petsc-users] conditioning of snes with dmcomposite & grid sequencing

Matthew Knepley knepley at gmail.com
Sat Sep 12 06:14:47 CDT 2015


On Fri, Sep 11, 2015 at 4:30 PM, Gideon Simpson <gideon.simpson at gmail.com>
wrote:

> Are there any built in routines for freezing variables in SNES, or will
> that need to be handled by hand.
>

We used to have this for KSP, but it looks like someone removed it. The
only thing left is KSPMonitorRange().
What we did is find the few largest residual elements, take a small halo
around them, project the problem to this
small space using MatGetSubMatrix() and VecScatter, solve, and VecScatter
back.

We do not have this for nonlinear stuff (like many other things) because
there is no explicit matrix to manipulate,
and language support for computing only parts of the nonlinear function is
really weak. What we really want
is something like what Victor Eijkout was proposing a few years ago, namely
automatic discovery of index sets
for communication, in this case with main memory. We would need the
residual code, given an output set, to tell
us what input set is needed. Then we make a Scatter, select part of the DM,
and we could compute. Now it has
to be done by hand.

  Thanks,

     Matt


> Also, I remain curious about the starting guess that the grid sequence
> uses during each refinement.  Is there a way to dump those to disk for
> inspection?
>
> -gideon
>
> On Sep 11, 2015, at 4:05 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
> On Fri, Sep 11, 2015 at 1:05 PM, Gideon Simpson <gideon.simpson at gmail.com>
>  wrote:
>
>> Since the problem has not only the two components in the DM, but the
>> second component has 4 degrees of freedom per mesh point, I thought it best
>> to do the post processing separately.  See attached
>>
>
> So the whole thing is being controlled by 1 variable.
>
> We should try freezing everything else, and just solving that scalar
> equation I guess.
>
>    Matt
>
>
>> -gideon
>> <Screen Shot 2015-09-11 at 2.04.25 PM.png>
>>
>> On Sep 11, 2015, at 10:16 AM, Matthew Knepley <knepley at gmail.com> wrote:
>>
>> On Fri, Sep 11, 2015 at 9:08 AM, Gideon Simpson <gideon.simpson at gmail.com
>> > wrote:
>>
>>> Following up on the previous thread, for my dm composite problem, I find
>>> that at the end of the first grid sequence,where it fails to converge, the
>>> distribution of the norms between the two pieces are:
>>>
>>>  39 SNES Function norm 2.253098577796e+02
>>>  40 SNES Function norm 2.253098577331e+02
>>>  41 SNES Function norm 2.253098577228e+02
>>>  42 SNES Function norm 2.253098577212e+02
>>>  43 SNES Function norm 2.253098577174e+02
>>>  44 SNES Function norm 2.253098577166e+02
>>>  45 SNES Function norm 2.253098577158e+02
>>>  46 SNES Function norm 2.253098577157e+02
>>>  47 SNES Function norm 2.253098577156e+02
>>>  48 SNES Function norm 2.253098577156e+02
>>> Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations
>>> 48
>>>  ||r|| = 225.31, 7999 entries
>>>  ||rp|| = 140.021, 3 entries
>>>  ||rQ|| = 176.518, 7996 entries
>>>
>>> Since I think we were convinced that this was intrinsic to the problem,
>>> and not a function of the Jacobian function, I am using my Jacobian.
>>>
>>
>> Okay, I see no pattern in the fields. Lets plot these 2 vectors,
>> -vec_view draw, and screenshot.
>>
>>   Matt
>>
>>
>>> -gideon
>>>
>>
>>
>>
>> --
>> 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
>>
>>
>>
>
>
> --
> 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
>
>
>


-- 
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/20150912/26b52740/attachment.html>


More information about the petsc-users mailing list