-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIUnits.jl as a dependency? #87
Comments
I know that you closed this already, but I would say that things like making |
Yes. I noticed I read the +,-,etc. overloading wrong. It mostly does just work in DifferentialEquations.jl, just like all of the other number systems! (The only difference is the timestepping has to be dimensionless because you step forward by percentages of dt in Runge-Kutta methods, but this was easy to fix). The only thing I want to fix up is plotting #86 which is really just about getting the dispatch right for the recipes. Then I'll merge the branch I have which has everything working with SIUnits.jl which is mentioned here: SciML/DifferentialEquations.jl#34. It's a lightweight enough dependency that I'll just be requiring it. Nice work. |
I am wondering about what the effects of SIUnits as a dependency would be for DifferentialEquations.jl. First of all, the only reason it would be necessary would be for these lines of code:
a few of those. I just need to make dimensionless a few quantities that have units before passing them to the solver, and couldn't find a good way to do so without having SIUnits itself. If there's a fix for that, the problem is moot (at least for me).
The problem is that it looks like this package overloads things like +,-,etc. Is there any performance impact? This is a package which is looking to get good performance using a lot of math repeatedly, so it wouldn't make sense to add something that has even a small impact if it effects the vast majority of uses for a small minority use.
However, I may add it as a conditional dependency... is there a way of knowing that a number has units without having SIUnits imported, so that I can import SIUnits as necessary (I have the conditional import part down, just not the way to check for unit'd values without the imports)
The text was updated successfully, but these errors were encountered: