# metric to christoffel symbols yielding overflow

In a Sage 9.1 Jupyter notebook I tried the following SageManifolds commands

M = Manifold(4, 'M', structure='Lorentzian')

Mani.<t,X,rh,ph> = M.chart(r"t X:(-oo,+oo) rh:(0,+oo):\rho ph:(0,2*pi):\phi")

B = function('B')(X,rh,ph)
d_Ph_X = function('d_Ph_X')(X,rh,ph)
d_Ph_rh = function('d_Ph_rh')(X,rh,ph)
d_Ph_ph = function('d_Ph_ph')(X,rh,ph)

g = M.metric()

g[0,0] = (-1+B**2*  ((d_Ph_X/B**2)**2 +(d_Ph_rh/B**2)**2 +((1/rh*d_Ph_ph/B**2)**2     )))

g[1,1] = B**2
g[2,2] = B**2
g[3,3] = rh**2*B**2

g[0,1] = B**2*(d_Ph_X/B**2)
g[0,2] = B**2*( d_Ph_rh/B**2)
g[0,3] = B**2*( d_Ph_ph/B**2)

g.christoffel_symbols_display()


The last line makes the notebook overflow... i really don't understand why.

the computation, even if it is rather tedious, seems straightforward to me...

Any idea? Any help would be greatly appreciated.

edit retag close merge delete

Sort by ยป oldest newest most voted

You should simplify $g_{00}$ in the input, via

g[0,0] = (-1+B**2*  ((d_Ph_X/B**2)**2 +(d_Ph_rh/B**2)**2 +((1/rh*d_Ph_ph/B**2)**2     ))).simplify_full()


Then it works: the Christoffel symbols are displayed in 2 min on my computer.

more

thx a lot for your time/insight! actually it did not work on my computer with sage 9.1 and it did work on the 1st attempt with sage 8.9, something really is different with 9.1 i guess... by the way using sage 8.9 also enabled me to retrieve all my .sws which were completely impossible to load on sage 9.1... life is strange sometimes ;) --> i now am a happy sage 8.9 user

( 2020-09-25 19:54:26 +0200 )edit

For me, it works well with Sage 9.1. Maybe something is weird with your Sage 9.1 install? How did you install it?

( 2020-09-25 21:41:05 +0200 )edit

Regarding the .sws issue: you should take the opportunity of having a running Sage 8.9 to convert all your *.sws files to *.ipynb (Jupyter format). See this post.

( 2020-09-25 21:45:39 +0200 )edit

@eric_g --> I installed it via conda

conda install mamba -c conda-forge # installs mamba

mamba create -n sage sage -c conda-forge # replaces "conda create..."

indeed you're right about the converting process that i should follow, thx I just found out that doing what you said indeed enabled the computation on my computer. without any modification of the memory available for sage. However a rather small modification of this metric does not work even with simplify_full, whereas it does with sage 8.9 (yielding "unreasonably" long expressions ^^)

( 2020-09-26 18:22:41 +0200 )edit

## g.display()

g.christoffel_symbols_display()

( 2020-09-26 20:05:34 +0200 )edit