[petsc-users] TSSetMatrices structure?

Andrew Spott andrew.spott at gmail.com
Thu Mar 29 20:58:16 CDT 2012


This: http://www.mcs.anl.gov/petsc/petsc-3.2/src/ts/examples/tutorials/ex4.c.html  Looks like what I'm interested in doing, though I would like to use the latest.  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?

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).

Thanks for the prompt reply,

-Andrew

On Mar 29, 2012, at 7:37 PM, Barry Smith wrote:

> 
>  Andrew,
> 
>    These are outdated manual pages; you'll want to avoid this. 
> 
>    Jed and Emil have done a major update of the TS interface and solvers, much more powerful and less confusing. 
> 
>     Likely you'll want to use TSSetIFunction() and TSSetIJacobian() http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/TS/index.html and work with petsc-dev http://www.mcs.anl.gov/petsc/developers/index.html
> 
> 
> 
>    Barry
> 
> On Mar 29, 2012, at 8:09 PM, Andrew Spott wrote:
> 
>> In the Petsc manual, there is a TSSetMatrices function, however there is no further documentation for it.
>> 
>> It is referenced in the manual as:
>> 
>> TSSetMatrices(TS ts,
>> Mat A,PetscErrorCode (*frhs)(TS,PetscReal,Mat*,Mat*,MatStructure*,void*), Mat B,PetscErrorCode (*flhs)(TS,PetscReal,Mat*,Mat*,MatStructure*,void*), MatStructure flag,void *ctx)
>> 
>> However, what is passed to the function pointers isn't mentioned anywhere, and it isn't in the online documentation.
>> 
>> 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).
>> 
>> How does the ctx work?  Is the same context passed to frhs each time?
>> 
>> Thanks for the help.
>> 
>> -Andrew
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120329/48b88e11/attachment.htm>


More information about the petsc-users mailing list