[GiNaC-devel] Crash in simplify_indexed.
Chris Dams
Chris.Dams at mi.infn.it
Thu Dec 15 15:38:08 CET 2005
Dear all,
I found out that if one tries to use simplify_indexed for a product that
contains, say, T~a.mu*T~a~mu and the dimensions of the indices a and mu
are incomparable, this throws an exception. This is because GiNaC tries to
apply user defined scalar_products in order to contract factors. As the
user may not even be using scalar_products, I think this is not a good
idea. I solved this by wrapping the part of the code that does this in a
try-catch block. A patch is in CVS.
Note: The try/catch-approach is not very elegant IMO. An alternative
solution might be to stop trying to use user-defined scalar_products in
case of considering contraction of indexed objects with more than one
index. Is anybody using such a feature anyway?
Best,
Chris
More information about the GiNaC-devel
mailing list