示例#1
0
def test_meshline_overlaps():
    m1 = Meshline(0, 1, constant_value=0.5, axis=1)
    m2 = Meshline(0, 2, constant_value=0.5, axis=1)
    m3 = Meshline(0.5, 1.5, constant_value=0.5, axis=1)
    m4 = Meshline(0.5, 1.5, constant_value=0.5, axis=0)
    m5 = Meshline(0.5, 1.5, constant_value=0.4, axis=1)

    assert m1.overlaps(m2)
    assert m1.overlaps(m3)
    assert not m1.overlaps(m4)
    assert not m1.overlaps(m5)
示例#2
0
def test_meshline_overlaps_disjoint():
    m1 = Meshline(start=0, stop=2, constant_value=3, axis=0)
    m2 = Meshline(start=5, stop=6, constant_value=3, axis=0)

    assert not m1.overlaps(m2)