Esempio n. 1
0
    def test_get_barrier(self):
        layer = Layer(10,10)
        self.assertFalse( layer.leftBarrier(5,5) )
        self.assertFalse( layer.bottomBarrier(5,5) )

        layer.addIJBarrier([(1,1),(2,1),(2,2)])
        self.assertTrue( layer.bottomBarrier(1,1) )
        self.assertTrue( layer.leftBarrier(2,1) )
Esempio n. 2
0
    def test_get_barrier(self):
        layer = Layer(10,10)
        self.assertFalse( layer.leftBarrier(5,5) )
        self.assertFalse( layer.bottomBarrier(5,5) )

        layer.addIJBarrier([(1,1),(2,1),(2,2)])
        self.assertTrue( layer.bottomBarrier(1,1) )
        self.assertTrue( layer.leftBarrier(2,1) )
Esempio n. 3
0
 def test_add_polyline_barrier(self):
     d = 10
     layer = Layer(d,d)
     grid = EclGrid.createRectangular( (d,d,1) , (1,1,1) )
     pl = CPolyline( init_points = [(0 , 0) , (d/2 , d/2) , (d,d)])
     layer.addPolylineBarrier( pl , grid , 0)
     for i in range(d):
         self.assertTrue( layer.bottomBarrier(i,i) )
         if i < (d - 1):
             self.assertTrue( layer.leftBarrier(i+1,i) )
Esempio n. 4
0
 def test_add_polyline_barrier(self):
     d = 10
     layer = Layer(d,d)
     grid = EclGrid.createRectangular( (d,d,1) , (1,1,1) )
     pl = CPolyline( init_points = [(0 , 0) , (d/2 , d/2) , (d,d)])
     layer.addPolylineBarrier( pl , grid , 0)
     for i in range(d):
         self.assertTrue( layer.bottomBarrier(i,i) )
         if i < (d - 1):
             self.assertTrue( layer.leftBarrier(i+1,i) )