From: André Ribes Date: Thu, 24 Jun 2010 15:30:13 +0000 (+0200) Subject: Blue -> Optim ok X-Git-Tag: V6_4_0rc3~130 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b2939a25f58d286c2aca1f64406cfd7296531b26;p=modules%2Fadao.git Blue -> Optim ok --- diff --git a/resources/ADAOSchemaCatalog.xml b/resources/ADAOSchemaCatalog.xml index e3ac589..012e83b 100644 --- a/resources/ADAOSchemaCatalog.xml +++ b/resources/ADAOSchemaCatalog.xml @@ -71,8 +71,8 @@ except NameError: else: #print "ObservationOperator is", ObservationOperator #print "ObservationOperatorType is", ObservationOperatorType - assim_study.setObservationOperatorType(ObservationOperatorType) - assim_study.setObservationOperator(ObservationOperator) + assim_study.setObservationOperatorType("Matrix", ObservationOperatorType) + assim_study.setObservationOperator("Matrix", ObservationOperator) ObservationOperatorOk = 1 if ObservationOperatorOk == 0: diff --git a/src/daSalome/daYacsSchemaCreator/infos_daComposant.py b/src/daSalome/daYacsSchemaCreator/infos_daComposant.py index beaf528..7e7c2b1 100644 --- a/src/daSalome/daYacsSchemaCreator/infos_daComposant.py +++ b/src/daSalome/daYacsSchemaCreator/infos_daComposant.py @@ -54,5 +54,6 @@ AlgoDataRequirements["Blue"] = ["Background", "BackgroundError", AlgoDataRequirements["3DVAR"] = ["Background", "BackgroundError", "Observation", "ObservationOperator", "ObservationError"] AlgoType = {} -AlgoType["Blue"] = "Direct" +#AlgoType["Blue"] = "Direct" +AlgoType["Blue"] = "Optim" AlgoType["3DVAR"] = "Optim" diff --git a/src/daSalome/daYacsSchemaCreator/methods.py b/src/daSalome/daYacsSchemaCreator/methods.py index 17e4ea1..a3c8fa6 100644 --- a/src/daSalome/daYacsSchemaCreator/methods.py +++ b/src/daSalome/daYacsSchemaCreator/methods.py @@ -180,8 +180,17 @@ def create_yacs_proc(study_config): proc.edAddDFLink(opt_script_node.getOutputPort("result"), optimizer_node.edGetPortForOutPool()) else: - logging.fatal("Fake optim script node currently not implemented") - sys.exit(1) + factory_opt_script_node = catalogAd._nodeMap["FakeOptimizerLoopNode"] + opt_script_node = factory_opt_script_node.cloneNode("FakeFunctionNode") + + # Add it + computation_bloc = runtime.createBloc("computation_bloc") + optimizer_node.edSetNode(computation_bloc) + computation_bloc.edAddChild(opt_script_node) + + # We connect Optimizer with the script + proc.edAddDFLink(optimizer_node.edGetSamplePort(), opt_script_node.getInputPort("computation")) + proc.edAddDFLink(opt_script_node.getOutputPort("result"), optimizer_node.edGetPortForOutPool()) # Step 4: create post-processing from user configuration if "Analysis" in study_config.keys():