2019-05-20 13:21:02 +02:00
|
|
|
import sys
|
|
|
|
|
import os
|
2019-06-03 21:11:27 +02:00
|
|
|
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
|
|
|
|
import rips
|
2019-05-20 13:21:02 +02:00
|
|
|
|
2019-06-03 21:11:27 +02:00
|
|
|
resInsight = rips.Instance.find()
|
2019-05-20 13:21:02 +02:00
|
|
|
|
2019-06-03 14:33:16 +02:00
|
|
|
case = resInsight.project.case(id = 0)
|
|
|
|
|
|
|
|
|
|
cellCounts = case.cellCount()
|
2019-05-22 16:03:03 +02:00
|
|
|
print("Number of active cells: " + str(cellCounts.active_cell_count))
|
|
|
|
|
|
2019-06-03 14:33:16 +02:00
|
|
|
activeCellInfoChunks = case.cellInfoForActiveCells()
|
2019-05-20 13:21:02 +02:00
|
|
|
|
|
|
|
|
#print("Number of grids: " + str(gridCount))
|
|
|
|
|
#print(gridDimensions)
|
|
|
|
|
|
|
|
|
|
receivedActiveCells = []
|
|
|
|
|
for activeCellChunk in activeCellInfoChunks:
|
|
|
|
|
for activeCell in activeCellChunk.data:
|
|
|
|
|
receivedActiveCells.append(activeCell)
|
2019-05-22 16:03:03 +02:00
|
|
|
|
|
|
|
|
assert(cellCounts.active_cell_count == len(receivedActiveCells))
|
2019-05-20 13:21:02 +02:00
|
|
|
print("First active cell: ")
|
|
|
|
|
print(receivedActiveCells[0])
|