Hello, I have a couple of questions regarding SNESSetFunction usage, when programming in Fortran90.
1) I have the following usage paradigm. call SNESSetFunction(snes,f_non,FormFunction,0,ierr) subroutine FormFunction(snes,x,r,dummy,ierr) In the FormFunction subroutine, the function values are stored in the vector r. I see that these values are formed correctly. But when I use FormFunction in SNESSetFunction(), the values are not getting populated into f_non and all of the values in f_non are zero. Should the name of the variable used to store the function value be same in SNESSetFunction and FormFunction? And should I be calling the SNESComputeFunction() after calling SNESSetFunction()? 2) In the subroutine FormFunction, should the vector objects created be destroyed before ending the subroutine? Please let me know if you need any further information. Thank you in advance. Best regards, Pranay. ᐧ
