"Classical Mechanic" pre-alpha release. Code generators in Maxima ?
Subject: "Classical Mechanic" pre-alpha release. Code generators in Maxima ?
From: Akshay Srinivasan
Date: Mon, 28 Nov 2011 08:18:44 +0530
On 11/27/2011 08:35 PM, Michel Talon wrote:
> Akshay Srinivasan wrote:
>> Hello, This follows my previous mail to Maxima about using Maxima
>> in pure lisp to generate code for numerics ,ala scmutils. I
>> didn't really bother doing anything of the sort given the amount
>> of time I'd have had to spend on it. I did however write a C
>> code-generator which generates the code to for obtaining the
>> canonical vector field \dot{x} = f(t, x, u), given unconstrained
>> lagrangians, and also its Jacobians. "Classical mechanic" makes
>> use of Maxima, SBCL, GSL and ADOL-C to generate the field and its
>> Jacobians. It'd be nice to hear some feedback from the Maxima
>> community. I've put up the source code up on github here:
>> https://github.com/enupten/Classical-Mechanic As it now works,
>> there is a string parser written in LISP, which creates the
>> functions in Cpp for generating the Inertia, Coriolis and Force
>> terms, making use of the expressions generated by Maxima. These
>> functions are used in a library which actually does the actual
>> matrix inversion and other book keeping to give f(t, x, u) and
>> its jacobians using GSL and ADOL-C. I was wondering if it would
>> be wise to make this a Maxima module; I'd probably like having
>> something which is not as tacky as the current version.
>>
>> Akshay
>
> Personnally i like a lot the idea, as well as the mixture of maxima
> lisp and c. It may be that more integrated things can be done,
> using CFFI or the like, but this is already very nice.
I'm glad you like it. Making it more integrated is something on my
TODO list; another thing I plan to add is support for arbitrary
constraints. The latter functionality should make it rather
interesting, given that I could then get the EOM for Non-holonomic and
Multi-body systems and the sort.
Akshay