[GiNaC-list] multi index storage of expressions
Charlls Quarra
charlls_quarra at yahoo.com.ar
Sun Feb 18 04:02:25 CET 2007
Hi,
I wanted to define a simple matrix of derivatives
(i.e: a Jacobian) first as an indexed object:
ex f = a*x + b*y + c*x*y + ...
ex g = u*pow(x,2) + v*pow(y,2) + w*x,y + ....
idx i(symbol("is") , 2) , j(symbol("js") , 2);
ex Jacobian = diff( f*delta_tensor(i , 0) +
g*delta_tensor(i,1) , x )*delta_tensor( 0 , j ) +
diff( f*delta_tensor(i , 0) + g*delta_tensor(i,1) , y
)*delta_tensor( 1 , j );
but then this failed on me (because 0 and 1 are not
acceptable arguments where an idx should be expected)
Why am i trying to do this as an indexed object and
not with a matrix?
well, because later, i would also want to make
computations with an object like
D( f_{i} ) / dx_{j} dx_{k}
but afaik there isnt a "three indexed" matrix object
in ginac, or how they are usually called, cubic
arrays. correct?
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the GiNaC-list
mailing list