Javier Ros Ganuza
jros at unavarra.es
Thu Jun 16 22:28:11 CEST 2005
I'm evaluating Ginac in order to replace my own symbolic manipulator for
a program, 3D_Mec, for dynamical simulation of multibody systems. I've
been for some days reading at C++ books and Ginac own documentation in
order to see it it fit my needs (Experience in C an OO Pascal but no C+
I think that the answer is yes, but I need to do some simple tests
in order to evaluate it more properly.
I see that using the plain functionality that Ginac provides is pretty
but when dealing with own types of symbolic data the problem surpasses
my knowledge, so I'm asking for help on how to start or in how to focus
Well, in fact I have some problems, but I'll will start for the most
important one to me.
Nevertheless I will somehow simplify the problem in order to make it
more understandable and easy to ask/answer.
I want to do algebra with cartesian (3x1) "vectors". Cartesian "vector"s
are to be represented by a 3x1 Ginac vector (3-tuple) and a reference to
a basis that tell us in which base the components have physical sense.
for example (in my particular jargon):
The last sentence will not have sense unless, when the summation is
performed, the vectors are transformed to be expressed in the same
basis. The result will get expressed in that same basis.
Obviously I need more operators but I hope the above example will
There is a base structure -with elements basis_k and l and others- that
has a tree structure form. That structure allow us to decide to which
base reduce the operation of the binary operator -base_m for example-,
and to obtain the pertinent change of base matrices, so that the
symbolic result keeps as simple as possible (transform every vector to a
single basis gives usually symbolic complexity).
To which base to transform an the transformation, should be made by the
For example if there is a third "vector" in base_j and left to right
evaluation is assumed
The summation vector1+vector2, will render as above a result in base_m
and the second summation (vector1+vector2)+vector3, will render the
result in a different base_n, that will be chosen at the time this last
summation is performed (by inquiring base structure).
Thus the question is, can be such a "cartesian vector" type be defined
within Ginac philosophy?, or should I define a new kind of expression
type of my own. (is it very complex?, assumed that the base structure
and associated functions is implemented).
I've read at the tutorial, through section 6.4 and 6.5. Is any of that
philosophies the way to go?. I'm not sure, and I'm facing a big gap from
what I want to do and what there is explained (or what I do understand).
Can you give me some advice?.
Thanks a lot
More information about the GiNaC-list