# SNESASPIN#

Helper `SNES`

type for Additive-Schwarz Preconditioned Inexact Newton [CK02], [BKST15]

## Options Database Keys#

options prefix of the nonlinear subdomain solver (must be of type**-npc_snes_ -**`NASM`

)options prefix of the subdomain nonlinear solves**-npc_sub_snes_ -**options prefix of the subdomain Krylov solver**-npc_sub_ksp_ -**options prefix of the subdomain preconditioner**-npc_sub_pc_ -**

## Notes#

This solver transform the given nonlinear problem to a new form and then runs matrix-free Newton-Krylov with no preconditioner on that transformed problem.

This routine sets up an instance of `SNESNETWONLS`

with nonlinear left preconditioning. It differs from other
similar functionality in `SNES`

as it creates a linear shell matrix that corresponds to the product

which is the ASPIN preconditioned matrix. Similar solvers may be constructed by having matrix-free differencing of nonlinear solves per linear iteration, but this is far more efficient when subdomain sparse-direct preconditioner factorizations are reused on each application of \(J_b^{-1}\).

The Krylov method used in this nonlinear solver is run with NO preconditioner, because the preconditioning is done
at the nonlinear level, but the Jacobian for the original function must be provided (or calculated via coloring and
finite differences automatically) in the Pmat location of `SNESSetJacobian()`

because the action of the original Jacobian
is needed by the shell matrix used to apply the Jacobian of the nonlinear preconditioned problem (see above).
Note that since the Pmat is not used to construct a preconditioner it could be provided in a matrix-free form.
The code for this implementation is a bit confusing because the Amat of `SNESSetJacobian()`

applies the Jacobian of the
nonlinearly preconditioned function Jacobian while the Pmat provides the Jacobian of the original user provided function.
Note that the original `SNES`

and nonlinear preconditioner (see `SNESGetNPC()`

), in this case `SNESNASM`

, share
the same Jacobian matrices. `SNESNASM`

computes the needed Jacobian in `SNESNASMComputeFinalJacobian_Private()`

.

## References#

Peter R. Brune, Matthew G. Knepley, Barry F. Smith, and Xuemin Tu. Composing scalable nonlinear algebraic solvers. *SIAM Review*, 57(4):535–565, 2015. http://www.mcs.anl.gov/papers/P2010-0112.pdf. URL: http://www.mcs.anl.gov/papers/P2010-0112.pdf, doi:10.1137/130936725.

X.-C. Cai and D. E. Keyes. Nonlinearly preconditioned inexact Newton algorithms. *SIAM J. Sci. Comput.*, 24:183–200, 2002. URL: http://www.cs.colorado.edu/homes/cai/public_html/papers/aspin.ps.

## See Also#

SNES: Nonlinear Solvers, `SNESCreate()`

, `SNES`

, `SNESSetType()`

, `SNESNEWTONLS`

, `SNESNASM`

, `SNESGetNPC()`

, `SNESGetNPCSide()`

## Level#

intermediate

## Location#

Index of all SNES routines

Table of Contents for all manual pages

Index of all manual pages