Пример #1
0
def test_boundary_step():
    geo = dmsh.Union([dmsh.Circle([-0.5, 0.0], 1.0), dmsh.Circle([+0.5, 0.0], 1.0)])
    geo.show()
    a = geo.boundary_step([-0.5, 0.9])
    assert numpy.array_equal(a, [-0.5, 1.0])

    a = geo.boundary_step([-0.5, 0.6])
    assert numpy.array_equal(a, [-0.5, 1.0])

    a = geo.boundary_step([0.05, 0.05])
    assert_equality(a, [-4.4469961425821203e-01, 9.9846976285554556e-01], 1.0e-10)
Пример #2
0
def test_boundary_step():
    geo = dmsh.Union(
        [dmsh.Circle([-0.5, 0.0], 1.0),
         dmsh.Circle([+0.5, 0.0], 1.0)])
    a = geo.boundary_step([-0.5, 0.9])
    assert np.array_equal(a, [-0.5, 1.0])

    a = geo.boundary_step([-0.5, 0.6])
    assert np.array_equal(a, [-0.5, 1.0])

    a = geo.boundary_step([0.05, 0.05])
    assert_equality(a, [-4.4469961425821203e-01, 9.9846976285554556e-01],
                    1.0e-10)

    pts = np.array([[-5.0, 0.0], [4.1, 0.0]])
    pts = geo.boundary_step(pts.T).T
    ref = np.array([[-1.5, 0.0], [1.5, 0.0]])
    assert np.all(np.abs(pts - ref) < 1.0e-10)

    pts = np.array([[-0.9, 0.0], [1.1, 0.0]])
    pts = geo.boundary_step(pts.T).T
    ref = np.array([[-1.5, 0.0], [1.5, 0.0]])
    assert np.all(np.abs(pts - ref) < 1.0e-10)
def test():
    assert_equality(plot, "test_image_plot_lower_reference.tex")
    return
Пример #4
0
def test():
    assert_equality(plot, "test_colorbars_reference.tex", assert_compilation=False)
Пример #5
0
def test():
    assert_equality(plot, "test_annotate_reference.tex")
    return
Пример #6
0
def test():
    assert_equality(plot, "test_histogram_reference.tex")
    return
Пример #7
0
def test():
    assert_equality(plot, "test_basic_sin_reference.tex", table_row_sep="\\\\\n")
    return
Пример #8
0
def test():
    assert_equality(plot, "test_errorband_reference.tex")
    return
def test():
    assert_equality(plot, __file__[:-3] + "_reference.tex")
    return
def test():
    assert_equality(plot, "test_barchart_errorbars_reference.tex")
    return
Пример #11
0
def test():
    assert_equality(plot, "test_histogram_reference.tex")
    return
Пример #12
0
def test():
    assert_equality(plot, "test_escape_chars_reference.tex")
    return
Пример #13
0
def test():
    assert_equality(plot,
                    "test_basic_sin_reference.tex",
                    table_row_sep="\\\\\n")
    return
Пример #14
0
def test():
    assert_equality(plot, "test_legend_best_location_reference.tex")
    return
Пример #15
0
def test():
    assert_equality(plot, "test_errorband_reference.tex")
    return
def test():
    assert_equality(plot, "test_externalize_tables_reference.tex")
    return
Пример #17
0
def test():
    assert_equality(plot, "test_fancy_colorbar_reference.tex")
    return
def test():
    assert_equality(plot, "test_externalize_tables_reference.tex")
    return
Пример #19
0
def test():
    assert_equality(plot, "test_dual_axis_reference.tex")
    return
Пример #20
0
def test():
    assert_equality(plot, "test_fancybox_reference.tex")
    return
def test():
    assert_equality(plot, "test_image_plot_lower_reference.tex")
    return
Пример #22
0
def test():
    assert_equality(plot, "test_barchart_legend_reference.tex")
    return
Пример #23
0
def test():
    assert_equality(plot, "test_dual_axis_reference.tex")
    return
Пример #24
0
def test():
    assert_equality(plot, "test_colorbars_reference.tex")
    return
def test():
    assert_equality(plot, "test_legend_best_location_reference.tex")
    return
def test():
    assert_equality(plot, "test_horizontal_alignment_reference.tex")
Пример #27
0
def test():
    assert_equality(plot, __file__[:-3] + "_reference.tex", flavor="context")
    return
Пример #28
0
def test():
    assert_equality(plot, "test_hatch_reference.tex")
Пример #29
0
def test():
    assert_equality(plot, "test_fillstyle_reference.tex")
    return
Пример #30
0
def test():
    assert_equality(plot, "test_boxplot_reference.tex")
    return
Пример #31
0
def test():
    assert_equality(plot, "test_fillstyle_reference.tex")
    return
def test():
    assert_equality(plot, "test_barchart_errorbars_reference.tex")
    return
Пример #33
0
def test():
    assert_equality(plot, "test_line_set_data_reference.tex")
    return
def test():
    assert_equality(plot, "test_legend_columns_reference.tex")
    return
def test():
    assert_equality(plot, "test_custom_collection_reference.tex")
    return
Пример #36
0
def test():
    assert_equality(plot, "test_basic_sin_reference.tex")
    return
Пример #37
0
def test():
    assert_equality(plot, "test_fancybox_reference.tex")
    return