scipy / scipy

SciPy library main repository
https://scipy.org
BSD 3-Clause "New" or "Revised" License
13.06k stars 5.18k forks source link

Add verbose as optional argument to solve_ivp #11799

Open ma-sadeghi opened 4 years ago

ma-sadeghi commented 4 years ago

Is your feature request related to a problem? Please describe. When solving large-enough IVP problems, for example, solving 2D/3D time-dependent PDEs using method of lines, it takes a long time for solve_ivp to do the integration for all time steps.

Describe the solution you'd like Add verbose=False as default arg to solve_ivp and similar methods.

Describe alternatives you've considered None

Additional context (e.g. screenshots) None

miladsade96 commented 4 years ago

Hi @ma-sadeghi , I think it's can be done!

ma-sadeghi commented 4 years ago

Hi @EverLookNeverSee, that's great to hear. I'm willing to volunteer to do that, although I have not contributed to scipy before nor have much experience with C/Fortran code. Let me know what you think, and where you think I should start.

miladsade96 commented 4 years ago

@ma-sadeghi Please go for it and create a PR. As you know scipy is a multi-language software package which written mostly by python. we use cython whenever we need compiled languages speed and generate c/c++ extension codes that we use in our python codes. fortran is mostly in linalg module because of BLAS and LAPACK which written by fortran and we wrapp their functions into python using f2py.

MatthewFlamm commented 4 years ago

May I suggest as a possible overarching implementation that a callback function be added instead? The function would be called every successful time step, or maybe the status also gets passed in and called every step. Then the user could put in a print statement to do this functionality. It would be more flexible, but also require (only slightly) more user code.