From 79d61321d3b54e2c9122842081dfdad54c81d7b4 Mon Sep 17 00:00:00 2001 From: GERALD NICOLAS Date: Wed, 29 Aug 2018 15:23:52 +0200 Subject: [PATCH] SetCurrentStudy --> UpdateStudy --- doc/files/tutorial_1.py | 2 +- doc/files/tutorial_2.py | 2 +- doc/files/tutorial_3.py | 2 +- doc/files/tutorial_4.py | 2 +- doc/files/tutorial_5.py | 2 +- doc/files/tutorial_6.py | 6 +++--- src/tests/Test/test_1.py | 4 ++-- src/tests/Test/test_2.py | 4 ++-- src/tests/Test/test_3.py | 4 ++-- src/tests/Test/test_4.py | 4 ++-- src/tests/Test/test_5.py | 4 ++-- src/tests/Test/test_6.py | 4 ++-- src/tests/Test/tutorial_1.py | 12 ++++++------ src/tests/Test/tutorial_2.py | 11 ++++++----- src/tests/Test/tutorial_3.py | 13 +++++++------ src/tests/Test/tutorial_4.py | 15 +++++++++------ src/tests/Test/tutorial_5.py | 15 +++++++++------ src/tests/Test/tutorial_6.py | 13 +++++++++---- 18 files changed, 66 insertions(+), 53 deletions(-) diff --git a/doc/files/tutorial_1.py b/doc/files/tutorial_1.py index 6131df6a..11bd3210 100755 --- a/doc/files/tutorial_1.py +++ b/doc/files/tutorial_1.py @@ -22,7 +22,7 @@ Exemple de couplage HOMARD-Salome Copyright EDF 1996, 2010, 2018 """ -__revision__ = "V3.1" +__revision__ = "V3.2" # import os import sys diff --git a/doc/files/tutorial_2.py b/doc/files/tutorial_2.py index 9a351357..adf59575 100755 --- a/doc/files/tutorial_2.py +++ b/doc/files/tutorial_2.py @@ -24,7 +24,7 @@ Exemple de couplage HOMARD-Salome Copyright EDF 1996, 2010, 2018 """ -__revision__ = "V3.01" +__revision__ = "V3.02" # import os import sys diff --git a/doc/files/tutorial_3.py b/doc/files/tutorial_3.py index 22eba2b1..f3f1a558 100755 --- a/doc/files/tutorial_3.py +++ b/doc/files/tutorial_3.py @@ -24,7 +24,7 @@ Exemple de couplage HOMARD-Salome Copyright EDF 1996, 2010, 2018 """ -__revision__ = "V3.1" +__revision__ = "V3.2" # import os import sys diff --git a/doc/files/tutorial_4.py b/doc/files/tutorial_4.py index 02b05e2a..c3dfcb29 100755 --- a/doc/files/tutorial_4.py +++ b/doc/files/tutorial_4.py @@ -24,7 +24,7 @@ Exemple de couplage HOMARD-Salome Copyright EDF 1996, 2011, 2018 """ -__revision__ = "V4.2" +__revision__ = "V4.3" # import os import sys diff --git a/doc/files/tutorial_5.py b/doc/files/tutorial_5.py index fdb7ea5d..cddc08d5 100755 --- a/doc/files/tutorial_5.py +++ b/doc/files/tutorial_5.py @@ -24,7 +24,7 @@ Exemple de couplage HOMARD-Salome Copyright EDF 1996, 2010, 2018 """ -__revision__ = "V3.2" +__revision__ = "V3.3" # import os import sys diff --git a/doc/files/tutorial_6.py b/doc/files/tutorial_6.py index c4644020..3084ccd6 100755 --- a/doc/files/tutorial_6.py +++ b/doc/files/tutorial_6.py @@ -24,7 +24,7 @@ Exemple de couplage HOMARD-Salome Copyright EDF 1996, 2011, 2018 """ -__revision__ = "V4.4" +__revision__ = "V4.5" # import os import sys @@ -48,7 +48,7 @@ salome.salome_init() import HOMARD # homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD") -homard.SetCurrentStudy(salome.myStudy) +homard.UpdateStudy() # #============================= Début des commandes ============================= # @@ -122,4 +122,4 @@ gzip_gunzip(DATA_TUTORIAL, 6, 1) # ================================== if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/tests/Test/test_1.py b/src/tests/Test/test_1.py index ca1a4c93..f437e889 100755 --- a/src/tests/Test/test_1.py +++ b/src/tests/Test/test_1.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_1 """ -__revision__ = "V4.03" +__revision__ = "V4.04" #======================================================================== TEST_NAME = "test_1" @@ -61,7 +61,7 @@ Python script for HOMARD # while not error : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Creation of the zones # ===================== diff --git a/src/tests/Test/test_2.py b/src/tests/Test/test_2.py index ad6cff7f..846f691f 100755 --- a/src/tests/Test/test_2.py +++ b/src/tests/Test/test_2.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_2 """ -__revision__ = "V4.03" +__revision__ = "V4.04" #======================================================================== TEST_NAME = "test_2" @@ -61,7 +61,7 @@ Python script for HOMARD # while not error : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Creation of the boundaries # ========================== diff --git a/src/tests/Test/test_3.py b/src/tests/Test/test_3.py index 87175a93..9b1b9790 100755 --- a/src/tests/Test/test_3.py +++ b/src/tests/Test/test_3.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_3 """ -__revision__ = "V4.04" +__revision__ = "V4.05" #======================================================================== TEST_NAME = "test_3" @@ -62,7 +62,7 @@ Python script for HOMARD # while not error : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Creation of the boundaries # ========================== diff --git a/src/tests/Test/test_4.py b/src/tests/Test/test_4.py index ddb7d7d1..242dfb65 100755 --- a/src/tests/Test/test_4.py +++ b/src/tests/Test/test_4.py @@ -21,7 +21,7 @@ Python script for HOMARD Test test_4 """ -__revision__ = "V3.03" +__revision__ = "V3.04" #======================================================================== TEST_NAME = "test_4" @@ -184,7 +184,7 @@ Python script for HOMARD # while not error : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Creation of the zones # ===================== diff --git a/src/tests/Test/test_5.py b/src/tests/Test/test_5.py index 125a9626..18032506 100755 --- a/src/tests/Test/test_5.py +++ b/src/tests/Test/test_5.py @@ -22,7 +22,7 @@ Python script for HOMARD Specific conditions for Code_Saturne Test test_5 """ -__revision__ = "V2.03" +__revision__ = "V2.04" #======================================================================== TEST_NAME = "test_5" @@ -232,7 +232,7 @@ Python script for HOMARD # while not error : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Creation of the hypothese DISTANCE INVERSE # ========================================== diff --git a/src/tests/Test/test_6.py b/src/tests/Test/test_6.py index 9f062dbf..e11917d7 100755 --- a/src/tests/Test/test_6.py +++ b/src/tests/Test/test_6.py @@ -22,7 +22,7 @@ Python script for HOMARD Test test_6 """ -__revision__ = "V1.05" +__revision__ = "V1.06" #======================================================================== TEST_NAME = "test_6" @@ -217,7 +217,7 @@ Python script for HOMARD # while not erreur : # - HOMARD.UpdateStudy() + #HOMARD.UpdateStudy() # # Frontière # ========= diff --git a/src/tests/Test/tutorial_1.py b/src/tests/Test/tutorial_1.py index e8105bce..54ccc615 100755 --- a/src/tests/Test/tutorial_1.py +++ b/src/tests/Test/tutorial_1.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_1 associe au tutorial 1 """ -__revision__ = "V4.04" +__revision__ = "V4.05" #======================================================================== TEST_NAME = "tutorial_1" @@ -30,11 +30,9 @@ N_ITER_TEST_FILE = 3 #======================================================================== import os import sys -import HOMARD -import salome # # ================================== -PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR') +PATH_HOMARD = os.getenv("HOMARD_ROOT_DIR") # Repertoire des scripts utilitaires REP_PYTHON = os.path.join(PATH_HOMARD, "bin", "salome", "test", "HOMARD") REP_PYTHON = os.path.normpath(REP_PYTHON) @@ -52,8 +50,10 @@ from tutorial_util import gzip_gunzip # ================================== gzip_gunzip(DATA_TUTORIAL, 1, -1) # ================================== - +# +import salome salome.salome_init() +import HOMARD import iparameters IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1)) IPAR.append("AP_MODULES_LIST", "Homard") @@ -70,7 +70,7 @@ Python script for HOMARD # while not erreur : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Hypotheses # ========== diff --git a/src/tests/Test/tutorial_2.py b/src/tests/Test/tutorial_2.py index 7f89207c..9be1fd8c 100755 --- a/src/tests/Test/tutorial_2.py +++ b/src/tests/Test/tutorial_2.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_2 associe au tutorial 2 """ -__revision__ = "V4.04" +__revision__ = "V4.05" #======================================================================== TEST_NAME = "tutorial_2" @@ -30,8 +30,6 @@ N_ITER_TEST_FILE = 2 #======================================================================== import os import sys -import HOMARD -import salome # # ================================== PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR') @@ -52,8 +50,11 @@ from tutorial_util import gzip_gunzip # ================================== gzip_gunzip(DATA_TUTORIAL, 2, -1) # ================================== - +# +import salome salome.salome_init() +import HOMARD +# import iparameters IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1)) IPAR.append("AP_MODULES_LIST", "Homard") @@ -70,7 +71,7 @@ Python script for HOMARD # while not erreur : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Creation des zones # ================== diff --git a/src/tests/Test/tutorial_3.py b/src/tests/Test/tutorial_3.py index ae8e1535..d51a5492 100755 --- a/src/tests/Test/tutorial_3.py +++ b/src/tests/Test/tutorial_3.py @@ -21,7 +21,7 @@ Python script for HOMARD Test tutorial_3 associe au tutorial 3 """ -__revision__ = "V4.04" +__revision__ = "V4.05" #======================================================================== TEST_NAME = "tutorial_3" @@ -30,8 +30,6 @@ N_ITER_TEST_FILE = 2 #======================================================================== import os import sys -import HOMARD -import salome # # ================================== PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR') @@ -52,8 +50,11 @@ from tutorial_util import gzip_gunzip # ================================== gzip_gunzip(DATA_TUTORIAL, 3, -1) # ================================== - +# +import salome salome.salome_init() +import HOMARD +# import iparameters IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1)) IPAR.append("AP_MODULES_LIST", "Homard") @@ -70,7 +71,7 @@ Python script for HOMARD # while not erreur : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Hypotheses # ========== @@ -209,7 +210,7 @@ if ERREUR: # ================================== gzip_gunzip(DATA_TUTORIAL, 3, 1) # ================================== -# + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/tutorial_4.py b/src/tests/Test/tutorial_4.py index 61ee052c..ef052ea6 100755 --- a/src/tests/Test/tutorial_4.py +++ b/src/tests/Test/tutorial_4.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- + # Copyright (C) 2011-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or @@ -17,11 +18,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + """ Python script for HOMARD Test tutorial_4 associe au tutorial 4 """ -__revision__ = "V5.03" +__revision__ = "V5.04" #======================================================================== TEST_NAME = "tutorial_4" @@ -30,8 +32,6 @@ N_ITER_TEST_FILE = 3 #======================================================================== import os import sys -import HOMARD -import salome # # ================================== PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR') @@ -52,8 +52,11 @@ from tutorial_util import gzip_gunzip # ================================== gzip_gunzip(DATA_TUTORIAL, 4, -1) # ================================== - +# +import salome salome.salome_init() +import HOMARD +# import iparameters IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1)) IPAR.append("AP_MODULES_LIST", "Homard") @@ -70,7 +73,7 @@ Python script for HOMARD # while not erreur : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Frontières # ========== @@ -192,7 +195,7 @@ if ERREUR: # ================================== gzip_gunzip(DATA_TUTORIAL, 4, 1) # ================================== -# + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/tutorial_5.py b/src/tests/Test/tutorial_5.py index 499a195f..daa8931b 100755 --- a/src/tests/Test/tutorial_5.py +++ b/src/tests/Test/tutorial_5.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- + # Copyright (C) 2011-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or @@ -17,11 +18,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + """ Python script for HOMARD Test tutorial_5 associe au tutorial 5 """ -__revision__ = "V4.04" +__revision__ = "V4.05" #======================================================================== TEST_NAME = "tutorial_5" @@ -30,8 +32,6 @@ N_ITER_TEST_FILE = 2 #======================================================================== import os import sys -import HOMARD -import salome # # ================================== PATH_HOMARD = os.getenv('HOMARD_ROOT_DIR') @@ -52,8 +52,11 @@ from tutorial_util import gzip_gunzip # ================================== gzip_gunzip(DATA_TUTORIAL, 5, -1) # ================================== - +# +import salome salome.salome_init() +import HOMARD +# import iparameters IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1)) IPAR.append("AP_MODULES_LIST", "Homard") @@ -70,7 +73,7 @@ Python script for HOMARD # while not erreur : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Frontiere # ========= @@ -182,7 +185,7 @@ if ERREUR: # ================================== gzip_gunzip(DATA_TUTORIAL, 5, 1) # ================================== -# + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) diff --git a/src/tests/Test/tutorial_6.py b/src/tests/Test/tutorial_6.py index 433a7c84..3f8c36c3 100755 --- a/src/tests/Test/tutorial_6.py +++ b/src/tests/Test/tutorial_6.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- + # Copyright (C) 2011-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or @@ -17,11 +18,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + """ Python script for HOMARD Test tutorial_6 associe au tutorial 6 """ -__revision__ = "V4.04" +__revision__ = "V4.05" #======================================================================== TEST_NAME = "tutorial_6" @@ -53,8 +55,11 @@ from tutorial_util import gzip_gunzip gzip_gunzip(DATA_TUTORIAL, 4, -1) gzip_gunzip(DATA_TUTORIAL, 6, -1) # ================================== - +# +import salome salome.salome_init() +import HOMARD +# import iparameters IPAR = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1)) IPAR.append("AP_MODULES_LIST", "Homard") @@ -71,7 +76,7 @@ Python script for HOMARD # while not erreur : # - HOMARD.UpdateStudy() + # HOMARD.UpdateStudy() # # Frontières # ========== @@ -207,7 +212,7 @@ if ERREUR: gzip_gunzip(DATA_TUTORIAL, 4, 1) gzip_gunzip(DATA_TUTORIAL, 6, 1) # ================================== -# + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() iparameters.getSession().restoreVisualState(1) -- 2.30.2