本文整理汇总了Python中ecl.grid.EclGrid.save_EGRID方法的典型用法代码示例。如果您正苦于以下问题:Python EclGrid.save_EGRID方法的具体用法?Python EclGrid.save_EGRID怎么用?Python EclGrid.save_EGRID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ecl.grid.EclGrid
的用法示例。
在下文中一共展示了EclGrid.save_EGRID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_coarse
# 需要导入模块: from ecl.grid import EclGrid [as 别名]
# 或者: from ecl.grid.EclGrid import save_EGRID [as 别名]
def test_coarse(self):
#work_area = TestArea("python/grid-test/testCoarse")
with TestAreaContext("python/grid-test/testCoarse"):
testGRID = True
g1 = EclGrid(self.createTestPath("Statoil/ECLIPSE/LGCcase/LGC_TESTCASE2.EGRID"))
g1.save_EGRID("LGC.EGRID")
g2 = EclGrid("LGC.EGRID")
self.assertTrue(g1.equal(g2, verbose=True))
if testGRID:
g1.save_GRID("LGC.GRID")
g3 = EclGrid("LGC.GRID")
self.assertTrue(g1.equal(g3, verbose=True))
self.assertTrue(g1.coarse_groups() == 3384)
示例2: test_save
# 需要导入模块: from ecl.grid import EclGrid [as 别名]
# 或者: from ecl.grid.EclGrid import save_EGRID [as 别名]
def test_save(self):
with TestAreaContext("python/grid-test/testSave"):
g1 = EclGrid(self.egrid_file())
g1.save_EGRID("test.EGRID")
g2 = EclGrid("test.EGRID")
self.assertTrue(g1.equal(g2))
g1.save_GRID("test.GRID")
g2 = EclGrid("test.GRID")
self.assertTrue(g1.equal(g2))
fileH = copen("test.grdecl", "w")
g1.save_grdecl(fileH)
fileH.close()
g2 = self.create("test.grdecl")
self.assertTrue(g1.equal(g2))
示例3: test_dual
# 需要导入模块: from ecl.grid import EclGrid [as 别名]
# 或者: from ecl.grid.EclGrid import save_EGRID [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))