[petsc-users] Problem about Residual evaluation

Matthew Knepley knepley at gmail.com
Mon Apr 1 11:22:40 CDT 2019


On Mon, Apr 1, 2019 at 10:22 AM Yingjie Wu via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Dear PETSc developers:
> Hi,
>
> I've been using -snes_mf_operator and I've customized a precondition
> matrix to solve my problem.I have two questions about the residuals of
> linear steps(KSP residual).
>
>
> 1.Since I'm using a matrix-free method, how do we get KSP residuals in
> PETSc?
>
> r_m = b - A*x_m
>
> Is finite difference used to approximate "A*x_m" ?
>

Yes.


> 2.What is the difference between instruction ' -ksp_monitor ' and '
> -ksp_monitor_true_residual ' in how they are calculated?
>

The true residual is the unpreconditioned residual.

  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/20190401/31a9b5fa/attachment.html>


More information about the petsc-users mailing list