예제 #1
0
def test_plot_mesh_outline():
    filename = os.path.join("tests", "testdata", "odense_rough.mesh")
    msh = Mesh(filename)
    msh.plot(plot_type="outline_only")
    assert True
    msh.plot(plot_type=None)
    assert True
예제 #2
0
def test_plot_invalid():
    filename = os.path.join("tests", "testdata", "odense_rough.mesh")
    mesh = Mesh(filename)
    with pytest.raises(Exception):
        mesh.plot(plot_type="invalid")
    with pytest.raises(Exception):
        mesh.plot(plot_type="invalid")
예제 #3
0
def test_plot_mesh_part():
    filename = os.path.join("tests", "testdata", "odense_rough.mesh")
    msh = Mesh(filename)

    msh.plot(elements=list(range(0, 100)))

    assert True
예제 #4
0
def test_plot_mesh():
    filename = os.path.join("tests", "testdata", "odense_rough.mesh")
    msh = Mesh(filename)

    msh.plot()

    assert True
예제 #5
0
def test_plot_mesh_ax():
    import matplotlib.pyplot as plt
    filename = os.path.join("tests", "testdata", "odense_rough.mesh")
    msh = Mesh(filename)
    _, ax = plt.subplots()
    msh.plot(ax=ax)
    assert True
예제 #6
0
def test_plot_dfsu_n_refinements():
    filename = os.path.join("tests", "testdata", "FakeLake.dfsu")
    msh = Mesh(filename)
    msh.plot(plot_type="contourf", levels=5, n_refinements=1)
    assert True
예제 #7
0
def test_plot_dfsu_contour_mixedmesh():
    filename = os.path.join("tests", "testdata", "FakeLake.dfsu")
    msh = Mesh(filename)
    msh.plot(plot_type="contour", levels=5)
    assert True