On Apr 24, 2014, at 1:23 AM, Jed Brown <j...@jedbrown.org> wrote: > Veltz Romain <romain.ve...@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