[petsc-users] how to set the newton trust region size

Matthew Knepley knepley at gmail.com
Sat May 16 11:25:58 CDT 2015


On Sat, May 16, 2015 at 11:15 AM, Mark Lohry <mlohry at princeton.edu> wrote:

> On 5/16/2015 10:33 AM, Matthew Knepley wrote:
>
>>
>> 1) The best thing you can do for solver convergence is to start with a
>> well-scaled system. Is there a reason why
>> you cannot non-dimensionalize your system?
>>
>>
> Laziness/time, but yes I'll do this. Though this is a viscous flow solver,
> so any non-dimensionalization will still lead to values differing by 5+
> orders of magnitude in certain areas.
>
>
>
>> 3) If you have constraints on the variables, you might benefit from using
>> SNESVI
>>
>>
>>
>
> Perfect, thanks I wasn't aware of this. So SNESVIComputeVariableBounds can
> take a function that say, prevents negative densities/pressures?
>

It only really handles primary variable bounds, but if you are solving for
densities and pressures, yes.


>  2) Writing a custom line search is easier than messing with TR in my
>> experience
>>
>>
> I'm interested to hear more about this. I haven't done much work with
> newton methods on this type of problem where overshoots lead to fatal
> errors.
>

You can imagine the very simplest thing you could do for SNESVI is take
each step produced by Newton
and scale it back until it lies in your "physical" region. This however can
degrade the second order
convergence of the method. SNESVI tries to be smarter about things to
maintain the convergence rate.

  Thanks,

    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-users/attachments/20150516/b6c09bfc/attachment.html>


More information about the petsc-users mailing list