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
Hi Chris, Chris Dams wrote:
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?
I am not aware of any code using that feature. Regards Jens
participants (2)
-
Chris Dams
-
Jens Vollinga