#4430 Add python method to get coarsening info for case.

Equivalent to GetCoarseningInfo in Octave.
This commit is contained in:
Kristian Bendiksen
2020-02-20 21:40:43 +01:00
parent d497f04d0d
commit 8167d9f700
5 changed files with 70 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
###################################################################################
# This example will connect to ResInsight, retrieve a list of cases and print info
#
#
###################################################################################
# Import the ResInsight Processing Server Module
@@ -19,11 +19,16 @@ if resinsight is not None:
print("Case type: " + case.type)
print("Case grid path: " + case.grid_path())
print("Case reservoir bounding box:", case.reservoir_boundingbox())
timesteps = case.time_steps()
for t in timesteps:
print("Year: " + str(t.year))
print("Month: " + str(t.month))
coarsening_info = case.coarsening_info()
if coarsening_info:
print("Coarsening information:")
for c in coarsening_info:
print("[{}, {}, {}] - [{}, {}, {}]".format(c.min.x, c.min.y, c.min.z,
c.max.x, c.max.y, c.max.z))