mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4736 GridCaseGroup.py renames
This commit is contained in:
parent
0657bd1f11
commit
8ff0c05760
@ -17,22 +17,22 @@ class GridCaseGroup (PdmObject):
|
|||||||
id (int): Grid Case Group Id corresponding to case group Id in ResInsight project.
|
id (int): Grid Case Group Id corresponding to case group Id in ResInsight project.
|
||||||
name (str): Case name
|
name (str): Case name
|
||||||
"""
|
"""
|
||||||
def __init__(self, pdmObject):
|
def __init__(self, pdm_object):
|
||||||
self.groupId = pdmObject.getValue("GroupId")
|
self.groupId = pdm_object.getValue("GroupId")
|
||||||
PdmObject.__init__(self, pdmObject.pb2Object, pdmObject.channel)
|
PdmObject.__init__(self, pdm_object.pb2Object, pdm_object.channel)
|
||||||
|
|
||||||
def statisticsCases(self):
|
def statistics_cases(self):
|
||||||
"""Get a list of all statistics cases in the Grid Case Group"""
|
"""Get a list of all statistics cases in the Grid Case Group"""
|
||||||
statCaseCollection = self.children("StatisticsCaseCollection")[0]
|
stat_case_collection = self.children("StatisticsCaseCollection")[0]
|
||||||
return statCaseCollection.children("Reservoirs")
|
return stat_case_collection.children("Reservoirs")
|
||||||
|
|
||||||
def views(self):
|
def views(self):
|
||||||
"""Get a list of views belonging to a grid case group"""
|
"""Get a list of views belonging to a grid case group"""
|
||||||
pbmObjects = self.descendants("ReservoirView")
|
pbm_objects = self.descendants("ReservoirView")
|
||||||
viewList = []
|
view_list = []
|
||||||
for pbmObject in pbmObjects:
|
for pbm_object in pbm_objects:
|
||||||
viewList.append(View(pbmObject))
|
view_list.append(View(pbm_object))
|
||||||
return viewList
|
return view_list
|
||||||
|
|
||||||
def view(self, id):
|
def view(self, id):
|
||||||
"""Get a particular view belonging to a case group by providing view id
|
"""Get a particular view belonging to a case group by providing view id
|
||||||
@ -43,7 +43,7 @@ class GridCaseGroup (PdmObject):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
views = self.views()
|
views = self.views()
|
||||||
for viewObject in views:
|
for view_object in views:
|
||||||
if viewObject.id == id:
|
if view_object.id == id:
|
||||||
return viewObject
|
return view_object
|
||||||
return None
|
return None
|
||||||
|
@ -13,7 +13,7 @@ caseGroup = resinsight.project.create_grid_case_group(casePaths=casePaths)
|
|||||||
|
|
||||||
caseGroup.printObjectInfo()
|
caseGroup.printObjectInfo()
|
||||||
|
|
||||||
#statCases = caseGroup.statisticsCases()
|
#statCases = caseGroup.statistics_cases()
|
||||||
#caseIds = []
|
#caseIds = []
|
||||||
#for statCase in statCases:
|
#for statCase in statCases:
|
||||||
# statCase.setValue("DynamicPropertiesToCalculate", ["SWAT"])
|
# statCase.setValue("DynamicPropertiesToCalculate", ["SWAT"])
|
||||||
|
Loading…
Reference in New Issue
Block a user