Schwarzschild, ) @pytest.mark.parametrize( "metric_instance", [ AlcubierreWarp(), AntiDeSitter(), AntiDeSitterStatic(), DeSitter(), Schwarzschild(), Schwarzschild(c=1, sch=2), Kerr(), KerrNewman(), Minkowski(), MinkowskiCartesian(), MinkowskiPolar(), CMetric(), Davidson(), Godel(), BesselGravitationalWave(), BarriolaVilekin(), BertottiKasner(), Ernst(), JanisNewmanWinicour(), ReissnerNordstorm(), ], ) def test_all_predefined_metrics(metric_instance): assert isinstance(metric_instance, MetricTensor)
def test_Minkowski_equality(): # Minkowski and MinkowskiCartesian are same assert simplify_sympy_array( MinkowskiCartesian().tensor()) == simplify_sympy_array( Minkowski().tensor())
### "custom-pprint" def pprint(expr): # unicode doesn't always play nicely with LaTeX sympy.pprint(expr, use_unicode=False) ### "Schwarzschild" sch = Schwarzschild() t = sch.tensor() pprint(t) ### @end assert isinstance(sch, einsteinpy.symbolic.metric.MetricTensor) snippets['Schwarzschild'] = latex(t) ### "Minkowski" mink = Minkowski(c=1) t = mink.tensor() pprint(t) ### @end assert isinstance(sch, einsteinpy.symbolic.metric.MetricTensor) snippets['Minkowski'] = latex(t) ### "DeSitter" mink = DeSitter() t = mink.tensor() pprint(t) ### @end assert isinstance(sch, einsteinpy.symbolic.metric.MetricTensor) snippets['DeSitter'] = latex(t) ### "AntiDeSitter"