当前位置: 首页>>代码示例>>Python>>正文


Python EclGrid.save_EGRID方法代码示例

本文整理汇总了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)
开发者ID:,项目名称:,代码行数:18,代码来源:

示例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))
开发者ID:,项目名称:,代码行数:19,代码来源:

示例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))
开发者ID:,项目名称:,代码行数:42,代码来源:


注:本文中的ecl.grid.EclGrid.save_EGRID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。