def __init__(self, model_config, site_config, strict=True): c_ptr = EnKFMain.cNamespace().bootstrap(site_config, model_config, strict, False) super(EnKFMain, self).__init__(c_ptr) self.__simulation_runner = EnkfSimulationRunner(self) self.__fs_manager = EnkfFsManager(self)
def __init__(self, model_config, strict=True): c_ptr = EnKFMain.cNamespace().bootstrap(model_config, strict, False) super(EnKFMain, self).__init__(c_ptr) # The model_config argument can be None; the only reason to # allow that possibility is to be able to test that the # site-config loads correctly. if model_config is None: self.__simulation_runner = None self.__fs_manager = None else: self.__simulation_runner = EnkfSimulationRunner(self) self.__fs_manager = EnkfFsManager(self)
def __init__(self, model_config, strict=True, verbose=True): c_ptr = self._alloc(model_config, strict, verbose) super(EnKFMain, self).__init__(c_ptr) # The model_config argument can be None; the only reason to # allow that possibility is to be able to test that the # site-config loads correctly. if model_config is None: self.__simulation_runner = None self.__fs_manager = None self.__es_update = None else: self.__simulation_runner = EnkfSimulationRunner(self) self.__fs_manager = EnkfFsManager(self) self.__es_update = ESUpdate(self) self.__key_manager = KeyManager(self)
def __init__(self, model_config, strict=True, verbose=True): if model_config is not None and not isfile(model_config): raise IOError('No such configuration file "%s".' % model_config) c_ptr = self._alloc(model_config, strict, verbose) if c_ptr: super(EnKFMain, self).__init__(c_ptr) else: raise ValueError( 'Failed to construct EnKFMain instance from config %s.' % model_config) # The model_config argument can be None; the only reason to # allow that possibility is to be able to test that the # site-config loads correctly. if model_config is None: self.__simulation_runner = None self.__fs_manager = None self.__es_update = None else: self.__simulation_runner = EnkfSimulationRunner(self) self.__fs_manager = EnkfFsManager(self) self.__es_update = ESUpdate(self) self.__key_manager = KeyManager(self)
def createCReference(cls, c_pointer, parent=None): obj = super(EnKFMain, cls).createCReference(c_pointer, parent) obj.__simulation_runner = EnkfSimulationRunner(obj) obj.__fs_manager = EnkfFsManager(obj) return obj