Le lundi 02 avril 2012 à 13:23 -0700, Luke a écrit : > > Did you see my email about the Euler-Lagrange equations of motion that > > I sent earlier today? One important point is that there is absolutely > > no reason to have a custom Lagrangian class. You can just build the > > Lagrangian as a standard sympy expression. > > One reason to have a custom Lagrangian class is that it helps keep > track of systems where you have a large number of > particles/bodies/constraints/interacting forces. For simple systems > you can surely write the Lagrangian in a line or two, but for more > interesting systems, it becomes onerous and error prone to do this > "manually". Having a class which allows you to pass it a list of > particles/bodies, and the forces/torques acting on them, as well as > any kinematic constraints that may be present, greatly simplifies the > work the user must do and reduces the likelihood of making a mistake.
These are reasons to have a System class, with method(s) to create a Lagrangian. > I see many reasons to have a custom Lagrangian class. I don't see how it would help. I think that it might rather cause code duplication and confuse the notion of what a Lagrangian is. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.