[petsc-users] TSSetMatrices structure?

Barry Smith bsmith at mcs.anl.gov
Thu Mar 29 20:37:51 CDT 2012


  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



More information about the petsc-users mailing list