problem in a aariable assignment of new_frame [closed]

asked 2018-09-24 22:45:44 -0500

anonymous user


I encountered unexpected result while studying the usage of the new_frame method. The following script should reproduce the result I got. In this script I assign new_frame to variable f , twice. First assignment works as expected, however, second assignment does not give the expected result, which is shown using the other variable, h.

Is there anyway to update

= cut her =

%display latex ES = Manifold(2, 'ES', latex_name=r'\mathcal{ES}',structure="Riemannian") CC.<x,y> = ES.chart() g=ES.riemannian_metric('g') g[0,0]=1;g[1,1]=1 PC.<r,th> = ES.chart( coordinates=r"r:(0,+oo) th:(-pi,2pi):\theta") PC_to_CC = PC.transition_map(CC, [rcos(th), rsin(th)]) CC_to_PC = CC.transition_map(PC, [sqrt(xx+yy), atan2(y/r,x/r)]) PC_to_CC.set_inverse(sqrt(xx+yy), atan2(y/r,x/r)) CC_to_PC.set_inverse(rcos(th), r*sin(th))

change_frame = ES.automorphism_field() change_frame[CC.frame(),:,CC] = [[cos(th),-sin(th)],[sin(th),cos(th)]] f = CC.frame().new_frame(change_frame, 'f' ); show(f) show(g.display(f,CC)) show(f[0].display(CC.frame(),CC)) show(f[1].display(CC.frame(),CC)) show(f[0].display(e,PC)) show(f[1].display(e,PC)) change_frame_2 = ES.automorphism_field() change_frame_2[CC.frame(),:,CC] = [[cos(th),sin(th)],[-sin(th),cos(th)]] f = CC.frame().new_frame(change_frame_2, 'f') ; h = CC.frame().new_frame(change_frame_2, 'h') ; show(f) show(h) show(g.display(f,CC)) show(f[0].display(CC.frame(),PC)) show(f[1].display(CC.frame(),PC)) show(f[0].display(PC.frame(),PC)) show(f[1].display(PC.frame(),PC)) show(f[0].display(e,PC)) show(f[1].display(e,PC)) show(h[0].display(CC.frame(),PC)) show(h[1].display(CC.frame(),PC)) show(h[0].display(PC.frame(),PC)) show(h[1].display(PC.frame(),PC)) show(h[0].display(e,PC)) show(h[1].display(e,PC))

= cut her =

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by eric_g
close date 2018-09-26 06:47:21.573579


Could you please reformat the code in your question (select it and click on the button 101010) to make it readable? I've tried to run it in a Jupyter notebook, but it turns out that the variable e is not defined as a frame.

eric_g gravatar imageeric_g ( 2018-09-25 09:15:57 -0500 )edit

This is a duplicate of question 43743

eric_g gravatar imageeric_g ( 2018-09-26 06:47:08 -0500 )edit