From 71832983bc2dbb0df1a31e88a5a9b0113b1eb7a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9?= Date: Thu, 22 Apr 2010 14:57:42 +0200 Subject: [PATCH] - Ajout de la phase de calcul --- bin/DatassimYacsSchemaCreator.py | 1 + resources/DATASSIMSchemaCatalog.xml | 12 ++++++++++++ .../daYacsSchemaCreator/infos_daComposant.py | 3 ++- src/daSalome/daYacsSchemaCreator/methods.py | 12 +++++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/bin/DatassimYacsSchemaCreator.py b/bin/DatassimYacsSchemaCreator.py index 46e7d52..2f16117 100644 --- a/bin/DatassimYacsSchemaCreator.py +++ b/bin/DatassimYacsSchemaCreator.py @@ -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 diff --git a/resources/DATASSIMSchemaCatalog.xml b/resources/DATASSIMSchemaCatalog.xml index 1b3c79c..18077f5 100644 --- a/resources/DATASSIMSchemaCatalog.xml +++ b/resources/DATASSIMSchemaCatalog.xml @@ -73,11 +73,13 @@ else: assim_study.setObservationOperatorType(ObservationOperatorType) assim_study.setObservationOperator(ObservationOperator) +Study = assim_study ]]> + @@ -106,4 +108,14 @@ print "Vector is", vector + + + + + diff --git a/src/daSalome/daYacsSchemaCreator/infos_daComposant.py b/src/daSalome/daYacsSchemaCreator/infos_daComposant.py index 25efba6..019cea3 100644 --- a/src/daSalome/daYacsSchemaCreator/infos_daComposant.py +++ b/src/daSalome/daYacsSchemaCreator/infos_daComposant.py @@ -45,4 +45,5 @@ AssimAlgos = ["Blue", "EnsembleBlue", "Kalman", "LinearLeastSquares", "3DVAR"] AlgoDataRequirements = {} AlgoDataRequirements["Blue"] = ["Background", "BackgroundError", "Observation", "ObservationOperator", "ObservationError"] - +AlgoType = {} +AlgoType["Blue"] = "Direct" diff --git a/src/daSalome/daYacsSchemaCreator/methods.py b/src/daSalome/daYacsSchemaCreator/methods.py index 2fb7cee..b07119f 100644 --- a/src/daSalome/daYacsSchemaCreator/methods.py +++ b/src/daSalome/daYacsSchemaCreator/methods.py @@ -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 -- 2.39.2