[petsc-users] Matrix-free method in PETSc

Jed Brown jed at jedbrown.org
Sat Feb 15 22:51:40 CST 2020


Take most any example, say in src/ts/examples/tutorials/, and run with

  -ts_type beuler -snes_mf

The -snes_mf says to run the nonlinear solver (Newton by default) with
an unpreconditioned Krylov method for which the action of the Jacobian
is given by matrix-free finite differencing of the residual (which is
nonlinear when the dynamical system is).

Yuyun Yang <yyang85 at stanford.edu> writes:

> Hello team,
>
> I wanted to apply the Krylov subspace method to a matrix-free implementation of a stencil, such that the iterative method acts on the operation without ever constructing the matrix explicitly (for example, when doing backward Euler).
>
> I'm not sure whether there is already an example for that somewhere. If so, could you point me to a relevant example?
>
> Thank you!
>
> Best regards,
> Yuyun


More information about the petsc-users mailing list