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