What you should do is post the complete code to stackoverflow, as you
have done here.

Aaron Meurer

On Fri, Nov 6, 2015 at 10:51 AM, Kalevi Suominen <jks...@gmail.com> wrote:
>
>
> On Thursday, November 5, 2015 at 3:56:09 PM UTC+2, Imran Ali wrote:
>>
>> If I simply hard code each metric, every thing works properly. For
>> example, take egg carton surface,
>>
>>     from sympy.diffgeom import Manifold, Patch, CoordSystem, TensorProduct
>>     from sympy import sin,cos
>>     dim = 2
>>     m = Manifold("M",dim)
>>     patch = Patch("P",m)
>>     system = CoordSystem('egg_carton', patch, ["u", "v"])
>>     u,v = system.coord_functions()
>>     du,dv = system.base_oneforms()
>>     metric = (sin(v)**2*sin(u)**2 + 1)*TensorProduct(dv, dv) +\
>>              (cos(v)**2*cos(u)**2 + 1)*TensorProduct(du, du) +\
>>              (-cos(2*v - 2*u)/8 + cos(2*v + 2*u)/8)*TensorProduct(du, dv)
>> +\
>>              (-cos(2*v - 2*u)/8 + cos(2*v + 2*u)/8)*TensorProduct(dv, du)
>> I can use any of the metric_to_* functions without getting the ValueError.
>>
>> By the way, that metric expression, is from my code. My code produces the
>> correct metric two form expression. But when I use it as argument for any of
>> the metric_to_* functions, I get the ValueError. What gives ?
>>
>> I posted the question on SO :
>>
>>
>> http://stackoverflow.com/questions/33545982/valueerror-using-sympy-diffgeom-when-using-metric-to-functions
>>
>
>
> It is not clear how u, v, du, dv are constructed in your SO question. If you
> could post srepr(u) and srepr(du), it might be possible to say more.
>
> --
> 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/35eb06db-64de-41d2-9b6d-292074724df3%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CAKgW%3D6JKmG6DLfHfADHqZZ6TpZA8rNDGuG24o6J2-rQ7L2Y5eA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to