Good afternoon Dr. Smith, Thank you for your quick response. I would like to know more details for "a matrix-free solver for the Jacobian system or have PETSc build the Jacobian for you with finite differencing and coloring."
Do you happen to have any examples for this? Maybe I can run a demo and test the performance of my problem. Best, Jing ________________________________ From: Barry Smith <[email protected]> Sent: Thursday, January 20, 2022 2:21 PM To: Xiong, Jing <[email protected]> Cc: [email protected] <[email protected]>; Zhao, Dongbo <[email protected]>; Hong, Tianqi <[email protected]> Subject: Re: [petsc-users] Asking examples about solving DAE in python Hong Zhang can give you more correct details but I can get you started. Yes, you can use Petsc4py for this purpose. If you cannot provide a Jacobian then you should be able to use either a matrix-free solver for the Jacobian system or have PETSc build the Jacobian for you with finite differencing and coloring. Or if the problem is small just have PETSc brute force the Jacobian with finite differencing. On Jan 20, 2022, at 5:13 PM, Xiong, Jing via petsc-users <[email protected]<mailto:[email protected]>> wrote: Hi, I hope you are well. I'm very interested in PETSc and want to explore the possibility of whether it could solve Differential-algebraic equations (DAE) in python. I know there are great examples in C, but I'm struggling to connect the examples in python. The only example I got right now is for solving ODEs in the paper: PETSc/TS: A Modern Scalable ODE/DAE Solver Library. And I got the following questions: 1. Is petsc4py the right package to use? 2. Could you give an example for solving DAEs in python? 3. Is Jacobian must be specified? If not, could your show an example for solving DAEs without specified Jacobian in python? Thank you for your help. Best, Jing
