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))

On Saturday, October 31, 2015 at 6:04:14 PM UTC+1, Imran Ali wrote:
>
> I just asked the following question at stackoverflow :
>
>
> http://stackoverflow.com/questions/33453941/determining-christoffel-symbols-and-curvature-tensors-for-a-flat-sphere-using-sy
>
> In essence, the question is two fold :
>
> 1) My own implementation fails for flat surfaces in 3D
> 2) Sympy.Diffgeom seems to give wrong results
>
> Really appreciate any insight as to what is causing the error and why the 
> hand-coded sympy.diffgeom produces wrong result.
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/2a282705-4a73-4d6e-8e06-02f136dc3c56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to