[petsc-users] Queries related to snes options

Mark Adams mfadams at lbl.gov
Mon Feb 4 09:37:39 CST 2019


On Mon, Feb 4, 2019 at 6:05 AM Aman Saxena via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> I am trying to use PETSc's TS to implement implicit time-stepping, for
> 1d-Euler Equation discretized using 5th order WENO schemes. I have
> following queries related to using some of the snes options::
>
> -- What does -ts_max_snes_failure means and what does the non-linear
> solver do once it diverges to ensure convergence?
>

You want to look at the manual but I think this is the number of nonlinear
solver failures that it will try to recover from before quitting.


>
> -- If I do not specify “-snes_fd” or “-snes_mf”, does by default it uses
> the jacobian I have coded instead of building it using Finite-differences?
>

test it but if you give it a Jacobian I would hope that it uses it!

>
> -- As “-snes_fd ” replaces my routine to calculate the jacobian with
> petsc’s fd routine, does it stores the jacobian in the same Matrix that I
> pass to my hand-coded routine. It might lead to some inconsistency as my
> actual scheme involves stencils width equals 3 while I am approximating the
> Jacobian using first order scheme which requires stencils width equals 1.
> So I have used another “dmda” with sw = 1, to initialize the matrix using
> “DMCreateMatrix()” while fd needs sw = 3.
>

This should be OK. Try it.


>
> -- I am not able to use “-snes_type test” it gives me the following error
> “[0]PETSC ERROR: Unknown type. Check for miss-spelling or missing package:
> http://www.mcs.anl.gov/petsc/documentation/installation.html#external
>  [0]PETSC ERROR: Unable to find requested SNES type test”
>
>
This has changed. Use -snes_test_jacobian


> -- What exactly "PCMAT" do? Do I have to supply matrix other than in
> RHSJacobian for PCMAT?
>

I'm not sure where you picked this up you don't need to worry about it:

https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCMAT.html


>
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190204/42d2e37e/attachment.html>


More information about the petsc-users mailing list