import sympy
from einsteinpy.symbolic import ChristoffelSymbols, RiemannCurvatureTensor
from einsteinpy.symbolic.predefined import Schwarzschild
sympy.init_printing()
sch = Schwarzschild()
sch.tensor()
sch_inv = sch.inv()
sch_inv.tensor()
sch.order
sch.config
chr = ChristoffelSymbols.from_metric(sch_inv) # can be initialized from sch also
chr.tensor()
chr.config
new_chr = chr.change_config('lll') # changing the configuration to (covariant, covariant, covariant)
new_chr.tensor()
new_chr.config
new_chr2 = new_chr.change_config('lul')
new_chr2.tensor()
rm = RiemannCurvatureTensor.from_christoffels(new_chr2)
rm[0,0,:,:]
rm.config
rm2 = rm.change_config("uuuu")
rm2[0,0,:,:]
rm3 = rm2.change_config("lulu")
rm3[0,0,:,:]
rm4 = rm3.change_config("ulll")
rm4.simplify()
rm4[0,0,:,:]
rm
and rm4
are same as they have the same configuration¶