tensorcan

22 views
Skip to first unread message

mario

unread,
Jan 15, 2013, 6:19:59 AM1/15/13
to sy...@googlegroups.com
I posted in http://code.google.com/p/tensorcan/  a C version of the canonicalization algorithm for tensors
without free indices. It is roughly 60x faster than `double_coset_can_rep` in `tensor_can.py`.

For tensor computations with many contracted indices `double_coset_can_rep`  takes most of the time,
e.g. 95% of the time in `test_riemann_invariants1` in test_tensor.can.py (same using 'tensor.py' in PR 1700)

If there are few index contractions `double_coset_can_rep`  takes little time, e.g. in the gamma matrix computations
in PR 1699 it takes 14% of the time.

If there is interest in this, I can write a wrapper for the C implementation of `double_coset_can_rep`, to speed up
SymPy tensor computations with many contracted indices, if the wrapper is installed.
 

Aaron Meurer

unread,
Jan 18, 2013, 9:12:27 PM1/18/13
to sy...@googlegroups.com
Sure.

Are there computations that take a significant amount of time due to
tensor contraction computations? I haven't really seen this module put
to use yet.

Aaron Meurer

>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sympy/-/pkGF-S54Z90J.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to
> sympy+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.

mario

unread,
Jan 19, 2013, 5:23:36 AM1/19/13
to sy...@googlegroups.com


>Are there computations that take a significant amount of time due to
>tensor contraction computations? I haven't really seen this module put
>to use yet.


 To canonicalize a Riemann invariant which is the product of 20 Riemann
tensors takes roughly a second, with 50 Riemann tensors roughly a minute.

The time taken increases with the size of the symmetry group
of the component tensors and with the number of their contractions.
For instance replacing Riemann tensors with totally symmetric tensors
in an example with 20 tensors, the timing went from 0.8s to 106s.

In the applications in PR 1699,
traces of gamma matrices and SU(N) theoretical group factors,
canonicalization does not take much time (at most half of the time in the latter case).

For the moment I don't have other applications.
Reply all
Reply to author
Forward
0 new messages