Simplify Python API

This commit is contained in:
Gaute Lindkvist
2020-03-04 15:11:24 +01:00
parent bd8e079e24
commit c23e27eef0
7 changed files with 9 additions and 62 deletions

View File

@@ -9,19 +9,6 @@ import rips.case # Circular import of Case, which already imports View. Use ful
from rips.pdmobject import add_method
from rips.generated.pdm_objects import View, ViewWindow, EclipseView, GeoMechView
@add_method(View)
def is_eclipse_view(self):
return isinstance(self, EclipseView)
@add_method(View)
def is_geomech_view(self):
return isinstance(self, GeoMechView)
@add_method(View)
def cell_result(self):
"""Retrieve the current cell results"""
return self.children("GridCellResult")[0]
@add_method(View)
def apply_cell_result(self, result_type, result_variable):
"""Apply a regular cell result