<div dir="ltr">Hello,<br>I have a couple of questions regarding SNESSetFunction usage, when programming in Fortran90.<br><br>1) I have the following usage paradigm.<br> call SNESSetFunction(snes,f_non,FormFunction,0,ierr)<br> subroutine FormFunction(snes,x,r,dummy,ierr)<br>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. <br>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()?<br><br>2) In the subroutine FormFunction, should the vector objects created be destroyed before ending the subroutine?<br><br>Please let me know if you need any further information. Thank you in advance.<br>Best regards,<br>Pranay.<br><br></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=acHJhbmF5cmVkZHk4NjVAZ21haWwuY29t&type=zerocontent&guid=72a73203-6731-4e13-aa3e-75b68ac30ecf"><font color="#ffffff" size="1">ᐧ</font></div>