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)
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
def test(): assert_equality(plot, "test_colorbars_reference.tex", assert_compilation=False)
def test(): assert_equality(plot, "test_annotate_reference.tex") return
def test(): assert_equality(plot, "test_histogram_reference.tex") return
def test(): assert_equality(plot, "test_basic_sin_reference.tex", table_row_sep="\\\\\n") return
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
def test(): assert_equality(plot, "test_escape_chars_reference.tex") return
def test(): assert_equality(plot, "test_legend_best_location_reference.tex") return
def test(): assert_equality(plot, "test_externalize_tables_reference.tex") return
def test(): assert_equality(plot, "test_fancy_colorbar_reference.tex") return
def test(): assert_equality(plot, "test_dual_axis_reference.tex") return
def test(): assert_equality(plot, "test_fancybox_reference.tex") return
def test(): assert_equality(plot, "test_barchart_legend_reference.tex") return
def test(): assert_equality(plot, "test_colorbars_reference.tex") return
def test(): assert_equality(plot, "test_horizontal_alignment_reference.tex")
def test(): assert_equality(plot, __file__[:-3] + "_reference.tex", flavor="context") return
def test(): assert_equality(plot, "test_hatch_reference.tex")
def test(): assert_equality(plot, "test_fillstyle_reference.tex") return
def test(): assert_equality(plot, "test_boxplot_reference.tex") return
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
def test(): assert_equality(plot, "test_basic_sin_reference.tex") return