Skip to content

Commit

Permalink
ERT-700: Removed superfluos FaultBlockCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
joakim-hove committed Aug 15, 2014
1 parent d05c064 commit b426325
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 172 deletions.
43 changes: 0 additions & 43 deletions devel/libecl/include/ert/ecl/fault_block_collection.h

This file was deleted.

1 change: 0 additions & 1 deletion devel/libecl/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ set( source_files
ecl_nnc_export.c
layer.c
fault_block_layer.c
fault_block_collection.c
${ext_source})

set( header_files
Expand Down
103 changes: 0 additions & 103 deletions devel/libecl/src/fault_block_collection.c

This file was deleted.

8 changes: 0 additions & 8 deletions devel/libecl/tests/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,6 @@ add_executable( ecl_fault_block_layer ecl_fault_block_layer.c )
target_link_libraries( ecl_fault_block_layer ecl test_util )
add_test( ecl_fault_block_layer ${EXECUTABLE_OUTPUT_PATH}/ecl_fault_block_layer )

add_executable( ecl_fault_block_collection_statoil ecl_fault_block_collection_statoil.c )
target_link_libraries( ecl_fault_block_collection_statoil ecl test_util )
add_test( ecl_fault_block_collection_statoil ${EXECUTABLE_OUTPUT_PATH}/ecl_fault_block_collection_statoil
${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID
${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/faultblock.grdecl)


set_property( TEST ecl_fault_block_collection_statoil PROPERTY LABELS StatoilData )
set_property( TEST ecl_fault_block_layer_statoil PROPERTY LABELS StatoilData )
set_property( TEST ecl_fmt PROPERTY LABELS StatoilData )
set_property( TEST ecl_coarse_test PROPERTY LABELS StatoilData )
Expand Down
2 changes: 1 addition & 1 deletion devel/python/python/ert/ecl/faults/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ set(PYTHON_SOURCES
__init__.py
fault_block.py
fault_block_layer.py
fault_block_collection.py
fault_collection.py
fault.py
fault_line.py
fault_segments.py
region_definition.py
layer.py
)

add_python_package("python.ert.ecl.faults" ${PYTHON_INSTALL_PREFIX}/ert/ecl/faults "${PYTHON_SOURCES}" True)
2 changes: 1 addition & 1 deletion devel/python/python/ert/ecl/faults/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from .layer import Layer
from .fault_collection import FaultCollection
from .fault import Fault
from .fault_line import FaultLine
from .fault_segments import FaultSegment , SegmentMap
from .fault_block import FaultBlock , FaultBlockCell
from .fault_block_layer import FaultBlockLayer
from .fault_block_collection import FaultBlockCollection
from .region_definition import RegionDefinition
36 changes: 21 additions & 15 deletions devel/python/test/ert_tests/ecl/test_fault_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,8 @@
from unittest import skipIf

from ert.ecl import EclGrid, EclTypeEnum , EclKW , EclRegion
from ert.test import ExtendedTestCase
from ert.ecl.faults import FaultBlock, FaultBlockLayer, FaultBlockCollection, FaultBlockCell

def create_FaultBlock():
grid = EclGrid.create_rectangular( (10,10,10) , (1,1,1) )
return FaultBlock(grid , 0 , 0)
from ert.test import ExtendedTestCase , TestAreaContext
from ert.ecl.faults import FaultBlock, FaultBlockLayer, FaultBlockCell


class FaultBlockTest(ExtendedTestCase):
Expand Down Expand Up @@ -191,16 +187,26 @@ def test_fault_block_layer(self):



def test_fault_block_collection(self):
collection = FaultBlockCollection( self.grid )
self.assertTrue( len(collection) , self.grid.getNZ() )
fault_block.assignToRegion( 1 )
self.assertEqual( [1,2,3] , list(fault_block.getRegionList()))

fault_block.assignToRegion( 2 )
self.assertEqual( [1,2,3] , list(fault_block.getRegionList()))



def test_fault_block_layer_export(self):
layer = FaultBlockLayer( self.grid , 1 )
kw1 = EclKW.create( "FAULTBLK" , self.grid.size + 1 , EclTypeEnum.ECL_INT_TYPE )
with self.assertRaises(ValueError):
layer.exportKeyword( kw1 )

kw2 = EclKW.create( "FAULTBLK" , self.grid.size , EclTypeEnum.ECL_FLOAT_TYPE )
with self.assertRaises(TypeError):
layer.exportKeyword(kw2)



layer_list = []
for layer in collection:
layer_list.append( layer )

for k in range(self.grid.getNZ()):
self.assertEqual( collection[k], collection.getLayer(k) )

self.assertTrue( len(layer_list) , self.grid.getNZ() )

Expand Down

0 comments on commit b426325

Please sign in to comment.