]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
- Ajout de la phase de calcul
authorAndré <andre.ribes@edf.fr>
Thu, 22 Apr 2010 12:57:42 +0000 (14:57 +0200)
committerAndré <andre.ribes@edf.fr>
Thu, 22 Apr 2010 12:57:42 +0000 (14:57 +0200)
bin/DatassimYacsSchemaCreator.py
resources/DATASSIMSchemaCatalog.xml
src/daSalome/daYacsSchemaCreator/infos_daComposant.py
src/daSalome/daYacsSchemaCreator/methods.py

index 46e7d52c5de099d0b1fd776f7949ccca081d5d96..2f16117d5cc1fc6ad4d80ce719c2311f0821e892 100644 (file)
@@ -39,6 +39,7 @@ try:
 except:
   logging.fatal("Import of DATASSIM python modules failed !" +
                 "\n add DATASSIM python installation directory in your PYTHONPATH")
+  traceback.print_exc()
   sys.exit(1)
 
 # Parse arguments
index 1b3c79c83bb8cfedcace5f1d811f28c46039a4c9..18077f5071c3bc8bafdff6c01e4dfd54f77dddf5 100644 (file)
@@ -73,11 +73,13 @@ else:
   assim_study.setObservationOperatorType(ObservationOperatorType)
   assim_study.setObservationOperator(ObservationOperator)
 
+Study = assim_study
 ]]>
 
 </code></script>
     <inport name="Name" type="string"/>
     <inport name="Algorithm" type="string"/>
+    <outport name="Study" type="pyobj"/>
   </inline>
 
   <inline name="CreateNumpyMatrixFromString">
@@ -106,4 +108,14 @@ print "Vector is", vector
     <outport name="type" type="string"/>
   </inline>
 
+  <inline name="SimpleExecuteDirectAlgorithm">
+    <script><code><![CDATA[
+print "Entering in SimpleExecuteDirectAlgorithm"
+from daYacsIntegration.daStudy import *
+ADD = Study.getAssimilationStudy()
+ADD.analyze()
+]]></code></script>
+    <inport name="Study" type="pyobj"/>
+    <outport name="Study" type="pyobj"/>
+  </inline>
 </proc>
index 25efba645135f8b89d604a026da8d358feaecec5..019cea3df4634e94fef9ab5d250fb816f07a07ce 100644 (file)
@@ -45,4 +45,5 @@ AssimAlgos = ["Blue", "EnsembleBlue", "Kalman", "LinearLeastSquares", "3DVAR"]
 AlgoDataRequirements = {}
 AlgoDataRequirements["Blue"] = ["Background", "BackgroundError",
                                 "Observation", "ObservationOperator", "ObservationError"]
-
+AlgoType = {}
+AlgoType["Blue"] = "Direct"
index 2fb7ceeb824552243c97fb7530f0f934706caadf..b07119f61d0fbeecccf8c02a9f4d52e4da6508f5 100644 (file)
@@ -91,7 +91,17 @@ def create_yacs_proc(study_config):
         proc.edAddDFLink(back_node.getOutputPort("type"), CAS_node.getInputPort(key_type))
 
 
-  # Step 3: create optimizer loop
+  # Step 3: create compute bloc
+  compute_bloc = runtime.createBloc("compute_bloc")
+  proc.edAddChild(compute_bloc)
+  proc.edAddCFLink(CAS_node, compute_bloc)
+
+  if AlgoType[study_config["Algorithm"]] == "Direct":
+    # We don't need to use an optimizer loop
+    factory_execute_node = catalogAd._nodeMap["SimpleExecuteDirectAlgorithm"]
+    execute_node = factory_execute_node.cloneNode("Execute" + study_config["Algorithm"])
+    compute_bloc.edAddChild(execute_node)
+    proc.edAddDFLink(CAS_node.getOutputPort("Study"), execute_node.getInputPort("Study"))
 
   # Step 4: create post-processing from user configuration