[petsc-users] Problems about SNES

Matthew Knepley knepley at gmail.com
Tue Mar 12 08:20:12 CDT 2019


On Wed, Jan 16, 2019 at 10:59 PM Yingjie Wu via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Dear PETSc developers:
> Hi,
> During the process of testing the program, I found some questions about
> SNES. These are some basic questions that I have overlooked. Please help me
> to answer them.
> 1. Because my program uses - snes_mf_operator, there is no Jacobian
> matrix. Linear and non-linear step residuals are different in petsc. The
> linear step residuals are r_linear = J*δx-f(x). Since I don't have a
> Jacobian matrix, I don't know how to calculate the relative residuals of
> linear steps provided in petsc. Do we use the finite difference
> approximation matrix vector product when calculating the residuals?
>

PETSc is using a FD approximation to the Jacobian.


> 2. Read the user's manual for a brief introduction to the inexact Newton
> method, but I am very interested in the use of this method. I want to know
> how to use this method in petsc.
>

Inexact Newton is any method that does not solve the Newton system exactly,
so essentially any iterative solver. Do you mean quasi-Newton, which is
-snes_type qn


> 3. The default line search used by SNES in PETSc is bt, which often fails
> in program debugging. I don't know much about linesearch, and I'm curious
> to know why it failed. How can I supplement this knowledge?
>

Usually bt only fails if your search direction is not actually correct. Are
you sure your Jacobian is right?

  Thanks,

    Matt


> Thanks,
> Yingjie
>


-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190312/433e9393/attachment.html>


More information about the petsc-users mailing list