[petsc-users] Parallel ODE solver

Barry Smith bsmith at mcs.anl.gov
Tue Oct 20 22:32:43 CDT 2015


  If you know (or mostly know) the nonzero structure of the Jacobian (and hopefully it is very sparse) then PETSc can automatically and pretty efficiently compute the Jacobian for you.

  See   http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/MatFD/MatFDColoringCreate.html  and the example http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex14.c.html

   If you do not know the nonzero structure of the Jacobian you'll need to tell us a bit more about your problem and we may have some ideas

   Barry



> On Oct 20, 2015, at 10:06 PM, Sahai, Amal <sahai2 at illinois.edu> wrote:
> 
> I was able to get a simple time dependent ODE running in parallel using the time-stepper in Petsc. I had a follow up question regarding this: For my original problem I can provide the RHS function but have no way of computing the Jacobian analytically and then storing it using DMTSSetIJacobianLocal. How can I compute the Jacobian numerically by just supplying the RHS function to Petsc without having to manually perturb and generate individual elements in the Jacobian myself?
> 
> Thanks!
> 
> Regards
> Amal
> ________________________________________
> From: Patrick Sanan [patrick.sanan at gmail.com]
> Sent: Tuesday, October 20, 2015 4:34 AM
> To: Julian Andrej
> Cc: Sahai, Amal; petsc-users at mcs.anl.gov
> Subject: Re: [petsc-users] Parallel ODE solver
> 
> Further note that you can use sundials from within PETSc, without any
> more hassle than supplying a configure flags (--download-sundials, or
> see the other entries under SUNDIALS: with ./configure --help).
> That could potentially be very helpful in moving to TS.
> 
> http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSUNDIALS.html
> 
> 
> On Tue, Oct 20, 2015 at 09:21:04AM +0200, Julian Andrej wrote:
>> There are a variety of algorithms for ODE/DAEs in the PetscTS
>> implementation. For examples see e.g.
>> http://www.mcs.anl.gov/petsc/petsc-current/src/ts/examples/tutorials/index.html
>> 
>> Sundials is also capable of parallel solving, even from the Matlab
>> sundialsTB interface, as far as i know.
>> 
>> On Tue, Oct 20, 2015 at 9:10 AM, Sahai, Amal <sahai2 at illinois.edu> wrote:
>>> I am trying to solve a very large system of ODEs for modeling the
>>> time-varying composition of a homogeneous (no spatial variation) reaction
>>> mixture composed of 50000 species. I was wondering if there is parallel ode
>>> solver included in PETSc? I have been using the sundials package for solving
>>> a smaller system in serial and would like to move on to parallel framework
>>> to speed up my calculations.
>>> 
>>> Regards
>>> Amal



More information about the petsc-users mailing list