[petsc-users] SNESSetUpdate function

Bernardo Rocha bernardomartinsrocha at gmail.com
Fri Jan 20 08:28:59 CST 2012


Hi everyone,

I'm using SNES but I would like to update my data after each successful
step computation within the nonlinear solver using a different function. I
mean, after the solution of each linear system I would like to get \Delta
x_k to update x_{k+1} which is stored somewhere in my application class
(C++ code). Looking at the documentation I found this function:

PetscErrorCode SNESSetUpdate(SNES snes, PetscErrorCode (*func)(SNES,
PetscInt))

but func does not take an application context "object" like void *ctx, that
I could use to get my data and finally update it. Is there another function
that would allow me to do this?

Thanks in advance,
Best regards,
Bernardo M. Rocha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120120/2bb04ffa/attachment-0001.htm>


More information about the petsc-users mailing list