本文整理汇总了Python中ecl.grid.EclGrid.get_active_fracture_index方法的典型用法代码示例。如果您正苦于以下问题:Python EclGrid.get_active_fracture_index方法的具体用法?Python EclGrid.get_active_fracture_index怎么用?Python EclGrid.get_active_fracture_index使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ecl.grid.EclGrid
的用法示例。
在下文中一共展示了EclGrid.get_active_fracture_index方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_dual
# 需要导入模块: from ecl.grid import EclGrid [as 别名]
# 或者: from ecl.grid.EclGrid import get_active_fracture_index [as 别名]
def test_dual(self):
with TestAreaContext("python/grid-test/testDual"):
grid = EclGrid(self.egrid_file())
self.assertFalse(grid.dualGrid())
self.assertTrue(grid.getNumActiveFracture() == 0)
grid2 = EclGrid(self.grid_file())
self.assertFalse(grid.dualGrid())
self.assertTrue(grid.getNumActiveFracture() == 0)
dgrid = EclGrid(self.createTestPath("Statoil/ECLIPSE/DualPoro/DUALPOR_MSW.EGRID"))
self.assertTrue(dgrid.getNumActive() == dgrid.getNumActiveFracture())
self.assertTrue(dgrid.getNumActive() == 46118)
dgrid2 = EclGrid(self.createTestPath("Statoil/ECLIPSE/DualPoro/DUALPOR_MSW.GRID"))
self.assertTrue(dgrid.getNumActive() == dgrid.getNumActiveFracture())
self.assertTrue(dgrid.getNumActive() == 46118)
self.assertTrue(dgrid.equal(dgrid2))
# The DUAL_DIFF grid has been manipulated to create a
# situation where some cells are only matrix active, and some
# cells are only fracture active.
dgrid = EclGrid(self.createTestPath("Statoil/ECLIPSE/DualPoro/DUAL_DIFF.EGRID"))
self.assertTrue(dgrid.getNumActive() == 106)
self.assertTrue(dgrid.getNumActiveFracture() == 105)
self.assertTrue(dgrid.get_active_fracture_index(global_index=0) == -1)
self.assertTrue(dgrid.get_active_fracture_index(global_index=2) == -1)
self.assertTrue(dgrid.get_active_fracture_index(global_index=3) == 0)
self.assertTrue(dgrid.get_active_fracture_index(global_index=107) == 104)
self.assertTrue(dgrid.get_active_index(global_index=1) == 1)
self.assertTrue(dgrid.get_active_index(global_index=105) == 105)
self.assertTrue(dgrid.get_active_index(global_index=106) == -1)
self.assertTrue(dgrid.get_global_index1F(2) == 5)
dgrid.save_EGRID("DUAL_DIFF.EGRID")
dgrid2 = EclGrid("DUAL_DIFF.EGRID")
self.assertTrue(dgrid.equal(dgrid2 , verbose = True))