def test_add_polyline_barrier2(self): grid = EclGrid.createRectangular((10, 10, 1), (1, 1, 1)) layer = FaultBlockLayer(self.grid, 0) polyline = Polyline(init_points=[(0.1, 0.9), (8.9, 0.9), (8.9, 8.9)]) points = [ ((0, 0), (0, 1)), ((2, 0), (2, 1)), ((4, 0), (4, 1)), ((6, 0), (6, 1)), ((8, 0), (8, 1)), # ((8, 1), (9, 1)), ((8, 3), (9, 3)), ((8, 5), (9, 5)), ((8, 7), (9, 7)) ] geo_layer = layer.getGeoLayer() for p1, p2 in points: self.assertTrue(geo_layer.cellContact(p1, p2)) layer.addPolylineBarrier(polyline) for p1, p2 in points: print(p1, p2) self.assertFalse(geo_layer.cellContact(p1, p2))
def test_add_polyline_barrier1(self): grid = EclGrid.createRectangular((4, 1, 1), (1, 1, 1)) layer = FaultBlockLayer(self.grid, 0) polyline = Polyline(init_points=[(1.99, 0.001), (2.01, 0.99)]) points = [((1, 0), (2, 0))] geo_layer = layer.getGeoLayer() for p1, p2 in points: self.assertTrue(geo_layer.cellContact(p1, p2)) layer.addPolylineBarrier(polyline) for p1, p2 in points: print(p1, p2) self.assertFalse(geo_layer.cellContact(p1, p2))