On Thu, Mar 29, 2012 at 9:09 PM, Andrew Spott <span dir="ltr"><<a href="mailto:andrew.spott@gmail.com">andrew.spott@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks again for the quick reply! Thankfully I don't have a mass matrix, I'm just solving the schrodinger equation.<br></blockquote><div><br></div><div>Depending on how you discretize, you can have a mass matrix for Schrodinger.</div>
<div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks again.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Andrew<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mar 29, 2012, at 8:07 PM, Barry Smith wrote:<br>
<br>
><br>
> On Mar 29, 2012, at 8:58 PM, Andrew Spott wrote:<br>
><br>
>> This: <a href="http://www.mcs.anl.gov/petsc/petsc-3.2/src/ts/examples/tutorials/ex4.c.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-3.2/src/ts/examples/tutorials/ex4.c.html</a> Looks like what I'm interested in doing, though I would like to use the latest.<br>
><br>
> With this simple a situation using the current version or switching to dev is both fine. The changes you would have to make are small<br>
><br>
>> When is Petsc 3.3 (or 3.4, I'm not sure how your versioning works) coming out? Is the dev version stable enough (in API and in execution) to be used?<br>
><br>
> The dev version is always stable enough to use :-). At this point yes because we are in the testing phase for the next release.<br>
><br>
>><br>
>> Until then, does the 3.2 version of the TS interface work? (the link above, and the corresponding one for petsc-dev don't appear to have much changed between them).<br>
><br>
> Yes.<br>
><br>
> Barry<br>
><br>
> Note that in 3.2 if you have a mass matrix (for example M U_t = A U_xx)how to formulate the problem is different between 3.2 and dev so I would recommend working immediately with dev. But for simple U_t = something, 3.2 is fine and then you can change it slightly for the next release.<br>
><br>
>><br>
>> Thanks for the prompt reply,<br>
>><br>
>> -Andrew<br>
>><br>
>> On Mar 29, 2012, at 7:37 PM, Barry Smith wrote:<br>
>><br>
>>><br>
>>> Andrew,<br>
>>><br>
>>> These are outdated manual pages; you'll want to avoid this.<br>
>>><br>
>>> Jed and Emil have done a major update of the TS interface and solvers, much more powerful and less confusing.<br>
>>><br>
>>> Likely you'll want to use TSSetIFunction() and TSSetIJacobian() <a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/TS/index.html" target="_blank">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" target="_blank">http://www.mcs.anl.gov/petsc/developers/index.html</a><br>
>>><br>
>>><br>
>>><br>
>>> Barry<br>
>>><br>
>>> On Mar 29, 2012, at 8:09 PM, Andrew Spott wrote:<br>
>>><br>
>>>> In the Petsc manual, there is a TSSetMatrices function, however there is no further documentation for it.<br>
>>>><br>
>>>> It is referenced in the manual as:<br>
>>>><br>
>>>> TSSetMatrices(TS ts,<br>
>>>> 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>
>>>><br>
>>>> However, what is passed to the function pointers isn't mentioned anywhere, and it isn't in the online documentation.<br>
>>>><br>
>>>> 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? (B can be considered to not exist, or to exist as an identity matrix, hence the confusion).<br>
>>>><br>
>>>> How does the ctx work? Is the same context passed to frhs each time?<br>
>>>><br>
>>>> Thanks for the help.<br>
>>>><br>
>>>> -Andrew<br>
>>><br>
>><br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>