Skip to content
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

Dimension system refactoring #13287

Merged
merged 4 commits into from Sep 23, 2017

Conversation

Upabjojr
Copy link
Contributor

@Upabjojr Upabjojr commented Sep 9, 2017

Dimensional dependencies are not absolute, they depend on the dimension system (class DimensionSystem).

Even relations like velocity == length / time actually depend on the dimension system you're currently using. If you are in special relativity, maybe you want to use length == time so that the velocity is dimensionless.

In the gaussian units, the unit of charge is the statcoulomb, which does not depend on the Ampere (the current is not a fundamental dimension and the charge can be expressed as a combination of length, time, and mass without current).

This PR makes the relation between base dimensions and derived dimensions part of DimensionSystem, so that they are no longer absolute.

For compatibility reasons, the SI dimension standard is kept as a reference point.

TODO:

  • release deprecation warnings

@Upabjojr
Copy link
Contributor Author

Upabjojr commented Sep 9, 2017

@schymans

@schymans
Copy link
Contributor

This looks very nice. Would you be able to give some usage examples, especially of the new class DimensionalDependency(Basic)? I have been struggling a lot with figuring out the motivations for some past code changes in sympy and realised that simple usage examples of the intended behaviour would have helped. Thanks!

@Upabjojr
Copy link
Contributor Author

especially of the new class DimensionalDependency(Basic)?

I have merged that class into DimensionSystem in my last commit.

I have been struggling a lot with figuring out the motivations for some past code changes

The DimensionSystem class should contain information about the relations between dimensions, for example that velocity == length / time.

@Upabjojr
Copy link
Contributor Author

@schymans I know you are using a lot the code in units, I was wondering whether you can check if you find any trouble by using this branch (to make sure it won't break too much).

@schymans
Copy link
Contributor

OK, I'll try and report, but it won't be until next week.

@Upabjojr
Copy link
Contributor Author

#13336

@Upabjojr Upabjojr merged commit 997fc6e into sympy:master Sep 23, 2017
@Upabjojr Upabjojr deleted the dimension_system_refactoring branch April 20, 2019 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants