本文整理汇总了Python中ert.util.BoolVector.createFromList方法的典型用法代码示例。如果您正苦于以下问题:Python BoolVector.createFromList方法的具体用法?Python BoolVector.createFromList怎么用?Python BoolVector.createFromList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ert.util.BoolVector
的用法示例。
在下文中一共展示了BoolVector.createFromList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initializeCurrentCaseFromExisting
# 需要导入模块: from ert.util import BoolVector [as 别名]
# 或者: from ert.util.BoolVector import createFromList [as 别名]
def initializeCurrentCaseFromExisting(source_case, target_case, source_report_step, parameters, members):
if caseExists(source_case) and caseIsInitialized(source_case) and caseExists(target_case):
total_member_count = getRealizationCount()
member_mask = BoolVector.createFromList(total_member_count, members)
selected_parameters = StringList(parameters)
ERT.ert.getEnkfFsManager().customInitializeCurrentFromExistingCase(source_case, source_report_step, member_mask,
selected_parameters)
ERT.emitErtChange()
示例2: buttonTriggered
# 需要导入模块: from ert.util import BoolVector [as 别名]
# 或者: from ert.util.BoolVector import createFromList [as 别名]
def buttonTriggered(self):
source_case = InitializedCaseSelectorModel().getCurrentChoice()
source_report_step = HistoryLengthModel().getSpinnerValue()
selected_members = InitializationMembersModel().getSelectedItems()
total_member_count = EnsembleSizeModel().getSpinnerValue()
member_mask = BoolVector.createFromList(total_member_count, selected_members)
selected_parameters = StringList((InitializationParametersModel()).getSelectedItems())
self.ert().getEnkfFsManager().customInitializeCurrentFromExistingCase(source_case, source_report_step, member_mask, selected_parameters)
self.observable().notify(ButtonModelMixin.BUTTON_TRIGGERED_EVENT)
示例3: buttonTriggered
# 需要导入模块: from ert.util import BoolVector [as 别名]
# 或者: from ert.util.BoolVector import createFromList [as 别名]
def buttonTriggered(self):
source_case = InitializedCaseSelectorModel().getCurrentChoice()
source_report_step = HistoryLengthModel().getSpinnerValue()
source_state = EnkfStateType.ANALYZED
selected_members = InitializationMembersModel().getSelectedItems()
total_member_count = EnsembleSizeModel().getSpinnerValue()
member_mask = BoolVector.createFromList(total_member_count, selected_members)
ranking_key = None
selected_parameters = StringList((InitializationParametersModel()).getSelectedItems())
# print("%s %d %d %s %s" % (source_case, source_report_step, int(source_state), str(selected_members), str(selected_parameters)))
self.ert().initializeFromExistingCase(source_case, source_report_step, source_state, member_mask, ranking_key, selected_parameters)
self.observable().notify(ButtonModelMixin.BUTTON_TRIGGERED_EVENT)
示例4: runEnsembleExperiment
# 需要导入模块: from ert.util import BoolVector [as 别名]
# 或者: from ert.util.BoolVector import createFromList [as 别名]
def runEnsembleExperiment(self, member_list, total_member_count):
member_mask = BoolVector.createFromList(total_member_count, member_list)
EnKFMain.cNamespace().run_exp(self, member_mask, True, 0, 0, EnkfStateType.ANALYZED, True)