Timeline for Scalar from tensor contraction
Current License: CC BY-SA 3.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 7, 2018 at 17:36 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Apr 7, 2018 at 16:48 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Mar 8, 2018 at 15:59 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Feb 6, 2018 at 15:43 | answer | added | Mark Pace | timeline score: 2 | |
Apr 13, 2017 at 12:55 | history | edited | CommunityBot |
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
|
|
Jun 8, 2016 at 21:38 | review | Close votes | |||
Jun 25, 2016 at 3:04 | |||||
Jun 8, 2016 at 17:49 | comment | added | Bruno Le Floch |
Rie[l,a,b,c] should have double brackets. Perhaps that mistake occurs elsewhere: you can check the dimension of various parts by Dimensions[Riemannabajo[g,xx]] etc. As for order of indices, if I read Sum[ig[[i, a]]*ig[[j, b]]*ig[[k, c]]*Rie[l, a, b, c], {a, 1, n}, {b, 1, n}, {c, 1, n}] correctly it computes $g^{ia}g^{jb}g^{kc}R^l{}_{abc} = R^{lijk}$ not $R^{ijkl}$. But maybe Rie[[l, a, b, c]] means $R_{abc}{}^l$.
|
|
Jun 8, 2016 at 14:45 | comment | added | Jasimud | @BrunoLeFloch I edited the post with the full code I was using for the scalar, it still gives me some higher rank tensor, and I don't seem to grasp why or why the order of the contraction for RiemannTensorarriba should be l i j k | |
Jun 8, 2016 at 14:43 | history | edited | Jasimud | CC BY-SA 3.0 |
added 168 characters in body
|
Jun 8, 2016 at 13:40 | comment | added | Bruno Le Floch |
The capitalization of variable names is inconsistent (e.g., RiemannTensorarriba vs RiemannTensorArriba ). Pleass make sure that you don't have stray definitions by restarting the kernel. It might be helpful to English speakers to replace arriba and abajo by Up and Down . Your approach with Sum[...,{i,1,n},{j,1,n},{k,1,n},{l,1,n}] seems reasonable, but it seems that Riemannabajo[[i,j,k,l]] should be Riemannabajo[g,xx][[i,j,k,l]] if I read the code correctly. The order of indices in RiemannTensorarriba seems wrong (should be l , i , j , k ).
|
|
Jun 8, 2016 at 1:21 | comment | added | Jasimud | Since it's a rank-4 tensor in order tu apply Inner, or TensorContract I would need to put the list of indices I need to contract, for example only for the first pair of indices it would be {1,1,a,b,c},{2,2,a,b,c}{3,3,a,b,c}{4,4,a,b,c}, and then I need to expand all other 3 indeces, there are lot's of contractions, there must be a simpler way than just counting them by hand | |
Jun 8, 2016 at 0:38 | comment | added | MarcoB |
Jasimud, your RiemannTensors are rank-4 tensors. According to the docs, Dot contracts the last index in its first arguments with the first index in its second argument; for your tensors, this will result in a tensor of rank 6, and not a scalar, so this can't possibly work. Perhaps you want to look at Inner or TensorContract .
|
|
Jun 8, 2016 at 0:18 | comment | added | Jasimud | I tought it to be complete. Anyway there is the edit with all the code in order to work | |
Jun 8, 2016 at 0:17 | history | edited | Jasimud | CC BY-SA 3.0 |
added 1685 characters in body
|
Jun 8, 2016 at 0:01 | comment | added | MarcoB | Even after copying the definitions from the linked question, your code does not execute successfully, instead generating a slew of errors. Please make sure that you a) include all relevant definitions and parameter values, and b) make sure that your code will execute correctly in a fresh Mathematica session. We won't be able to help otherwise. | |
Jun 7, 2016 at 22:54 | history | asked | Jasimud | CC BY-SA 3.0 |