Andrew :<div>We have TS examples under</div><div>~/src/ts/examples/tutorials/</div><div>/src/ts/examples/tests</div><div><br></div><div>Hong<br><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I want to solve a very simple equation:<br>
<br>
u_t = F(t) u<br>
<br>
Where F(t) = H_0 + a(t) H' (H_0 and H' are constant matrices, and a(t) is a time dependent scalar).<br>
<br>
But I'm not sure how to go about doing this using the TS context.<br>
<br>
I don't have a Jacobian that I need to be worried about, so should I be doing:<br>
<br>
TSSetRHSFunction(ts,PETSC_NULL,myRHSFunction,&appctx);<br>
TSSetRHSJacobian(ts,A,A,TSComputeRHSJacobianConstant,&appctx);<br>
<br>
Where:<br>
myRHSFunction(TS ts,PetscReal t,Vec u,Vec F,void *ctx)<br>
{<br>
//Create temporary matrix A = H_0 + a(t) H'<br>
//then do F = A u<br>
}<br>
<br>
Or should I be doing something else?<br>
<br>
Thanks for the help, unfortunately, it looks like the documentation on TS in the manual isn't accurate.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Andrew</font></span></blockquote></div><br></div></div>