adding SNESSetLinearSolve()

Lisandro Dalcin dalcinl at gmail.com
Mon Oct 29 15:18:45 CDT 2007


On 10/29/07, Barry Smith <bsmith at mcs.anl.gov> wrote:
>    This may be an error in our design, we may need a shell KSP. It would be
> nice not to need it, but ...
>    You seem to be saying you want something much like a KSP shell?

Indeed. Perhaps we need one in the end, but I would prefer to avoid that.

>   What are the operators for this KSP (the A and B?) do you set them in the
> SNESSetJacobian()? Is b1 the same size (n+1) as b? Is the Eisenstat walker
> test used on BOTH KSP::solve(b1,x1) and KSP::solve(b2,x2)?

The operators A and B are the ones computed with the function set in
SNESSetJacobian(). So both linear solves should be done with the
matrices, same preconditioner, same tolerances (perhaps determined
with EW method), etc, but different rhs's.  From those two solves, I
next determine the actual solution update for SNES, and an additional
update for an 'internal' scalar dof managed inside my aplication code.

Imagine a hypothetical formulation of a nonlinear Stokes-like problem,
were you have exactly one 'pressure' dof in all your mesh, but this
dof is coupled with all velocity variables (thus generating a dense
row and column in your Jacobian matrix). Then you can eliminate this
scalar degree of freedom, and solve your linear problem by using the
Schur complement. Then you need two linear solves for your 'momentum'
equations, using the same 'momentum' block of your jacobian matrix.


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594




More information about the petsc-dev mailing list