本文整理汇总了Python中ert.enkf.enkf_main.EnKFMain.getEnkfFsManager方法的典型用法代码示例。如果您正苦于以下问题:Python EnKFMain.getEnkfFsManager方法的具体用法?Python EnKFMain.getEnkfFsManager怎么用?Python EnKFMain.getEnkfFsManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ert.enkf.enkf_main.EnKFMain
的用法示例。
在下文中一共展示了EnKFMain.getEnkfFsManager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_with_enkf_fs
# 需要导入模块: from ert.enkf.enkf_main import EnKFMain [as 别名]
# 或者: from ert.enkf.enkf_main.EnKFMain import getEnkfFsManager [as 别名]
def test_with_enkf_fs(self):
config_file = self.createTestPath("Statoil/config/with_data/config")
with TestAreaContext("enkf/summary_key_set/enkf_fs", store_area=True) as context:
context.copy_parent_content(config_file)
fs = EnkfFs("storage/default")
summary_key_set = fs.getSummaryKeySet()
summary_key_set.addSummaryKey("FOPT")
summary_key_set.addSummaryKey("WWCT")
summary_key_set.addSummaryKey("WOPR")
fs.umount()
ert = EnKFMain("config", site_config=None)
fs = ert.getEnkfFsManager().getCurrentFileSystem()
summary_key_set = fs.getSummaryKeySet()
self.assertTrue("FOPT" in summary_key_set)
self.assertTrue("WWCT" in summary_key_set)
self.assertTrue("WOPR" in summary_key_set)
ensemble_config = ert.ensembleConfig()
self.assertTrue("FOPT" in ensemble_config)
self.assertTrue("WWCT" in ensemble_config)
self.assertTrue("WOPR" in ensemble_config)
self.assertFalse("TCPU" in ensemble_config)
示例2: test_run_context
# 需要导入模块: from ert.enkf.enkf_main import EnKFMain [as 别名]
# 或者: from ert.enkf.enkf_main.EnKFMain import getEnkfFsManager [as 别名]
def test_run_context(self):
with TestAreaContext("enkf_test") as work_area:
work_area.copy_directory(self.case_directory)
main = EnKFMain("simple_config/minimum_config")
fs_manager = main.getEnkfFsManager()
fs = fs_manager.getCurrentFileSystem( )
iactive = BoolVector(initial_size = 10 , default_value = True)
iactive[0] = False
iactive[1] = False
run_context = main.getRunContextENSEMPLE_EXPERIMENT( fs , iactive )
self.assertEqual( len(run_context) , 8 )
with self.assertRaises(IndexError):
run_context[8]
with self.assertRaises(TypeError):
run_context["String"]
run_arg = run_context[0]
self.assertTrue( isinstance( run_arg , RunArg ))
with self.assertRaises(ValueError):
run_context.iensGet(0)
with self.assertRaises(ValueError):
run_context.iensGet(1)
arg0 = run_context[0]
arg2 = run_context.iensGet( 2 )
示例3: test_ecl_config_creation
# 需要导入模块: from ert.enkf.enkf_main import EnKFMain [as 别名]
# 或者: from ert.enkf.enkf_main.EnKFMain import getEnkfFsManager [as 别名]
def test_ecl_config_creation(self):
with TestAreaContext("enkf_library_test") as work_area:
work_area.copy_directory(self.case_directory)
main = EnKFMain("simple_config/minimum_config", self.site_config)
self.assertIsInstance(main.analysisConfig(), AnalysisConfig)
self.assertIsInstance(main.eclConfig(), EclConfig)
with self.assertRaises(ValueError): # Null pointer!
self.assertIsInstance(main.eclConfig().getRefcase(), EclSum)
file_system = main.getEnkfFsManager().getCurrentFileSystem()
self.assertEqual(file_system.getCaseName(), "default")
time_map = file_system.getTimeMap()
self.assertIsInstance(time_map, TimeMap)
main.free()
示例4: test_config
# 需要导入模块: from ert.enkf.enkf_main import EnKFMain [as 别名]
# 或者: from ert.enkf.enkf_main.EnKFMain import getEnkfFsManager [as 别名]
def test_config( self ):
with TestAreaContext("enkf_test") as work_area:
work_area.copy_directory(self.case_directory)
main = EnKFMain("simple_config/minimum_config", self.site_config_file)
self.assertIsInstance(main.ensembleConfig(), EnsConfig)
self.assertIsInstance(main.analysisConfig(), AnalysisConfig)
self.assertIsInstance(main.getModelConfig(), ModelConfig)
#self.assertIsInstance(main.local_config(), LocalConfig) #warn: Should this be None?
self.assertIsInstance(main.siteConfig(), SiteConfig)
self.assertIsInstance(main.eclConfig(), EclConfig)
self.assertIsInstance(main.plot_config(), PlotConfig)
# self.main.load_obs(obs_config_file)
self.assertIsInstance(main.getObservations(), EnkfObs)
self.assertIsInstance(main.get_templates(), ErtTemplates)
self.assertIsInstance(main.getEnkfFsManager().getFileSystem(), EnkfFs)
# self.assertIsInstance(main.iget_member_config(0), MemberConfig)
self.assertIsInstance(main.getMemberRunningState(0), EnKFState)
main.free()