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

Added support for a bodies attribute to LagrangesMethod #11263

Merged
merged 1 commit into from
Jul 12, 2016

Conversation

jbm950
Copy link
Contributor

@jbm950 jbm950 commented Jun 20, 2016

LagrangesMethod now has a self.bodies attribute just like KanesMethod. Tests have also been added.

In a conversation with @moorepants I brought up that LagrangesMethod does not have information on the bodies of the system for which it finds the equations of motion. It was determined that the body information must therefore lie in the Lagrangian. Upon further research I determined this was only part true. The Lagrangian does use the bodies information of the system but it turns out it is only a function not a class and only returns a sympy expression of the Lagrangian. This means that there is not attribute to access the bodies information inside of LagrangesMethod. I decided a minimally invasive solution to add bodies to the system was to make it an optional keyword argument upon initialization of the LagrangesMethod instance. The attribute access was made to be identical to the KanesMethod API.

LagrangesMethod now has a self.bodies attribute just like KanesMethod.
Tests have also been added.
@moorepants
Copy link
Member

+1 to merge

@moorepants moorepants merged commit 6ec3b8a into sympy:master Jul 12, 2016
@jbm950 jbm950 deleted the lagrange_bodies branch July 20, 2016 15:18
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.

2 participants