<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>This:&nbsp;<a href="http://www.mcs.anl.gov/petsc/petsc-3.2/src/ts/examples/tutorials/ex4.c.html">http://www.mcs.anl.gov/petsc/petsc-3.2/src/ts/examples/tutorials/ex4.c.html</a>&nbsp;&nbsp;Looks like what I'm interested in doing, though I would like to use the latest. &nbsp;When is Petsc 3.3 (or 3.4, I'm not sure how your versioning works) coming out? &nbsp;Is the dev version stable enough (in API and in execution) to be used?</div><div><br></div><div>Until then, does the 3.2 version of the TS interface work? &nbsp;(the link above, and the corresponding one for petsc-dev don't appear to have much changed between them).</div><div><br></div><div>Thanks for the prompt reply,</div><div><br></div><div>-Andrew</div><div><br></div><div><div>On Mar 29, 2012, at 7:37 PM, Barry Smith wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br> &nbsp;Andrew,<br><br> &nbsp;&nbsp;&nbsp;These are outdated manual pages; you'll want to avoid this. <br><br> &nbsp;&nbsp;&nbsp;Jed and Emil have done a major update of the TS interface and solvers, much more powerful and less confusing. <br><br> &nbsp;&nbsp;&nbsp;&nbsp;Likely you'll want to use TSSetIFunction() and TSSetIJacobian() <a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/TS/index.html">http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/TS/index.html</a> and work with petsc-dev <a href="http://www.mcs.anl.gov/petsc/developers/index.html">http://www.mcs.anl.gov/petsc/developers/index.html</a><br><br><br><br> &nbsp;&nbsp;&nbsp;Barry<br><br>On Mar 29, 2012, at 8:09 PM, Andrew Spott wrote:<br><br><blockquote type="cite">In the Petsc manual, there is a TSSetMatrices function, however there is no further documentation for it.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It is referenced in the manual as:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">TSSetMatrices(TS ts,<br></blockquote><blockquote type="cite">Mat A,PetscErrorCode (*frhs)(TS,PetscReal,Mat*,Mat*,MatStructure*,void*), Mat B,PetscErrorCode (*flhs)(TS,PetscReal,Mat*,Mat*,MatStructure*,void*), MatStructure flag,void *ctx)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, what is passed to the function pointers isn't mentioned anywhere, and it isn't in the online documentation.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Also, I assume that "MatStructure flag" tells if the structure of A and B are the same or different, if B is PETSC_NULL, is flag "SAME_NONZERO_PATERN" or is it different? &nbsp;(B can be considered to not exist, or to exist as an identity matrix, hence the confusion).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">How does the ctx work? &nbsp;Is the same context passed to frhs each time?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks for the help.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-Andrew<br></blockquote><br></div></blockquote></div><br></body></html>