I forgot to mention in the SO post (not that I have mentioned plenty already there) that sometimes I get the following error :
Traceback (most recent call last):
File "tensor.py", line 274, in <module>
RC = R.find_Christoffel_tensor()
File "tensor.py", line 210, in find_Christoffel_tensor
R = metric_to_Riemann_components(metric)
File "/usr/local/lib/python2.7/dist-packages/sympy-0.7.7.dev0-py2.7.egg/sympy/diffgeom/diffgeom.py", line 1575, in metric_to_Riemann_components
ch_2nd = metric_to_Christoffel_2nd(expr)
File "/usr/local/lib/python2.7/dist-packages/sympy-0.7.7.dev0-py2.7.egg/sympy/diffgeom/diffgeom.py", line 1525, in metric_to_Christoffel_2nd
ch_1st = metric_to_Christoffel_1st(expr)
File "/usr/local/lib/python2.7/dist-packages/sympy-0.7.7.dev0-py2.7.egg/sympy/diffgeom/diffgeom.py", line 1492, in metric_to_Christoffel_1st
matrix = twoform_to_matrix(expr)
File "/usr/local/lib/python2.7/dist-packages/sympy-0.7.7.dev0-py2.7.egg/sympy/diffgeom/diffgeom.py", line 1463, in twoform_to_matrix
raise ValueError('The input expression concerns more than one '
ValueError: The input expression concerns more than one coordinate systems, hence there is no unambiguous way to choose a coordinate system for the matrix.
In this case I have introduced some bug in the code, I do not understand why I am getting this error.
Here is the input I give :
g =
Matrix([[1/(u**2 + 1), 0, 0], [0, u**2, 0], [0, 0, u**2*sin(v)**2]])
The code produces the following two-form :
sin(v)**2*u**2*TensorProduct(dw, dw) + u**2*TensorProduct(dv, dv) + TensorProduct(du, du)/(u**2 + 1)
For the coordinate system :
CoordSystem(nontrivial, Patch(P, Manifold(M, 3)), (u, v, w))