]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Blue -> Optim ok
authorAndré Ribes <andre.ribes@edf.fr>
Thu, 24 Jun 2010 15:30:13 +0000 (17:30 +0200)
committerAndré Ribes <andre.ribes@edf.fr>
Thu, 24 Jun 2010 15:30:13 +0000 (17:30 +0200)
resources/ADAOSchemaCatalog.xml
src/daSalome/daYacsSchemaCreator/infos_daComposant.py
src/daSalome/daYacsSchemaCreator/methods.py

index e3ac589dca9a72267d9b74c72cfdb45b809a5c28..012e83bb08c59debbddf893fa301bf3e21907bce 100644 (file)
@@ -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:
index beaf528bc9c2989df122fc326f80ebd372139941..7e7c2b1557120543b0853798ca18e022e5693cae 100644 (file)
@@ -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"
index 17e4ea1b9c11d46745e12f6beda42b5ee58d8331..a3c8fa66f9ab30f8afa67d4c94cba058de8948ac 100644 (file)
@@ -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():