本文整理匯總了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()