When solving/doing calculations in general in General Relativity, one has to do a truly extreme amount of computations. Nowadays we shrug this off as we can just tell computers to do them for us. I feel this inhibits our understanding though if all the calculations are intractable. As such, I want to see if these calculations can be done in a more efficient manner. Equations written in a vector calculus format would probably be faster as calculations can be batched together more easily, allowing more to be done at once. The equations would also be easier to understand. I’ve already rewritten the geodesic equation in terms of vector calculus, and it’s far more computationally efficient by my calculations. In this project, the goal is to rewrite the Ricci tensor in vector calculus form. The goal of doing so is actually to serve as a stepping stone for a future project. The end goal is a new equation for the affine evolution of the metric tensor field along a parametric hypersurface. If that could be derived in vector calculus notation, massive speedups could be realized for GR simulations.
​
So what I tried to do was the following. I have a node structure, starting with the metric tensor and position vector r. Every iteration, we use a set of operators on the previous iteration’s nodes. These are ∇A,∇⋅A,A^T,(A⋅∇)B,A⋅B,A⨂B, and Tr[⁡A], all familiar vector calculus operators which only use coordinate derivatives. If an operator uses two inputs, at least one of them needs to be from the previous iteration. Both will need to have certain tensor ranks in order for the operation to be valid. Now, for these operators, the tensors will need certain variances as well to be valid. It should take the tensors of each node and automatically try all valid options. This requires IndexSet to be functional, which it doesn’t seem to be in many cases. By that, I mean if you give it a tensor definition, the tensor cannot automatically be used with arbitrary variance afterwards. Oftentimes, each variance must be manually found and defined. Using all of these, a list of inactive operations called cachedOperations is created.
​
This list is then searched through to. Each element is activated and converted to covariant form. It is then broken into the expression’s elements and coefficients. All new elements are added to the end of the seen list(somehow managed to break?). After that, a SparseArray is created which details how much of each element in seen is in the expression. If the resulting vector matches one of another node, the operation which created it is added to the pre-existing node. Else, a new node is created. For this new node, a new variable must be created to serve as the name of the new tensor. IndexSet is ideally used to assign the expression’s value to the variable. With each iteration, new tensor components are created. The hope is all the tensor components in the Ricci tensor will be created by this process and there will be a linear combination of node SparseArrays which equals the Ricci tensor’s SparseArray. If that’s the case, then the vector calculus operations which created those nodes can be used to rewrite the Ricci tensor in terms of vector calculus. I’ve found some of them by hand already, but not all of them.
​
I hope once the equation is created, it can be used to find the metric tensor’s affine evolution. In terms of evolving the metric tensor, the Ricci tensor is basically a given variable. So actually calculating the Ricci tensor isn’t particularly important for that aspect.
In[]:=
------------------------------------------------------------
Package xAct`xPerm` version 1.2.3, {2015,8,23}
CopyRight (C) 2003-2020, Jose M. Martin-Garcia, under the General Public License.
Connecting to external MinGW executable...
Connection established.
------------------------------------------------------------
Package xAct`xTensor` version 1.2.0, {2021,10,17}
CopyRight (C) 2002-2021, Jose M. Martin-Garcia, under the General Public License.
------------------------------------------------------------
These packages come with ABSOLUTELY NO WARRANTY; for details type Disclaimer[]. This is free software, and you are welcome to redistribute it under certain conditions. See the General Public License for details.
------------------------------------------------------------
** DefManifold: Defining manifold mVar.
** DefVBundle: Defining vbundle TangentmVar.
** DefTensor: Defining symmetric metric tensor g[-xVar0001,-xVar0002].
** DefTensor: Defining antisymmetric tensor epsilong[-i,-j,-xVar0001,-xVar0002].
** DefTensor: Defining tetrametric Tetrag[-i,-j,-xVar0001,-xVar0002].
** DefTensor: Defining tetrametric Tetrag†[-i,-j,-xVar0001,-xVar0002].
** DefCovD: Defining covariant derivative CD[-xVar0001].
** DefTensor: Defining vanishing torsion tensor TorsionCD[i,-j,-xVar0001].
** DefTensor: Defining symmetric Christoffel tensor ChristoffelCD[i,-j,-xVar0001].
** DefTensor: Defining Riemann tensor RiemannCD[-i,-j,-xVar0001,-xVar0002].
** DefTensor: Defining symmetric Ricci tensor RicciCD[-i,-j].
** DefCovD: Contractions of Riemann automatically replaced by Ricci.
** DefTensor: Defining Ricci scalar RicciScalarCD[].
** DefCovD: Contractions of Ricci automatically replaced by RicciScalar.
** DefTensor: Defining symmetric Einstein tensor EinsteinCD[-i,-j].
** DefTensor: Defining Weyl tensor WeylCD[-i,-j,-xVar0001,-xVar0002].
** DefTensor: Defining symmetric TFRicci tensor TFRicciCD[-i,-j].
** DefTensor: Defining Kretschmann scalar KretschmannCD[].
** DefCovD: Computing RiemannToWeylRules for dim 4
** DefCovD: Computing RicciToTFRicci for dim 4
** DefCovD: Computing RicciToEinsteinRules for dim 4
** DefTensor: Defining weight +2 density Detg[]. Determinant.
** DefTensor: Defining tensor r[i].
Rules {1} have been declared as DownValues for r.
Rules {2} have been declared as UpValues for r.
** DefTensor: Defining tensor ricci[-i,-j].
Out[]=
1
4
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
i
g
xVar0001
xVar0003
∂
j
g
xVar0002
xVar0004
-
1
2
g
xVar0001
xVar0002
∂
j
∂
i
g
xVar0001
xVar0002
+
1
4
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
i
g
j
xVar0001
∂
xVar0002
g
xVar0003
xVar0004
+
1
4
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
j
g
i
xVar0001
∂
xVar0002
g
xVar0003
xVar0004
-
1
4
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
xVar0001
g
i
j
∂
xVar0002
g
xVar0003
xVar0004
+
1
2
g
xVar0001
xVar0002
∂
xVar0002
∂
i
g
j
xVar0001
+
1
2
g
xVar0001
xVar0002
∂
xVar0002
∂
j
g
i
xVar0001
-
1
2
g
xVar0001
xVar0002
∂
xVar0002
∂
xVar0001
g
i
j
-
1
2
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
xVar0002
g
j
xVar0004
∂
xVar0003
g
i
xVar0001
+
1
2
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
xVar0003
g
i
xVar0001
∂
xVar0004
g
j
xVar0002
-
1
2
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
i
g
j
xVar0001
∂
xVar0004
g
xVar0002
xVar0003
-
1
2
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
j
g
i
xVar0001
∂
xVar0004
g
xVar0002
xVar0003
+
1
2
g
xVar0001
xVar0002
g
xVar0003
xVar0004
∂
xVar0001
g
i
j
∂
xVar0004
g
xVar0002
xVar0003
In[]:=
incrementNodes[]​​incrementNodes[]​​incrementNodes[]
** DefTensor: Defining tensor covTempFunc[-i,-j].
** DefTensor: Defining tensor v0001[-i,-j].
** UndefTensor: Undefined tensor covTempFunc
** DefTensor: Defining tensor Removed[covTempFunc][-i,j].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0002[].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0003[].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0004[-i,-j].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
Out[]=
{0,0,0,0,0,0,0,0,0,0,0,0,0}
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0005[-i,-j].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0006[-i,-j].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0007[-i,-j].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0008[-i,-j].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
Out[]=
{0,0,0,0,0,0,0,0,0,0,0,0,0}
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0009[-i,-j].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0010[-i,-j].
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** UndefTensor: Undefined tensor Removed[covTempFunc]
** DefTensor: Defining tensor v0011[-i,-j].