Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Contraction of Tensors in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112556] Re: Contraction of Tensors in Mathematica
  • From: Vince Virgilio <blueschi at gmail.com>
  • Date: Mon, 20 Sep 2010 05:41:23 -0400 (EDT)
  • References: <i727in$etb$1@smc.vnet.net> <i74ln1$jkh$1@smc.vnet.net>

On Sep 19, 5:38 am, Vince Virgilio <blues... at gmail.com> wrote:
> On Sep 18, 7:25 am, Sam Takoy <sam.ta... at yahoo.com> wrote:
>
> > Now supposed I want to do some contraction to define a new tensor
>
> > D_jklrsu = C_ijklrsiu?
>
> > How do I do that?
>
> > Many thanks in advance!
>
> > Sam
>
> d = Total @ Flatten[c, {{1,7}}]
>
> ?

"?" indeed.

As others suggested, use "Tr".

d = Tr[Flatten[c, {{1}, {7}}], Plus, 2];

Vince


  • Prev by Date: Re: create character listing
  • Next by Date: Re: Contraction of Tensors in Mathematica
  • Previous by thread: Re: Contraction of Tensors in Mathematica
  • Next by thread: Re: Contraction of Tensors in Mathematica