"Classical Mechanic" pre-alpha release. Code generators in Maxima ?
Subject: "Classical Mechanic" pre-alpha release. Code generators in Maxima ?
From: Akshay Srinivasan
Date: Sun, 27 Nov 2011 12:10:50 +0530
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