Ask Your Question

ljp's profile - activity

2023-06-06 06:19:56 +0200 received badge  Famous Question (source)
2023-05-22 02:21:44 +0200 received badge  Notable Question (source)
2023-05-22 02:21:44 +0200 received badge  Popular Question (source)
2022-03-05 12:55:20 +0200 received badge  Popular Question (source)
2019-04-24 18:34:26 +0200 received badge  Supporter (source)
2019-04-24 18:34:23 +0200 received badge  Scholar (source)
2019-04-21 00:11:13 +0200 received badge  Nice Question (source)
2019-04-20 23:37:36 +0200 received badge  Student (source)
2019-04-20 20:23:05 +0200 asked a question Contracting with Christoffel symbols
MM = Manifold(4, 'MM', latex_name=r'\mathcal{M}', start_index=0)  
chartt.<t,x,y,z> = MM.chart()

gg = MM.lorentzian_metric('gg')
gg[0,0] = -1
gg[1,1] = 1
gg[2,2] = 1
gg[3,3] = 1

some_tensor = MM.tensor_field(1,1)
christoffel = gg.christoffel_symbols()
some_contraction = some_tensor['^i_j'] * christoffel['^j_kl']

The above code doesn't work and crashes with the following error:
ValueError: wrong number of indices: 3 expected, while 4 are provided

I know that the Christoffels are only a CompWithSym and not a real tensor, but shouldn't one still be able to generate some contracted quantities?

2019-04-20 20:23:05 +0200 asked a question Tensor slicing

I wonder if there is any way to access tensor elements by a slicing operation, so that parts of the tensor can be set by another tensor or the other way around. Another useful thing would be the ability to display only the slice of interest of a tensor.
At the moment I'm just looping over the components using the irange of the Manifold.