mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Simplify Python API
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user