-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split test: test_grid_statoil split into 4 tests.
- Loading branch information
1 parent
1f05183
commit 9fab2ea
Showing
5 changed files
with
148 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright (C) 2018 Statoil ASA, Norway. | ||
# | ||
# The file 'test_grid_statoil_coarse.py' is part of ERT - Ensemble based Reservoir Tool. | ||
# | ||
# ERT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# ERT is distributed in the hope that it will be useful, but WITHOUT ANY | ||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. | ||
# | ||
# See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> | ||
# for more details. | ||
import math | ||
|
||
from ecl.util.test import TestAreaContext | ||
from ecl.grid import EclGrid | ||
|
||
from tests import EclTest, statoil_test | ||
|
||
|
||
@statoil_test() | ||
class GridCoarceTest(EclTest): | ||
|
||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Copyright (C) 2018 Statoil ASA, Norway. | ||
# | ||
# The file 'test_grid_statoil_dual.py' is part of ERT - Ensemble based Reservoir Tool. | ||
# | ||
# ERT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# ERT is distributed in the hope that it will be useful, but WITHOUT ANY | ||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. | ||
# | ||
# See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> | ||
# for more details. | ||
import math | ||
|
||
from ecl.util.test import TestAreaContext | ||
from ecl.grid import EclGrid | ||
|
||
from tests import EclTest, statoil_test | ||
|
||
@statoil_test() | ||
class GridDualTest(EclTest): | ||
|
||
def egrid_file(self): | ||
return self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID") | ||
|
||
def grid_file(self): | ||
return self.createTestPath("Statoil/ECLIPSE/Gurbat/ECLIPSE.GRID") | ||
|
||
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (C) 2018 Statoil ASA, Norway. | ||
# | ||
# The file 'test_grid_statoil_large_case.py' is part of ERT - Ensemble based Reservoir Tool. | ||
# | ||
# ERT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# ERT is distributed in the hope that it will be useful, but WITHOUT ANY | ||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
# FITNESS FOR A PARTICULAR PURPOSE. | ||
# | ||
# See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> | ||
# for more details. | ||
import math | ||
|
||
from ecl.util.test import TestAreaContext | ||
from ecl.grid import EclGrid | ||
|
||
from tests import EclTest, statoil_test | ||
|
||
|
||
@statoil_test() | ||
class GridLargeCaseTest(EclTest): | ||
|
||
def test_large_case(self): | ||
grdecl_file = self.createTestPath("Statoil/ECLIPSE/1.6.0_issueGrdecl/test_aug2016_gridOnly.grdecl") | ||
grid = EclGrid.loadFromGrdecl( grdecl_file ) |