[petsc-users] User-defined updating function in SNES
YuSh Lo
ysjosh.lo at gmail.com
Thu Jul 6 14:41:04 CDT 2023
Hi,
I am using SNES to solve some nonlinear functions.
After each iteration, I have an user-defined updating to do.
Some values in the solution vectors must be inserted to some different
location.
I have tried to do it in the beginning of form RHS and form Jacobian, but
the vector is read-only. The results are correct although some warnings are
thrown with debug build saying that the vector is in wrong state. I also
tried setting a function with SNESSetupdate, but the convergence is bad.
Is the vector I get using SNESGetSolution the same as the vector that will
be used in following forming Jacobian and RHS?, and is it again read only?
Thanks,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230706/35c49043/attachment-0001.html>
More information about the petsc-users
mailing list