Exemple #1
0
import pytest

from einsteinpy.symbolic import MetricTensor
from einsteinpy.symbolic.predefined import AntiDeSitter, AntiDeSitterStatic, DeSitter


@pytest.mark.parametrize(
    "metric_instance",
    [AntiDeSitter(), AntiDeSitterStatic(),
     DeSitter()])
def test_all_predefined_metrics(metric_instance):
    assert isinstance(metric_instance, MetricTensor)
Exemple #2
0
    KerrNewman,
    Minkowski,
    MinkowskiCartesian,
    MinkowskiPolar,
    ReissnerNordstorm,
    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(),
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"
mink = AntiDeSitter()
t = mink.tensor()
pprint(t)
### @end
assert isinstance(sch, einsteinpy.symbolic.metric.MetricTensor)
snippets['AntiDeSitter'] = latex(t)

### "Ricci-curvatures"