[petsc-users] setting Sundials options within petsc4py

Veltz Romain romain.veltz at inria.fr
Thu Apr 24 01:28:12 CDT 2014


On Apr 24, 2014, at 1:23 AM, Jed Brown <jed at jedbrown.org> wrote:

> Veltz Romain <romain.veltz at inria.fr> writes:
> 
>> Dear pets users,
>> 
>> I have been trying to set some sundials options from petsc4py but I am
>> unsuccessful. I hope somebody will have a good pointer.  For example I
>> can pass -ts_sundials_type bdf to python in the command line.
>> 
>> I would like to call TSSundialsSetTolerance to set the
>> tolerance. Hence I need to pass some options in the command line (I
>> don't know if this is possible for this particular function) or call
>> TSSundialsSetTolerance(…) from petsc4py. So far, I am clueless.
> 
> These functions are not yet implemented in petsc4py.  You could clone
> the repository (https://bitbucket.org/petsc/petsc4py) and add the
> interfaces you need.  It should be straightforward based on similar
> interfaces that already exist.  We can accept patches/pull requests, but
> don't always have time to ensure that every function is exposed via
> petsc4py.

OK will try, hopefully I have that python level. That would be adding changes mainly to 
 petsc4py / src / PETSc / TS.pyx right?

> 
>> Also, I would like to limit the step sizes. This is not documented in
>> petsc_manual.pdf. But in sundial.c, there is PetscErrorCode
>> TSSundialsSetMaxTimeStep_Sundials(TS ts,PetscReal maxdt) which I would
>> like to call also from petsc4py.
>> 
>> Thank you for your help,
>> 
>> Best regards,
>> 
>> 
>> Veltz Romain
>> 
>> Neuromathcomp Project Team 
>> Inria Sophia Antipolis Méditerranée 
>> 2004 Route des Lucioles-BP 93 
>> FR-06902 Sophia Antipolis
>> http://www-sop.inria.fr/members/Romain.Veltz/public_html/Home.html

Veltz Romain

Neuromathcomp Project Team 
Inria Sophia Antipolis Méditerranée 
2004 Route des Lucioles-BP 93 
FR-06902 Sophia Antipolis
http://www-sop.inria.fr/members/Romain.Veltz/public_html/Home.html






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140424/3918cd5f/attachment.html>


More information about the petsc-users mailing list