adding SNESSetLinearSolve()

Barry Smith bsmith at mcs.anl.gov
Mon Oct 29 12:17:06 CDT 2007


  SNESGetKSP(
  KSPSetType(ksp,KSPPREONLY)
  KSPGetPC(
  PCSetType(pc,PCSHELL);
  PCShellSetApply(pc,YourSolver);


On Mon, 29 Oct 2007, Lisandro Dalcin wrote:

> Some time ago I made a request for adding SNESSetLinearSolve(), in
> order to let users set a custom linear solve routine to SNES. I was
> not clear to me if this idea was finally accepted, so I want to ask
> again.
> 
> I really needs this feature in the near future, I I would like this to
> go in the next petsc release. My use case is rather simple: I'm
> helping a coworker to use SNES for solving a nonlinear optimization
> problem related to mesh movement (that is, move nodes retaining
> element connectivities). This problem uses a regularized functional,
> wich introduces a global degree of freedom coupled with all others
> dofs. To avoid assembling a sparse parallel AIJ matrix with a dense
> column and row, we endup needing to solve two linear systems with the
> same matrix for actually solving the Hessian of the regularized
> functional.
> 
> 
> 
> 




More information about the petsc-dev mailing list