Ask Your Question

Display connection coefficients under a change of chart

asked 2019-09-26 21:59:54 +0200

anonymous user


I want to define the connection components as the derivative of a scalar field in one frame and calculate their values in another frame.

M = Manifold(4, 'M', latex_name=r'\mathcal{M}')
X.<t,x,y,z> = M.chart()
U = M.open_subset('U', coord_def={X: (y!=0, x<0)})
X_U = X.restrict(U)
var('l', latex_name='\lambda')
Y.<t,l,th,r> = U.chart(r't:(0,+oo) l:(0,pi) th:(0,2*pi):\theta r:(0,+oo)')
Omega = var('Omega')
transit_Y_to_X = Y.transition_map(X_U, [t, r*cos(th)*cos(l+Omega*t), r*cos(th)*sin(l+Omega*t), r*sin(th)])

nabla = M.affine_connection('nabla', r'\nabla') 
phi = M.scalar_field(function('Phi', latex_name='\Phi')(x, y, z), name='phi', latex_name='\phi')

e = X_U.frame()

nabla[1,0,0] = e[1](phi).expr()


nabla.display(coordinate_labels=False, only_nonredundant=True)

show that the coefficients are good in the X_U chart, but the change of coordinate fail

nabla.display(frame=Y.frame(), chart=Y, coordinate_labels=False, only_nonredundant=True)

What is wrong ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-09-27 12:02:40 +0200

eric_g gravatar image

updated 2019-09-27 17:03:29 +0200

The issue arises because the transition map from chart Y to chart X_U has not been defined. You must implement it as follows, just after the definition of transit_Y_to_X:

transit_Y_to_X.set_inverse(t, atan2(y, x) - Omega*t, atan2(z, sqrt(x^2+y^2)), sqrt(x^2+y^2+z^2), 

Then the display of the connection coefficients w.r.t. Y.frame() works, albeit quite slow (*).

(*) while investing your issue, I've discovered that the computation can be significantly improved by reordering some loops; this is now Trac #28543.

edit flag offensive delete link more


Thanks a lot. I also applied your patch and the computation is much faster. I have a question on the results, but I will ask separately.

CD gravatar imageCD ( 2019-09-27 21:05:26 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-09-26 21:59:54 +0200

Seen: 206 times

Last updated: Sep 27 '19