On Saturday, November 23, 2013 2:04:35 AM UTC+1, Gilbert Gede wrote:
>
> In physics.mechanics, I actually tried to side-step this entire problem, 
> by just using .x, .y, and .z for the three directions. We also allowed for 
> users to define a custom string for an index, and access that direction via 
> a dictionary using the index they defined (['1'], ['2'], ['3'], or ['i'], 
> ['j'], ['k'], etc). But yeah, as Aaron said, we only had three dimensions. 
> I don't know if that solution will be of any use to you. 
>
For more options, visit https://groups.google.com/groups/opt_out.
>
>
 The nice thing of the tensor module is abstract index notation. It is now 
possible to store data into tensors and use a mixed abstract and numeric 
convention to access data.

>>> LorentzIndex = TensorIndexType('Lorentz', dim=4)
>>> LorentzIndex.data = [1, -1, -1, -1]  # the metric
>>> EuclideanIndex3D = TensorIndexType('E3D', dim=3)
>>> EuclideanIndex3D.data = [1, 1, 1]

My idea: whenever a tensor has a Lorentz index, it can also accept an 
euclidean index on that slot. Passing an euclidean index strips the tensor 
of the time-like coordinates on that index position. The problem is that by 
doing so, the original data get shifted by 1, this problem could be avoided 
by setting the offset of *EuclideanIndex3D* to one, something like this:

>>> EuclideanIndex3D = TensorIndexType('E3D', dim=3, offset=1)


-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to