Sean,
> I am interested in solving a nonlinear problem with Newton's method. I would
> describe it as a heat equation with a nonlinear diffusion coefficient, thus
> building on step-15, 25 and 26.
> I've found step-15, step-25 and step-57 very helpful for understanding how to
> set up the linear system for the residual and solve it at each step of the
> nonlinear iteration.
>
> 1) Is that the best approach to take in dealii, i.e. compute the residual
> manually and manually do the nonlinear iteration until convergence is satisfied?
If you have a relatively simple nonlinearity, and if you know that you don't
need things such as line search, then yes that is the way many of us do things.
> In step-25, the scalar time-dependent system admits a straightforward
> expression for F'(u, delta_u) from F(u).
> In step-33, an automatic differentiation package, trilinos::sacado, is used to
> facilitate the computation of the vector-valued conservation law's "terrible
> beast" of a Jacobian.
> For computing the residual, automatic differentiation seems like it can help
> in certain situations.
Yes. If the nonlinearity is awkward, then it's the more reliable way to
compute its derivatives.
> 2) Are there other options to help "automate" the nonlinear treatment? For
> example, does anyone have any experience with the petsc nonlinear solvers (snes)?
> For example, might it allow to easily switch between a Picard (fixed-point)
> loop, if the Newton loop does not converge?
>
> I note that in the PETScWrappers namespace there are no entries related to the
> snes package. Why/why not?
I don't think there is a particular reason. Like most open source projects,
people implement things to "scratch an itch". Nobody so far felt the need to
use SNES (or the Trilinos equivalent 'nox'), or had the need badly enough to
write a comprehensive interface. That doesn't mean that that would be a bad
idea -- in fact, I think that using SNES or nox is a much better idea than
doing things yourself.
That said, you can always extract the PETSc objects from the PETScWrappers
objects, and pass that to SNES. The same is possible for Trilinos. So you can
always use these two packages already, without the need for any wrappers in
deal.II.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/