Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Tensor manipulations: contraction over 2 indices' topicStudent Support Forum > General > "Tensor manipulations: contraction over 2 indices"

Next Comment >Help | Reply To Topic
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: ,

Subject (listing for 'Tensor manipulations: contraction over 2 indices')
Author Date Posted
Tensor manipulations: contraction over 2 indices Drg 10/30/11 12:55pm
Re: Tensor manipulations: contraction over 2 in... Peter Pein 11/01/11 05:14am
Re: Tensor manipulations: contraction over 2 in... Peter Pein 11/01/11 05:21am
Next Comment >Help | Reply To Topic