| Author |
Comment/Response |
Drg
|
10/30/11 12:55pm
Hi,
I was wondering if there is a way perform the contraction of two tensors over two different indices or more at once. For example, the following computation takes some time, and I am to perform similar operations with much larger numbers (not just 4 or 5 but 100 or 1000):
Given that:
Dimensions[IrrepVec] = {4, 5, 4, 5}
Dimensions[HIrrepVec] = {5, 4, 5, 4}
I want to perform the following contraction over the various indices:
Table[Sum[(HIrrepVec.IrrepVec)[[tt2, rr2, b,b, rr, tt]],{b, 1, 3}],{tt, 1, 3},{tt2, 1, 3},{rr, 1, 5}, {rr2, 1, 5}]
In a more efficient way, without having to run a sum for each index.
Let me know if you can think of any functionality in Mathematica that would enable me to do this. Thanks!
URL: , |
|