Salome HOME
mise a jour pour la poursuite d'iterations
authornicolas <nicolas>
Mon, 8 Apr 2013 15:35:35 +0000 (15:35 +0000)
committernicolas <nicolas>
Mon, 8 Apr 2013 15:35:35 +0000 (15:35 +0000)
66 files changed:
doc/files/tutorial_1.py
doc/files/tutorial_2.py
doc/files/tutorial_3.py
doc/files/tutorial_4.py
doc/files/tutorial_5.py
doc/gui_create_case.rst
doc/images/homard_2.png
doc/images/intro_331.png [new file with mode: 0644]
doc/images/pursue_case_1.png [new file with mode: 0644]
doc/images/pursue_case_2.png [new file with mode: 0644]
doc/images/pursue_case_3.png [new file with mode: 0644]
doc/intro.rst
doc/tui_create_case.rst
doc/tui_create_iteration.rst
doc/tutorials.rst
idl/HOMARD_Cas.idl
idl/HOMARD_Gen.idl
idl/HOMARD_Iteration.idl
resources/Makefile.am
resources/iter_poursuite.png [new file with mode: 0644]
src/HOMARD/HOMARD_Boundary.cxx
src/HOMARD/HOMARD_Boundary.hxx
src/HOMARD/HOMARD_Cas.cxx
src/HOMARD/HOMARD_Cas.hxx
src/HOMARD/HOMARD_DriverTools.cxx
src/HOMARD/HOMARD_Gen.cxx
src/HOMARD/HOMARD_Gen.hxx
src/HOMARD/HOMARD_Hypothesis.cxx
src/HOMARD/HOMARD_Hypothesis.hxx
src/HOMARD/HOMARD_Iteration.cxx
src/HOMARD/HOMARD_Iteration.hxx
src/HOMARD/HOMARD_Zone.cxx
src/HOMARD/HOMARD_Zone.hxx
src/HOMARD/HomardDriver.cxx
src/HOMARD/HomardDriver.hxx
src/HOMARDGUI/CreateCase.h
src/HOMARDGUI/CreateCase.ui
src/HOMARDGUI/HOMARDGUI.cxx
src/HOMARDGUI/HOMARD_msg_en.ts
src/HOMARDGUI/HOMARD_msg_fr.ts
src/HOMARDGUI/Makefile.am
src/HOMARDGUI/MonCreateBoundaryAn.cxx
src/HOMARDGUI/MonCreateCase.cxx
src/HOMARDGUI/MonCreateIteration.cxx
src/HOMARDGUI/MonEditCase.cxx
src/HOMARDGUI/MonEditFile.cxx
src/HOMARDGUI/MonEditIteration.cxx
src/HOMARDGUI/MonEditIteration.h
src/HOMARDGUI/MonIterInfo.cxx
src/HOMARDGUI/MonMeshInfo.cxx
src/HOMARDGUI/MonPursueIteration.cxx [new file with mode: 0644]
src/HOMARDGUI/MonPursueIteration.h [new file with mode: 0644]
src/HOMARDGUI/PursueIteration.h [new file with mode: 0644]
src/HOMARDGUI/PursueIteration.ui [new file with mode: 0644]
src/HOMARD_I/HOMARD_Boundary_i.cxx
src/HOMARD_I/HOMARD_Cas_i.cxx
src/HOMARD_I/HOMARD_Cas_i.hxx
src/HOMARD_I/HOMARD_Gen_i.cxx
src/HOMARD_I/HOMARD_Gen_i.hxx
src/HOMARD_I/HOMARD_Hypothesis_i.cxx
src/HOMARD_I/HOMARD_Iteration_i.cxx
src/HOMARD_I/HOMARD_Iteration_i.hxx
src/HOMARD_I/HomardMedCommun.cxx
tests/test_1.py
tests/test_2.py
tests/test_3.py

index aa43b0982c3ee654492aded61993e91560643190..4e553d1cd3bb748f7815f82286f6bac950b46d7a 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.4"
+__revision__ = "V1.5"
 #
 import os
 #
@@ -69,21 +69,21 @@ Iter_0 = Case_1.NextIteration('Iter_0')
 Iter_0.SetMeshName('MESH')
 Iter_0.SetMeshFile(dircase+'/maill.01.med')
 Iter_0.AssociateHypo('Hypo_0')
-codret = Iter_0.Compute(1)
+codret = Iter_0.Compute(1, 2)
 
 # Iteration "Iter_1"
 Iter_1 = Iter_0.NextIteration('Iter_1')
 Iter_1.SetMeshName('MESH')
 Iter_1.SetMeshFile(dircase+'/maill.02.med')
 Iter_1.AssociateHypo('Hypo_0')
-codret = Iter_1.Compute(1)
+codret = Iter_1.Compute(1, 2)
 
 # Iteration "Iter_2"
 Iter_2 = Iter_1.NextIteration('Iter_2')
 Iter_2.SetMeshName('MESH')
 Iter_2.SetMeshFile(dircase+'/maill.03.med')
 Iter_2.AssociateHypo('Hypo_0')
-codret = Iter_2.Compute(1)
+codret = Iter_2.Compute(1, 2)
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index b0747cecd70cb3419daf1a8f1ac46c76992801be..34ff6b3faa1caaa61fbe94bea3243a2d4f2f50d5 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.5"
+__revision__ = "V1.6"
 #
 import os
 #
@@ -87,7 +87,7 @@ Iter_0 = Case_1.NextIteration('Iter_0')
 Iter_0.SetMeshName('M_1')
 Iter_0.SetMeshFile(dircase+'/maill.01.med')
 Iter_0.AssociateHypo('Hypo_0')
-codret = Iter_0.Compute(1)
+codret = Iter_0.Compute(1, 2)
 #
 # Iteration "Iter_1"
 # ==================
@@ -95,7 +95,7 @@ Iter_1 = Iter_0.NextIteration('Iter_1')
 Iter_1.SetMeshName('M_2')
 Iter_1.SetMeshFile(dircase+'/maill.02.med')
 Iter_1.AssociateHypo('Hypo_1')
-codret = Iter_1.Compute(1)
+codret = Iter_1.Compute(1, 2)
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index c98ee03c97596fc206d4f5fa73fdbbd48984b700..4aa2d0f2174c89e938f5f2c55690050b27f742c1 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.5"
+__revision__ = "V1.6"
 #
 import os
 #
@@ -105,7 +105,7 @@ Iter_1.SetMeshFile(dircase+'/maill.01.med')
 Iter_1.SetFieldFile(data_dir+'/tutorial_3.00.med')
 Iter_1.SetTimeStepRank( 1, 1)
 Iter_1.AssociateHypo('Hypo_0vers1')
-codret = Iter_1.Compute(1)
+codret = Iter_1.Compute(1, 2)
 #
 # Iteration "Iter_2"
 # ==================
@@ -115,7 +115,7 @@ Iter_2.SetMeshFile(dircase+'/maill.02.med')
 Iter_2.SetFieldFile(data_dir+'/tutorial_3.01.med')
 Iter_2.SetTimeStepRank(1, 1)
 Iter_2.AssociateHypo('Hypo_1vers2')
-codret = Iter_2.Compute(1)
+codret = Iter_2.Compute(1, 2)
 #
 # Iteration "Iter_2_bis"
 # ======================
@@ -125,7 +125,7 @@ Iter_2_bis.SetMeshFile(dircase+'/maill.02.bis.med')
 Iter_2_bis.SetFieldFile(data_dir+'/tutorial_3.01.med')
 Iter_2_bis.SetTimeStepRank(1, 1)
 Iter_2_bis.AssociateHypo('Hypo_1vers2_bis')
-codret = Iter_2_bis.Compute(1)
+codret = Iter_2_bis.Compute(1, 2)
 #
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index c4af7b9a05a81964e7b8e9a8d4dd97882231b989..3dbaeb91de4f9a6c5750eb4d5a0d7e900588342b 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2011, 2013
 """
-__revision__ = "V2.1"
+__revision__ = "V2.2"
 #
 import os
 #
@@ -97,19 +97,19 @@ Iter_1 = Case.NextIteration('Iter_1')
 Iter_1.SetMeshName('PIQUAGE_1')
 Iter_1.SetMeshFile(dircase+'/maill.01.med')
 Iter_1.AssociateHypo('Hypo_1')
-codret = Iter_1.Compute(1)
+codret = Iter_1.Compute(1, 2)
 # Creation of the iteration Iter_2 : raffinement selon les faces externes
 Iter_2 = Iter_1.NextIteration('Iter_2')
 Iter_2.SetMeshName('PIQUAGE_2')
 Iter_2.SetMeshFile(dircase+'/maill.02.med')
 Iter_2.AssociateHypo('Hypo_2')
-codret = Iter_2.Compute(1)
+codret = Iter_2.Compute(1, 2)
 # Creation of the iteration Iter_3 : second raffinement selon les faces externes
 Iter_3 = Iter_2.NextIteration('Iter_3')
 Iter_3.SetMeshName('PIQUAGE_3')
 Iter_3.SetMeshFile(dircase+'/maill.03.med')
 Iter_3.AssociateHypo('Hypo_2')
-codret = Iter_3.Compute(1)
+codret = Iter_3.Compute(1, 2)
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index 488e7a6294cfb07e2460e034cb7cf377af17ddbc..a0dc708cd957a5fdfa08c88c3c7cba11afb194e8 100644 (file)
@@ -24,7 +24,7 @@
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.4"
+__revision__ = "V1.5"
 #
 import os
 #
@@ -87,7 +87,7 @@ Iter_1 = Case_1.NextIteration('Iter_1')
 Iter_1.SetMeshName('COEUR_2D_01')
 Iter_1.SetMeshFile(dircase+'/maill.01.med')
 Iter_1.AssociateHypo('Hypo_1')
-codret = Iter_1.Compute(1)
+codret = Iter_1.Compute(1, 2)
 #
 # Iteration "Iter_2"
 # ==================
@@ -95,7 +95,7 @@ Iter_2 = Iter_1.NextIteration('Iter_2')
 Iter_2.SetMeshName('COEUR_2D_02')
 Iter_2.SetMeshFile(dircase+'/maill.02.med')
 Iter_2.AssociateHypo('Hypo_2')
-codret = Iter_2.Compute(1)
+codret = Iter_2.Compute(1, 2)
 
 
 if salome.sg.hasDesktop():
index e1dcac0979ce7e7849dd35c0e243aaf167208860..ed0fd6ac981f99f84e8bfab2d53076a921d12b01 100644 (file)
@@ -1,7 +1,7 @@
 .. _gui_create_case:
 
-Le cas
-======
+La création d'un cas
+====================
 .. index:: single: cas
 
 La définition du cas se fait par la donnée des informations suivantes :
@@ -100,6 +100,43 @@ Par d
 
 Si le maillage initial comporte des pyramides, il y a arrêt en erreur. Toutefois, si on est certain que les raffinements ultérieurs ne toucheront aucune des arêtes des pyramides, on cochera la case "Pyramides autorisées". Les adaptations se dérouleront normalement et les pyramides seront restituées telles quelles dans le maillage final.
 
+
+La poursuite d'un cas
+=====================
+.. index:: single: poursuite
+
+La poursuite d'un cas correspond Ã  la situation suivante :
+Une série d'adaptations ont Ã©té conduites sur un cas puis Salome est fermé. On a gardé les répertoires de travail de ces itérations. On souhaite ensuite reprendre ces itérations pour les poursuivre là où on s'est arrêté. Cette fonctionnalité est particulièrement utile dans le cas de schémas YACS pour lesquels on scinde en plusieurs parties une longue série d'adaptations.
+
+La condition pour reprendre une itération est d'avoir conservé dans un même répertoire deux fichiers :
+   - le fichier de configuration qui a servi de données au module exécutable de HOMARD ; ce fichier se présente sous la forme ``HOMARD.Configuration.(n).vers.(n+1)``
+   - le fichier au format MED qui conserve l'historique des adaptations réalisées ; ce fichier se présente sous la forme ``maill.(n).hom.med``
+
+On peut choisir de partir d'une itération archivée désignée explicitement par son répertoire ou d'une itération repérée dans le répertoire archivant un cas.
+
+Pour poursuivre une itération connue par son répertoire d'archive, la définition du cas se fait par la donnée des informations suivantes :
+
+  - Un nom
+  - Un répertoire
+  - Le répertoire qui contient les archives
+
+.. image:: images/pursue_case_1.png
+   :align: center
+
+On peut choisir de partir d'un cas déjà calculé ; par défaut, le nouveau cas sera créé en partant de la dernière itération précédemment calculée.
+
+.. image:: images/pursue_case_2.png
+   :align: center
+
+Si on souhaite partir d'une itération qui ne soit pas la dernière, il suffit de le préciser :
+
+.. image:: images/pursue_case_3.png
+   :align: center
+
+.. note::
+  Les paramétrages du cas ainsi créé sont ceux de l'itération poursuivie : mode de conformité identique par exemple.
+
+
 L'arbre d'étude
 """""""""""""""
 A l'issue de cette création de cas, l'arbre d'études a Ã©té enrichi de ce nouveau cas. On y trouve l'itération initiale, identifiée par le nom du maillage qui a Ã©té lu dans le fichier fourni.
index 336a918e989051c21bea0f147807f9f11a39e0b7..8ec729578b435aadf2c1d66d00133cb9f07ea87c 100644 (file)
Binary files a/doc/images/homard_2.png and b/doc/images/homard_2.png differ
diff --git a/doc/images/intro_331.png b/doc/images/intro_331.png
new file mode 100644 (file)
index 0000000..ba34e38
Binary files /dev/null and b/doc/images/intro_331.png differ
diff --git a/doc/images/pursue_case_1.png b/doc/images/pursue_case_1.png
new file mode 100644 (file)
index 0000000..7158970
Binary files /dev/null and b/doc/images/pursue_case_1.png differ
diff --git a/doc/images/pursue_case_2.png b/doc/images/pursue_case_2.png
new file mode 100644 (file)
index 0000000..ac3cd9d
Binary files /dev/null and b/doc/images/pursue_case_2.png differ
diff --git a/doc/images/pursue_case_3.png b/doc/images/pursue_case_3.png
new file mode 100644 (file)
index 0000000..f0f8f6f
Binary files /dev/null and b/doc/images/pursue_case_3.png differ
index 5964b53f6c88c422db5ad4c0c8f2fbc14c4e17af..3dc61b45a9207c9c6a993e8709ce26edc9a45e06 100644 (file)
@@ -48,7 +48,7 @@ Des variantes de ce sch
 .. note::
   Pour une référence Ã  HOMARD, utiliser :
   G. Nicolas and T. Fouquet, Adaptive Mesh Refinement for Conformal Hexahedral Meshes, Finite Elements in Analysis and Design, Vol. 67, pp. 1-12, 2013, doi:10.1016/j.finel.2012.11.008
-  `Acessible en cliquant ici <http://dx.doi.org/10.1016/j.finel.2012.11.008>`.
+  `Acessible en cliquant ici <http://dx.doi.org/10.1016/j.finel.2012.11.008>`.
 
 
 Quelques illustrations de maillage adaptés
@@ -115,7 +115,12 @@ Il faut fournir deux informations : le r
 .. image:: images/intro_32.png
    :align: center
 
-L'arbre d'études est enrichi de ce cas. On déplie le cas jusqu'à afficher le maillage correspondant Ã  l'itération 0. On désigne cette itération initiale et on demande une nouvelle itération par "*Nouvelle itération*" dans le menu HOMARD ou Ã  la souris. La fenêtre suivante apparaît :
+L'arbre d'études est enrichi de ce cas. On déplie le cas jusqu'à afficher le maillage correspondant Ã  l'itération 0. On désigne cette itération initiale et on demande une nouvelle itération par "*Nouvelle itération*" dans le menu HOMARD ou Ã  la souris.
+
+.. image:: images/intro_331.png
+   :align: center
+
+La fenêtre suivante apparaît :
 
 .. image:: images/intro_33.png
    :align: center
@@ -185,6 +190,9 @@ SALOME VERSION 7.1 :
 
 SALOME VERSION 7.2 :
    - Possibilité d'utiliser un cone comme support de frontiere 2D (voir :ref:`tui_create_boundary`)
+   - Choix de publier ou non le résultat dans SMESH (voir :ref:`tui_create_iteration`)
+     ``iter.Compute(option)`` devient ``iter.Compute(option1, option2)``
+   - Possibilité de poursuivre une suite d'itérations archivées dans un répertoire (voir :ref:`gui_create_case`)
 
 
 
index d3902d5b737378104caf045e9c3290ea85a6a041..3e34369e622d56e88bf53bc1eb644ab0b9f5de9e 100644 (file)
@@ -11,6 +11,9 @@ Les variables sont d
 Méthodes de la classe homard
 """"""""""""""""""""""""""""
 
+Création d'un cas
+^^^^^^^^^^^^^^^^^
+
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
 | .. module:: CreateCase                                        |
@@ -43,6 +46,47 @@ M
 |                                                               |
 +---------------------------------------------------------------+
 
+Création d'un cas par poursuite d'une itération calculée
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: CreateCaseFromIteration                           |
+|                                                               |
+| **CreateCaseFromIteration(case_name, dir_name)**              |
+|     Retourne une instance de la classe ``cas`` après sa       |
+|     création                                                  |
+|                                                               |
+|     - ``case_name`` : le nom du cas                           |
+|     - ``dir_name``  : le nom du répertoire contenant          |
+|       l'itération Ã  poursuivre                                |
+|                                                               |
++---------------------------------------------------------------+
+| .. module:: CreateCaseFromCaseLastIteration                   |
+|                                                               |
+| **CreateCaseFromCaseLastIteration(case_name, dir_name)**      |
+|     Retourne une instance de la classe ``cas`` après sa       |
+|     création                                                  |
+|                                                               |
+|     - ``case_name`` : le nom du cas                           |
+|     - ``dir_name``  : le nom du répertoire contenant          |
+|       l'itération Ã  poursuivre                                |
+|                                                               |
++---------------------------------------------------------------+
+| .. module:: CreateCaseFromCaseIteration                       |
+|                                                               |
+| **CreateCaseFromCaseIteration(case_name, dir_name, number)**  |
+|     Retourne une instance de la classe ``cas`` après sa       |
+|     création                                                  |
+|                                                               |
+|     - ``case_name`` : le nom du cas                           |
+|     - ``dir_name``  : le nom du répertoire contenant          |
+|       l'itération Ã  poursuivre                                |
+|     - ``number`` : le numéro de l'itération du cas            |
+|                                                               |
++---------------------------------------------------------------+
+
+
 
 Méthodes de la classe cas
 """""""""""""""""""""""""
@@ -57,7 +101,9 @@ M
 | .. module:: SetDirName                                        |
 |                                                               |
 | **SetDirName(dirname)**                                       |
-|     Affecte le répertoire des résutats associé au cas         |
+|     Affecte le répertoire des résutats associé au cas. Cela ne|
+|     peut se faire qu'après la création du cas et avant le     |
+|     premier calcul.                                           |
 |                                                               |
 |     - ``dirname`` : le nom du répertoire des résutats         |
 +---------------------------------------------------------------+
@@ -86,9 +132,11 @@ M
 | .. module:: GetIter0                                          |
 |                                                               |
 | **GetIter0()**                                                |
-|     Retourne l'itération 0, associée au maillage initial.     |
+|     Retourne l'itération associée au maillage initial.        |
 |     Cette itération est créée automatiquement par le module   |
 |     HOMARD et est utilisée pour enchaîner les adaptations.    |
+|     Elle correspond Ã  un maillage initial ou Ã  une itération  |
+|     de poursuite d'un cas précédent.                          |
 +---------------------------------------------------------------+
 | .. module:: AddBoundaryGroup                                  |
 |                                                               |
@@ -120,6 +168,13 @@ M
 |         * 0 : destruction réussie                             |
 |         * autre valeur : problème                             |
 +---------------------------------------------------------------+
+| .. module:: GetState                                          |
+|                                                               |
+| **GetState()**                                                |
+|     Retourne l'état du cas :                                  |
+|         * 0 : correspond Ã  un maillage initial                |
+|         * autre valeur : poursuite d'une itération de numéro n|
++---------------------------------------------------------------+
 
 Les options avancées
 ^^^^^^^^^^^^^^^^^^^^
index e17607b8a76c1992d4bb35f20b8b0ea26fd59622..3e153d80f3a96b6c0669cec62b679cbe634748a9 100644 (file)
@@ -79,15 +79,21 @@ G
 +---------------------------------------------------------------+
 | .. index:: single: Compute                                    |
 |                                                               |
-| **Compute(option)**                                           |
+| **Compute(option1, option2)**                                 |
 |     Calcule le maillage correspondant Ã  l'itération           |
 |                                                               |
-|     - ``option`` : un entier précisant ce qui se passe quand  |
+|     - ``option1`` : un entier précisant ce qui se passe quand |
 |       des fichiers de résultats existent déjà                 |
 |                                                               |
 |         * 0 : arrêt en erreur                                 |
 |         * 1 : Ã©crasement des anciens fichiers                 |
 |                                                               |
+|     - ``option2`` : un entier précisant ce qui est fait des   |
+|       résultats                                               |
+|                                                               |
+|         * 1 : aucune action particulière                      |
+|         * 2 : publication dans le module SMESH                |
+|                                                               |
 |     Retourne un entier :                                      |
 |         * 0 : adaptation réussie                              |
 |         * autre valeur : problème                             |
@@ -141,8 +147,10 @@ G
 | **GetState()**                                                |
 |     Retourne l'état de l'itération                            |
 |                                                               |
-|     - ``0`` : itération non calculée                          |
-|     - ``1`` : itération calculée correctement                 |
+|     - ``2`` : itération calculée correctement                 |
+|     - ``1`` : itération non calculée                          |
+|     - ``<=0`` : itération initiale Ã  ne pas calculer, de      |
+|       numéro valant la valeur absolue de l'état               |
 +---------------------------------------------------------------+
 | .. module:: GetLogFile                                        |
 |                                                               |
@@ -277,7 +285,7 @@ Pour la cr
     iter_1.SetMeshName("maill_01")
     iter_1.SetMeshFile("/local00/M.01.med")
     iter_1.AssociateHypo("HypoField")
-    codret = iter_1.Compute(1)
+    codret = iter_1.Compute(1, 2)
 
 Ensuite, on crée une itération suivante Ã  l'itération parent de laquelle on part. ::
 
@@ -288,7 +296,7 @@ Ensuite, on cr
     iter_2.SetMeshName("maill_02")
     iter_2.SetMeshFile("/local00/M.02.med")
     iter_2.AssociateHypo("HypoField")
-    codret = iter_2.Compute(1)
+    codret = iter_2.Compute(1, 2)
 
 
 Saisie graphique correspondante
index 41ca5c029031dace451dca60a27b87c14ea03a16..586e09587274491a1e33d9c0fc8a1237712f9315 100644 (file)
@@ -35,21 +35,21 @@ On fera ici trois raffinements uniformes successifs du maillage contenu dans le
   Iter_0.SetMeshName('MESH')
   Iter_0.SetMeshFile(dircase+'/maill.01.med')
   Iter_0.AssociateHypo('Hypo_0')
-  codret = Iter_0.Compute(1)
+  codret = Iter_0.Compute(1, 2)
 
   # Iteration "Iter_1"
   Iter_1 = Iter_0.NextIteration('Iter_1')
   Iter_1.SetMeshName('MESH')
   Iter_1.SetMeshFile(dircase+'/maill.02.med')
   Iter_1.AssociateHypo('Hypo_0')
-  codret = Iter_1.Compute(1)
+  codret = Iter_1.Compute(1, 2)
 
   # Iteration "Iter_2"
   Iter_2 = Iter_1.NextIteration('Iter_2')
   Iter_2.SetMeshName('MESH')
   Iter_2.SetMeshFile(dircase+'/maill.03.med')
   Iter_2.AssociateHypo('Hypo_0')
-  codret = Iter_2.Compute(1)
+  codret = Iter_2.Compute(1, 2)
 
 .. note::
   Téléchargement des fichiers
@@ -102,7 +102,7 @@ On proc
   Iter_0.SetMeshName('M_1')
   Iter_0.SetMeshFile(dircase+'/maill.01.med')
   Iter_0.AssociateHypo('Hypo_0')
-  codret = Iter_0.Compute(1)
+  codret = Iter_0.Compute(1, 2)
   #
   # Iteration "Iter_1"
   # ==================
@@ -110,7 +110,7 @@ On proc
   Iter_1.SetMeshName('M_2')
   Iter_1.SetMeshFile(dircase+'/maill.02.med')
   Iter_1.AssociateHypo('Hypo_1')
-  codret = Iter_1.Compute(1)
+  codret = Iter_1.Compute(1, 2)
 
 .. note::
   Téléchargement des fichiers
@@ -182,7 +182,7 @@ Pour adapter le maillage H_1 issu de l'it
   Iter_1.SetFieldFile(data_dir+'/tutorial_3.00.med')
   Iter_1.SetTimeStepRank( 1, 1)
   Iter_1.AssociateHypo('Hypo_0vers1')
-  codret = Iter_1.Compute(1)
+  codret = Iter_1.Compute(1, 2)
   #
   # Iteration "Iter_2"
   # ==================
@@ -192,7 +192,7 @@ Pour adapter le maillage H_1 issu de l'it
   Iter_2.SetFieldFile(data_dir+'/tutorial_3.01.med')
   Iter_2.SetTimeStepRank(1, 1)
   Iter_2.AssociateHypo('Hypo_1vers2')
-  codret = Iter_2.Compute(1)
+  codret = Iter_2.Compute(1, 2)
   #
   # Iteration "Iter_2_bis"
   # ======================
@@ -202,7 +202,7 @@ Pour adapter le maillage H_1 issu de l'it
   Iter_2_bis.SetFieldFile(data_dir+'/tutorial_3.01.med')
   Iter_2_bis.SetTimeStepRank(1, 1)
   Iter_2_bis.AssociateHypo('Hypo_1vers2_bis')
-  codret = Iter_2_bis.Compute(1)
+  codret = Iter_2_bis.Compute(1, 2)
 
 .. note::
   Téléchargement des fichiers
@@ -267,19 +267,19 @@ Le sch
   Iter_1.SetMeshName('PIQUAGE_1')
   Iter_1.SetMeshFile(dircase+'/maill.01.med')
   Iter_1.AssociateHypo('Hypo_1')
-  codret = Iter_1.Compute(1)
+  codret = Iter_1.Compute(1, 2)
   # Creation of the iteration Iter_2 : raffinement selon les faces externes
   Iter_2 = Iter_1.NextIteration('Iter_2')
   Iter_2.SetMeshName('PIQUAGE_2')
   Iter_2.SetMeshFile(dircase+'/maill.02.med')
   Iter_2.AssociateHypo('Hypo_2')
-  codret = Iter_2.Compute(1)
+  codret = Iter_2.Compute(1, 2)
   # Creation of the iteration Iter_3 : second raffinement selon les faces externes
   Iter_3 = Iter_2.NextIteration('Iter_3')
   Iter_3.SetMeshName('PIQUAGE_3')
   Iter_3.SetMeshFile(dircase+'/maill.03.med')
   Iter_3.AssociateHypo('Hypo_2')
-  codret = Iter_3.Compute(1)
+  codret = Iter_3.Compute(1, 2)
 
 .. note::
   Téléchargement des fichiers
@@ -335,7 +335,7 @@ Dans le cas pr
   Iter_1.SetMeshName('COEUR_2D_01')
   Iter_1.SetMeshFile(dircase+'/maill.01.med')
   Iter_1.AssociateHypo('Hypo_1')
-  codret = Iter_1.Compute(1)
+  codret = Iter_1.Compute(1, 2)
   #
   # Iteration "Iter_2"
   # ==================
@@ -343,7 +343,7 @@ Dans le cas pr
   Iter_2.SetMeshName('COEUR_2D_02')
   Iter_2.SetMeshFile(dircase+'/maill.02.med')
   Iter_2.AssociateHypo('Hypo_2')
-  codret = Iter_2.Compute(1)
+  codret = Iter_2.Compute(1, 2)
 
 .. note::
   Téléchargement des fichiers
index 6e97623ca0d136b4c5f78f002de9bf957d8a11e5..c8aa506cea6db591cfa1007e33d6db47df0f5043 100644 (file)
@@ -56,7 +56,9 @@ module HOMARD
     void     SetDirName(in string NomDir)                  raises (SALOME::SALOME_Exception);
     string   GetDirName()                                  raises (SALOME::SALOME_Exception);
 
-    long     GetNumber()                                   raises (SALOME::SALOME_Exception);
+    long     GetState()                                    raises (SALOME::SALOME_Exception);
+
+    long     GetNumberofIter()                             raises (SALOME::SALOME_Exception);
 
     void     SetConfType(in long ConfType)                 raises (SALOME::SALOME_Exception);
     long     GetConfType()                                 raises (SALOME::SALOME_Exception);
index 4beffc756acdbb9d43caeeba6bcef94de25180ad..a931cca37788af107c93f643aaa6fc5754771061 100644 (file)
@@ -68,6 +68,12 @@ module HOMARD
                                                            raises (SALOME::SALOME_Exception);
     HOMARD_Cas        CreateCase(in string CaseName, in string MeshName, in string FileName )
                                                            raises (SALOME::SALOME_Exception);
+    HOMARD_Cas        CreateCaseFromIteration(in string CaseName, in string DirNameStart )
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Cas        CreateCaseFromCaseLastIteration(in string CaseName, in string DirNameStart )
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Cas        CreateCaseFromCaseIteration(in string CaseName, in string DirNameStart, in long Number )
+                                                           raises (SALOME::SALOME_Exception);
     HOMARD_Hypothesis CreateHypothesis(in string HypoName )
                                                            raises (SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneBox (in string ZoneName,
@@ -160,7 +166,7 @@ module HOMARD
     void DissociateHypoZone(in string HypoName, in string ZoneName)
                                                            raises (SALOME::SALOME_Exception);
 
-    long Compute (in string IterName, in long CleanOption, in long modeHOMARD, in long Option)
+    long Compute (in string IterName, in long CleanOption, in long modeHOMARD, in long Option1, in long Option2)
                                                            raises (SALOME::SALOME_Exception);
 
     boolean  VerifieDir (in string IterName)               raises (SALOME::SALOME_Exception);
index 9c6cc6dc4afa04edd703aacbe9d74118b73df515..5847e41eab01c8e80c41377362952af8c214ca90 100644 (file)
@@ -54,8 +54,8 @@ module HOMARD
     void     SetNumber(in long NumIter)                    raises (SALOME::SALOME_Exception);
     long     GetNumber()                                   raises (SALOME::SALOME_Exception);
 
-    void     SetEtat(in boolean State)                     raises (SALOME::SALOME_Exception);
-    boolean  GetEtat()                                     raises (SALOME::SALOME_Exception);
+    void     SetState(in long State)                       raises (SALOME::SALOME_Exception);
+    long     GetState()                                    raises (SALOME::SALOME_Exception);
 
     void     SetMeshName(in string NomMesh)                raises (SALOME::SALOME_Exception);
     string   GetMeshName()                                 raises (SALOME::SALOME_Exception);
@@ -74,7 +74,7 @@ module HOMARD
     void     SetLogFile(in string LogFile)                 raises (SALOME::SALOME_Exception);
     string   GetLogFile()                                  raises (SALOME::SALOME_Exception);
 
-    long     Compute(in long etatMenage)                   raises (SALOME::SALOME_Exception);
+    long     Compute(in long etatMenage, in long Option)   raises (SALOME::SALOME_Exception);
 
     void     MeshInfo(in long Qual, in long Diam, in long Conn, in long Tail, in long Inte)
                                                            raises (SALOME::SALOME_Exception);
index 62e0e86c95668875b21923fb2c2cfb125a15d1cc..73b27b1c4979eca5a8ae3161c0e13e6a0a848811 100644 (file)
@@ -47,6 +47,7 @@ dist_salomeres_DATA =   \
        iter_next.png \
        iter_non_calculee.png \
        iter_non_calulee.png \
+       iter_poursuite.png \
        med.png \
        mesh_compute.png \
        mesh_hypo_edit.png \
diff --git a/resources/iter_poursuite.png b/resources/iter_poursuite.png
new file mode 100644 (file)
index 0000000..10ee5f7
Binary files /dev/null and b/resources/iter_poursuite.png differ
index 166d903f61c45f8cf652f21fe12867582eba0b53..464d24b8d673607747d978c69af6dd87740de519 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
index e394a5dfe4435430ab54a9bb5d2170e2a201165d..b54a5c4703544489f117d3c9b1270330793322fc 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
index 7e0e07a17572f3799c149ee1392b8e53c47de3b7..bef971ef56aecf9fde3e9e400403c9f26b6a7dc4 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
@@ -34,6 +34,7 @@
 #include "HOMARD_Cas.hxx"
 #include "utilities.h"
 #include <iostream>
+#include <sys/stat.h>
 
 #ifndef WIN32
 # include <unistd.h>
@@ -101,19 +102,26 @@ std::string HOMARD_Cas::GetDumpPython() const
 // Caracteristiques
 //=============================================================================
 //=============================================================================
-void HOMARD_Cas::SetDirName( const char* NomDir )
+int HOMARD_Cas::SetDirName( const char* NomDir )
 {
-     MESSAGE("SetDirName, NomDir :  "<<NomDir);
-     if (chdir(NomDir) == 0)
-     {
-       _NomDir = std::string( NomDir );
-     }
-    else
+  MESSAGE("SetDirName,  NomDir : "<<NomDir);
+  MESSAGE("SetDirName, _NomDir : "<<_NomDir);
+  int erreur = 0 ;
+  // On vérifie qu'aucun calcul n'a eu lieu
+  MESSAGE("SetDirName, _ListIter.size() : "<<_ListIter.size());
+  if ( _ListIter.size() > 1 ) { erreur = 1 ; }
+  // Creation
+  if ( chdir(NomDir) == 0 ) { _NomDir = std::string( NomDir ); }
+  else
+  {
+    if ( mkdir(NomDir, S_IRWXU|S_IRGRP|S_IXGRP) == 0 )
     {
-       // GERALD -- QMESSAGE BOX
-       // std::cerr << "Pb pour entrer dans le repertoire :  "<<NomDir << std::endl;
-       _NomDir = "/tmp";
-    };
+      if ( chdir(NomDir) == 0 ) { _NomDir = std::string( NomDir ); }
+      else                      { erreur = 2 ; }
+    }
+    else { erreur = 2 ; }
+  };
+  return erreur ;
 }
 //=============================================================================
 std::string HOMARD_Cas::GetDirName() const
@@ -121,7 +129,7 @@ std::string HOMARD_Cas::GetDirName() const
   return _NomDir;
 }
 //=============================================================================
-int HOMARD_Cas::GetNumber()
+int HOMARD_Cas::GetNumberofIter()
 {
   return _ListIter.size();
 }
index 0fdd9665c8b9502a08f0e0b3258538d40f07ab33..0ecf0512d5064f6d8f423140e8da041168cbeb6e 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
@@ -51,10 +51,10 @@ public:
   std::string                   GetDumpPython() const;
 
 // Caracteristiques
-  void                          SetDirName( const char* NomDir );
+  int                           SetDirName( const char* NomDir );
   std::string                   GetDirName() const;
 
-  int                           GetNumber();
+  int                           GetNumberofIter();
 
   void                          SetConfType( int ConfType );
   const int                     GetConfType() const;
@@ -85,6 +85,7 @@ private:
   std::string                   _Name;
   std::string                   _NomDir;
   int                           _ConfType;
+  int                           _Etat;
 
   std::vector<double>           _Boite;         // cf HomardQTCommun pour structure du vecteur
   std::list<std::string>        _ListGroup;
index 818f4ae39d867cefdb9211b56db47e5baf238cf6..138b740d6ba55cf2ef032d345074f14467d766b8 100644 (file)
@@ -153,7 +153,7 @@ namespace HOMARD
     // ...
     MESSAGE( ". Sauvegarde de l'iteration "<<iteration.GetName());
     os << iteration.GetName();
-    os << separator() << iteration.GetEtat();
+    os << separator() << iteration.GetState();
     os << separator() << iteration.GetNumber();
     os << separator() << iteration.GetMeshFile();
     os << separator() << iteration.GetLogFile();
@@ -423,7 +423,7 @@ namespace HOMARD
     iteration.SetName( chunk.c_str() );
     chunk = getNextChunk( stream, start, ok );
     if ( !ok ) return false;
-    iteration.SetEtat( (bool)atoi( chunk.c_str() ) );
+    iteration.SetState( atoi( chunk.c_str() ) );
     chunk = getNextChunk( stream, start, ok );
     if ( !ok ) return false;
     iteration.SetNumber( atoi( chunk.c_str() ) );
index 82d4e3fe70076b6901c14bcc08bdb24b2448fbe7..4e0e8de9488b4e8043d5772b9f2c30977a0ce154 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
index 38b71788c1251d1dca933b71cdc62ba250d9ad61..f8fd09c12f754f9eea6fc0ae460f5b39a3238b06 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
index 4c59eef9af611d98bdce9d3d7c087188c2b88587..65f742a64d3c253c744b566bab9863fff675ffbe 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
index 2af14459ccb577e286fbdc4521db6f1794db5a91..995ac7704f318ca3c453b8535f8d89a5a13c72c3 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
index e5eafe53ee7337b1005f5047d446ca96e05d3952..eff38ebb38a5f7f2d5f96e32a4885a7146a8e47b 100644 (file)
@@ -51,7 +51,6 @@ HOMARD_Iteration::HOMARD_Iteration():
 {
   MESSAGE("HOMARD_Iter");
 }
-
 //=============================================================================
 /*!
  *
@@ -113,14 +112,8 @@ std::string HOMARD_Iteration::GetDumpPython() const
 //   MESSAGE (".. Hypothese " << _NomHypo );
   aScript << "\t" << _Name << ".AssociateHypo(\"" << _NomHypo << "\")\n";
 
-  if (_Etat == true)
-  {
-     aScript << "\tcodret = " <<_Name << ".Compute(1)\n";
-  }
-  else
-  {
-     aScript << "\t#codret = " <<_Name << ".Compute(1)\n";
-  }
+  if (_Etat == true) { aScript << "\tcodret = "  <<_Name << ".Compute(1, 2)\n"; }
+  else               { aScript << "\t#codret = " <<_Name << ".Compute(1, 2)\n"; }
 //   MESSAGE (". Fin de l ecriture de l iteration " << _Name );
 
   return aScript.str();
@@ -150,12 +143,12 @@ int HOMARD_Iteration::GetNumber() const
   return _NumIter;
 }
 //=============================================================================
-void HOMARD_Iteration::SetEtat( bool etat )
+void HOMARD_Iteration::SetState( int etat )
 {
   _Etat = etat;
 }
 //=============================================================================
-bool HOMARD_Iteration::GetEtat() const
+int HOMARD_Iteration::GetState() const
 {
   return _Etat;
 }
index d858f60d1652aabd210fb98c679a2c3a920410eb..64b95393825f928d915de42cd9ec2e41d985ac26 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
@@ -56,8 +56,8 @@ public:
   void                          SetNumber( int NumIter );
   int                           GetNumber() const;
 
-  void                          SetEtat( bool etat );
-  bool                          GetEtat() const;
+  void                          SetState( int etat );
+  int                           GetState() const;
 
   void                          SetMeshName( const char* NomMesh );
   std::string                   GetMeshName() const;
@@ -96,7 +96,7 @@ public:
 
 private:
   std::string                   _Name;
-  bool                          _Etat;
+  int                           _Etat;
   int                           _NumIter;
   std::string                   _NomMesh;
   std::string                   _MeshFile;
index 743880cba041a1db76912f87b34cd0008bacf049..2eb2d31bc0c8526a206dd213882786eb09643232 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
index 6d9c9147c9b8b09031a50e9e663eb778945fdcf6..fa0fd22f71f8f689fc75237dee57ac9fdb4e3a3d 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
index 184b32f8eb9bb7f3a25d812a5d6c4315fcf9e48b..a242174be76e780527ce84c14d0661ab193cb52d 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
@@ -19,7 +19,9 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-#include <string.h>
+
+#include <cstring>
+// #include <string.h>
 #include <unistd.h>
 #include <sys/stat.h>
 
@@ -58,15 +60,15 @@ HomardDriver::HomardDriver(const std::string siter, const std::string siterp1):
 HomardDriver::~HomardDriver()
 {
 }
-
 //===============================================================================
-void HomardDriver::TexteInit( const std::string DirCompute, const std::string LogFile )
+void HomardDriver::TexteInit( const std::string DirCompute, const std::string LogFile, const std::string Langue )
 {
   MESSAGE("TexteInit, DirCompute ="<<DirCompute<<", LogFile ="<<LogFile);
 //
   _Texte  = "ListeStd \"" + LogFile + "\"\n" ;
   _Texte += "RepeTrav \"" + DirCompute + "\"\n" ;
   _Texte += "RepeInfo \"" + DirCompute + "\"\n" ;
+  _Texte += "Langue \"" + Langue + "\"\n" ;
 //
 }
 //===============================================================================
@@ -214,7 +216,6 @@ void HomardDriver::TexteCompo( int NumeComp, const std::string NompCompo)
   MESSAGE("TexteCompo, NumeComp = "<<NumeComp<<", NompCompo = "<<NompCompo);
   _Texte +="CCCoChaI \"" + NompCompo + "\"\n" ;
 }
-
 //===============================================================================
 void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8 )
 {
@@ -533,7 +534,6 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0
 //
 //   MESSAGE("A la fin de HomardDriver::TexteZone, _Texte ="<<_Texte);
 }
-
 //===============================================================================
 void HomardDriver::TexteField( const std::string FieldName, const std::string FieldFile, int TimeStep, int Rank,
                int TypeThR, double ThreshR, int TypeThC, double ThreshC,
@@ -625,7 +625,6 @@ void HomardDriver::TexteField( const std::string FieldName, const std::string Fi
     _Texte += "CCUsCmpI " + saux  + "\n" ;
   }
 }
-
 //===============================================================================
 void HomardDriver::TexteGroup( const std::string GroupName )
 {
@@ -978,7 +977,6 @@ void HomardDriver::TexteAdvanced( int Pyram, int NivMax, double DiamMin, int Ada
     _Texte += "NCNiveau NIVEAU\n" ;
   }
 }
-
 //===============================================================================
 void HomardDriver::CreeFichier( )
 {
@@ -993,7 +991,6 @@ void HomardDriver::CreeFichier( )
   Fic.close() ;
 //
 }
-
 //===============================================================================
 // Creation du fichier de donnees pour l'information
 //===============================================================================
@@ -1012,7 +1009,6 @@ void HomardDriver::CreeFichierDonn( )
   Fic.close() ;
 //
 }
-
 //===============================================================================
 int HomardDriver::ExecuteHomard(int option)
 {
@@ -1032,6 +1028,5 @@ int HomardDriver::ExecuteHomard(int option)
     if ( codret != 0) { MESSAGE ( "Erreur en executant HOMARD : " << codret ); };
     _NomFichierDonn = "" ;
   };
-
   return codret ;
 }
index 32f2f617d0fce21ba75063c7283854ef468f26b3..7377aa25eff229db0f34425d88234f569d6338ff 100644 (file)
@@ -1,4 +1,4 @@
-//  HOMARD HOMARD : implementaion of HOMARD idl descriptions
+//  HOMARD HOMARD : implementation of HOMARD idl descriptions
 //
 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
 //
@@ -31,7 +31,7 @@ public:
   HomardDriver(const std::string siter, const std::string siterp1);
   ~HomardDriver();
   //
-  void        TexteInit( const std::string DirCompute, const std::string LogFile );
+  void        TexteInit( const std::string DirCompute, const std::string LogFile, const std::string Langue );
   void        TexteInfo( int TypeBila, int NumeIter );
   void        CreeFichierDonn();
   void        TexteAdap( );
index 46af698f779727f780f4fed189a4684cf74f0605..94fc0a2b9d1c8bef1dca451e69e081ffca011b0b 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'CreateCase.ui'
 **
-** Created: Wed Feb 15 18:15:40 2012
+** Created: Wed Apr 3 11:25:34 2013
 **      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -44,7 +44,7 @@ public:
     QLineEdit *LEDirName;
     QSpacerItem *spacerItem;
     QHBoxLayout *hboxLayout2;
-    QLabel *Mesh_2;
+    QLabel *Mesh;
     QPushButton *PushFichier;
     QLineEdit *LEFileName;
     QSpacerItem *spacerItem1;
@@ -84,6 +84,8 @@ public:
     QCheckBox *CBPyramid;
     QSpacerItem *spacer_3;
     QSpacerItem *spacer_4;
+    QLabel *Comment;
+    QSpacerItem *verticalSpacer;
     QGroupBox *GroupButtons;
     QGridLayout *gridLayout3;
     QPushButton *buttonHelp;
@@ -96,7 +98,7 @@ public:
     {
         if (CreateCase->objectName().isEmpty())
             CreateCase->setObjectName(QString::fromUtf8("CreateCase"));
-        CreateCase->resize(601, 1070);
+        CreateCase->resize(601, 1100);
         QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
         sizePolicy.setHorizontalStretch(0);
         sizePolicy.setVerticalStretch(0);
@@ -125,7 +127,7 @@ public:
         hboxLayout->addWidget(LECaseName);
 
 
-        gridLayout_2->addLayout(hboxLayout, 0, 0, 1, 4);
+        gridLayout_2->addLayout(hboxLayout, 0, 0, 1, 3);
 
         hboxLayout1 = new QHBoxLayout();
 #ifndef Q_OS_MAC
@@ -163,10 +165,10 @@ public:
 #endif
         hboxLayout2->setContentsMargins(0, 0, 0, 0);
         hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
-        Mesh_2 = new QLabel(CreateCase);
-        Mesh_2->setObjectName(QString::fromUtf8("Mesh_2"));
+        Mesh = new QLabel(CreateCase);
+        Mesh->setObjectName(QString::fromUtf8("Mesh"));
 
-        hboxLayout2->addWidget(Mesh_2);
+        hboxLayout2->addWidget(Mesh);
 
         PushFichier = new QPushButton(CreateCase);
         PushFichier->setObjectName(QString::fromUtf8("PushFichier"));
@@ -380,7 +382,7 @@ public:
         gridLayout2->addWidget(CBPyramid, 0, 0, 1, 1);
 
 
-        gridLayout_2->addWidget(GBAdvancedOptions, 15, 0, 1, 2);
+        gridLayout_2->addWidget(GBAdvancedOptions, 15, 0, 1, 1);
 
         spacer_3 = new QSpacerItem(128, 13, QSizePolicy::Fixed, QSizePolicy::Minimum);
 
@@ -388,7 +390,16 @@ public:
 
         spacer_4 = new QSpacerItem(239, 41, QSizePolicy::Minimum, QSizePolicy::Expanding);
 
-        gridLayout_2->addItem(spacer_4, 16, 0, 1, 2);
+        gridLayout_2->addItem(spacer_4, 16, 0, 1, 1);
+
+        Comment = new QLabel(CreateCase);
+        Comment->setObjectName(QString::fromUtf8("Comment"));
+
+        gridLayout_2->addWidget(Comment, 17, 0, 1, 3);
+
+        verticalSpacer = new QSpacerItem(20, 35, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        gridLayout_2->addItem(verticalSpacer, 18, 0, 1, 1);
 
         GroupButtons = new QGroupBox(CreateCase);
         GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
@@ -425,11 +436,11 @@ public:
         gridLayout3->addWidget(buttonCancel, 0, 2, 1, 1);
 
 
-        gridLayout_2->addWidget(GroupButtons, 17, 0, 1, 3);
+        gridLayout_2->addWidget(GroupButtons, 19, 0, 1, 3);
 
         spacer_2 = new QSpacerItem(128, 25, QSizePolicy::Fixed, QSizePolicy::Minimum);
 
-        gridLayout_2->addItem(spacer_2, 17, 3, 1, 1);
+        gridLayout_2->addItem(spacer_2, 19, 3, 1, 1);
 
 
         retranslateUi(CreateCase);
@@ -446,7 +457,7 @@ public:
         Name->setText(QApplication::translate("CreateCase", "Name", 0, QApplication::UnicodeUTF8));
         Directory->setText(QApplication::translate("CreateCase", "Directory", 0, QApplication::UnicodeUTF8));
         PushDir->setText(QString());
-        Mesh_2->setText(QApplication::translate("CreateCase", "Mesh", 0, QApplication::UnicodeUTF8));
+        Mesh->setText(QApplication::translate("CreateCase", "Mesh", 0, QApplication::UnicodeUTF8));
         PushFichier->setText(QString());
         GBTypeConf->setTitle(QApplication::translate("CreateCase", "Conformity type", 0, QApplication::UnicodeUTF8));
         RBConforme->setText(QApplication::translate("CreateCase", "Conformal", 0, QApplication::UnicodeUTF8));
@@ -470,6 +481,7 @@ public:
         CBAdvanced->setText(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8));
         GBAdvancedOptions->setTitle(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8));
         CBPyramid->setText(QApplication::translate("CreateCase", "Authorized pyramids", 0, QApplication::UnicodeUTF8));
+        Comment->setText(QApplication::translate("CreateCase", " No comment.", 0, QApplication::UnicodeUTF8));
         GroupButtons->setTitle(QString());
         buttonHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8));
         buttonApply->setText(QApplication::translate("CreateCase", "Apply", 0, QApplication::UnicodeUTF8));
index 95204dcd88da69862ec7a7cdfae50ce3b0aab551..3a9568b8b9e2e046879e0f33ab88a8419eaef198 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>601</width>
-    <height>1070</height>
+    <height>1100</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -23,7 +23,7 @@
    <bool>true</bool>
   </property>
   <layout class="QGridLayout" name="gridLayout_2">
-   <item row="0" column="0" colspan="4">
+   <item row="0" column="0" colspan="3">
     <layout class="QHBoxLayout">
      <property name="spacing">
       <number>6</number>
       <number>0</number>
      </property>
      <item>
-      <widget class="QLabel" name="Mesh_2">
+      <widget class="QLabel" name="Mesh">
        <property name="text">
         <string>Mesh</string>
        </property>
      </property>
     </widget>
    </item>
-   <item row="15" column="0" colspan="2">
+   <item row="15" column="0">
     <widget class="QGroupBox" name="GBAdvancedOptions">
      <property name="title">
       <string>Advanced options</string>
      </property>
     </spacer>
    </item>
-   <item row="16" column="0" colspan="2">
+   <item row="16" column="0">
     <spacer name="spacer_4">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
     </spacer>
    </item>
    <item row="17" column="0" colspan="3">
+    <widget class="QLabel" name="Comment">
+     <property name="text">
+      <string> No comment.</string>
+     </property>
+    </widget>
+   </item>
+   <item row="18" column="0">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>35</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="19" column="0" colspan="3">
     <widget class="QGroupBox" name="GroupButtons">
      <property name="title">
       <string/>
      </layout>
     </widget>
    </item>
-   <item row="17" column="3">
+   <item row="19" column="3">
     <spacer name="spacer_2">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
index 83b4d4cf2bbfc8c7c5bb670a672d06e4e358b9ed..addf6adf80c1cf1cf18f7635d9c8fd105684e358 100644 (file)
@@ -59,6 +59,7 @@ using namespace std;
 #include <QMenu>
 #include "MonCreateCase.h"
 #include "MonCreateIteration.h"
+#include "MonPursueIteration.h"
 #include "MonEditFile.h"
 #include "MonEditCase.h"
 #include "MonEditIteration.h"
@@ -153,16 +154,17 @@ void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QS
 //================================================
 void HOMARDGUI::createActions(){
 //
-  createHOMARDAction( 1101, "NEW_CASE",       "cas_calcule.png"        );
-  createHOMARDAction( 1102, "NEW_ITERATION",  "iter_next.png"          );
-  createHOMARDAction( 1111, "COMPUTE",        "mesh_compute.png"       );
-  createHOMARDAction( 1121, "MESH_INFO",      "advanced_mesh_info.png" );
+  createHOMARDAction( 1101, "NEW_CASE",         "cas_calcule.png"        );
+  createHOMARDAction( 1102, "PURSUE_ITERATION", "iter_poursuite.png"     );
+  createHOMARDAction( 1103, "NEW_ITERATION",    "iter_next.png"          );
+  createHOMARDAction( 1111, "COMPUTE",          "mesh_compute.png"       );
+  createHOMARDAction( 1121, "MESH_INFO",        "advanced_mesh_info.png" );
 //
-  createHOMARDAction( 1201, "EDIT",           "whatis.png"       );
-  createHOMARDAction( 1211, "DELETE",         "delete.png"       );
+  createHOMARDAction( 1201, "EDIT",             "whatis.png"       );
+  createHOMARDAction( 1211, "DELETE",           "delete.png"       );
 //
-  createHOMARDAction( 1301, "MESH_INFO",      "advanced_mesh_info.png" );
-  createHOMARDAction( 1302, "EDIT_MESS_FILE", "texte.png"              );
+  createHOMARDAction( 1301, "MESH_INFO",        "advanced_mesh_info.png" );
+  createHOMARDAction( 1302, "EDIT_MESS_FILE",   "texte.png"              );
 //
 }
 
@@ -188,7 +190,8 @@ void HOMARDGUI::createMenus(){
 //
   int HOMARD_Id  = createMenu( tr( "HOM_MEN_HOMARD" ),  -1,  5, 10 );
   createMenu( 1101, HOMARD_Id, -1 ); //Create_Case
-  createMenu( 1102, HOMARD_Id, -1 ); //Create_Iteration
+  createMenu( 1102, HOMARD_Id, -1 ); //Pursue_Iteration
+  createMenu( 1103, HOMARD_Id, -1 ); //Create_Iteration
   createMenu( 1111, HOMARD_Id, -1 ); //COMPUTE
 //
   HOMARD_Id  = createMenu( tr( "HOM_MEN_MODIFICATION" ),  -1,  5, 10 );
@@ -256,7 +259,6 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
   {
     case 1101: // Creation d un Cas
     {
-      MESSAGE("etape 1101")
       MESSAGE("command " << theCommandID << " activated");
       MonCreateCase *aDlg = new MonCreateCase( parent, true,
                             HOMARD::HOMARD_Gen::_duplicate(homardGen) ) ;
@@ -264,7 +266,16 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       break;
     }
 
-    case 1102: // Creation d une Iteration
+    case 1102: // Poursuite d une iteration
+    {
+      MESSAGE("command " << theCommandID << " activated");
+      MonPursueIteration *aDlg = new MonPursueIteration( parent, true,
+                                HOMARD::HOMARD_Gen::_duplicate(homardGen) ) ;
+      aDlg->show();
+      break;
+    }
+
+    case 1103: // Creation d une Iteration
     {
       MESSAGE("command " << theCommandID << " activated");
       QString IterParentName=HOMARD_QT_COMMUN::SelectionArbreEtude(QString("IterationHomard"), 0);
@@ -282,7 +293,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       if (monIter == QString("")) break;
       try
       {
-        homardGen->Compute(monIter.toStdString().c_str(), 0, 1, -1);
+        homardGen->Compute(monIter.toStdString().c_str(), 0, 1, -1, 2);
       }
       catch( SALOME::SALOME_Exception& S_ex )
       {
@@ -618,7 +629,7 @@ void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& t
 
 void HOMARDGUI::NextIter()
 {
-  this->OnGUIEvent(1102);
+  this->OnGUIEvent(1103);
 }
 
 void HOMARDGUI::LanceCalcul()
index d646b82f3302236153ffa61111971b594e3da323..e984097f7b6ede200ef867824a6d82a0444357fd 100644 (file)
         <source>HOM_MEN_NEW_ITERATION</source>
         <translation>Next iteration</translation>
     </message>
+    <message>
+        <source>HOM_MEN_PURSUE_ITERATION</source>
+        <translation>Pursuit of an iteration</translation>
+    </message>
     <message>
         <source>HOM_MEN_COMPUTE</source>
         <translation>Compute</translation>
         <source>HOM_TOP_NEW_ITERATION</source>
         <translation>Next iteration</translation>
     </message>
+    <message>
+        <source>HOM_TOP_PURSUE_ITERATION</source>
+        <translation>Pursuit of an iteration</translation>
+    </message>
     <message>
         <source>HOM_TOP_COMPUTE</source>
         <translation>Compute</translation>
         <source>HOM_STB_NEW_ITERATION</source>
         <translation>Next iteration</translation>
     </message>
+    <message>
+        <source>HOM_STB_PURSUE_ITERATION</source>
+        <translation>Pursuit of an iteration</translation>
+    </message>
     <message>
         <source>HOM_STB_COMPUTE</source>
         <translation>Compute</translation>
         <source>HOM_CASE_EDIT_WINDOW_TITLE</source>
         <translation>Edition of a case</translation>
     </message>
+    <message>
+        <source>HOM_CASE_EDIT_STATE_0</source>
+        <translation>Initial mesh.</translation>
+    </message>
+    <message>
+        <source>HOM_CASE_EDIT_STATE</source>
+        <translation>Pursuit of an iteration.</translation>
+    </message>
+    <message>
+        <source>HOM_CASE_PURSUE_WINDOW_TITLE</source>
+        <translation>Pursuit of an iteration</translation>
+    </message>
     <message>
         <source>HOM_ITER_NAME</source>
         <translation>The iteration must be named.</translation>
     </message>
     <message>
         <source>HOM_ITER_STARTING_POINT_1</source>
-        <translation>First iteration of the case</translation>
+        <translation>First iteration of the case.</translation>
+    </message>
+    <message>
+        <source>HOM_ITER_STARTING_POINT_2</source>
+        <translation>First iteration of the case for the pursuit.</translation>
     </message>
     <message>
         <source>HOM_ITER_EDIT_WINDOW_TITLE</source>
index 40abcbdb9d1365ec21e7c6d077c47dae5c9800d3..12eab8e3b9fe1b182418edd5d5337b496a5bfbf7 100644 (file)
         <source>HOM_MEN_NEW_ITERATION</source>
         <translation>Nouvelle itération</translation>
     </message>
+    <message>
+        <source>HOM_MEN_PURSUE_ITERATION</source>
+        <translation>Poursuite d'une itération</translation>
+    </message>
     <message>
         <source>HOM_MEN_COMPUTE</source>
         <translation>Calculer</translation>
         <source>HOM_TOP_NEW_ITERATION</source>
         <translation>Nouvelle itération</translation>
     </message>
+    <message>
+        <source>HOM_TOP_PURSUE_ITERATION</source>
+        <translation>Poursuite d'une itération</translation>
+    </message>
     <message>
         <source>HOM_TOP_COMPUTE</source>
         <translation>Calculer</translation>
         <source>HOM_STB_NEW_ITERATION</source>
         <translation>Nouvelle itération</translation>
     </message>
+    <message>
+        <source>HOM_STB_PURSUE_ITERATION</source>
+        <translation>Poursuite d'une itération</translation>
+    </message>
     <message>
         <source>HOM_STB_COMPUTE</source>
         <translation>Calculer</translation>
     </message>
     <message>
         <source>HOM_MED_FILE_3</source>
-        <translation>Ce fichier MED contient plus d&apos;un maillage.</translation>
+        <translation>Ce fichier MED contient plus d'un maillage.</translation>
     </message>
     <message>
         <source>HOM_MED_FILE_4</source>
     </message>
     <message>
         <source>Create a case</source>
-        <translation>Création d&apos;un cas</translation>
+        <translation>Création d'un cas</translation>
     </message>
     <message>
         <source>HOM_CASE_NAME</source>
     </message>
     <message>
         <source>HOM_CASE_GROUP</source>
-        <translation>Le groupe &quot;%1&quot; ne peut pas Ãªtre attribué Ã  plus d&apos;une frontière.</translation>
+        <translation>Le groupe &quot;%1&quot; ne peut pas Ãªtre attribué Ã  plus d'une frontière.</translation>
     </message>
     <message>
         <source>HOM_CASE_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;un cas</translation>
+        <translation>Edition d'un cas</translation>
+    </message>
+    <message>
+        <source>HOM_CASE_EDIT_STATE_0</source>
+        <translation>Maillage initial.</translation>
+    </message>
+    <message>
+        <source>HOM_CASE_EDIT_STATE</source>
+        <translation>Poursuite d'une itération.</translation>
+    </message>
+    <message>
+        <source>Pursue an iteration</source>
+        <translation>Poursuite d'une itération</translation>
+    </message>
+    <message>
+        <source>The configuration file cannot be found.</source>
+        <translation>Le fichier de configuration de HOMARD est introuvable.</translation>
+    </message>
+    <message>
+        <source>The configuration file cannot be read.</source>
+        <translation>Le fichier de configuration de HOMARD est illisible.</translation>
+    </message>
+    <message>
+        <source>The HOMARD mesh file cannot be found.</source>
+        <translation>Le fichier de maillage de HOMARD est introuvable.</translation>
     </message>
     <message>
         <source>HOM_ITER_NAME</source>
-        <translation>Il faut donner un nom Ã  l&apos;itération.</translation>
+        <translation>Il faut donner un nom Ã  l'itération.</translation>
     </message>
     <message>
         <source>HOM_ITER_STARTING_POINT</source>
-        <translation>Il faut désigner l&apos;itération précédente.</translation>
+        <translation>Il faut désigner l'itération précédente.</translation>
     </message>
     <message>
         <source>HOM_ITER_MESH</source>
     </message>
     <message>
         <source>HOM_ITER_STARTING_POINT_1</source>
-        <translation>Itération initiale du cas</translation>
+        <translation>Itération initiale du cas.</translation>
+    </message>
+    <message>
+        <source>HOM_ITER_STARTING_POINT_2</source>
+        <translation>Itération initiale du cas pour la poursuite.</translation>
     </message>
     <message>
         <source>HOM_ITER_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une itération</translation>
+        <translation>Edition d'une itération</translation>
     </message>
     <message>
         <source>Discrete boundary</source>
     </message>
     <message>
         <source>Initialization of adaptation</source>
-        <translation>Initialisation de l&apos;adaptation</translation>
+        <translation>Initialisation de l'adaptation</translation>
     </message>
     <message>
         <source>Maximal level</source>
     </message>
     <message>
         <source>Create an iteration</source>
-        <translation>Création d&apos;une itération</translation>
+        <translation>Création d'une itération</translation>
     </message>
     <message>
         <source>Iteration Name</source>
-        <translation>Nom de l&apos;itération</translation>
+        <translation>Nom de l'itération</translation>
     </message>
     <message>
         <source>Previous iteration</source>
         <source>Unable to create the iteration.</source>
         <translation>Impossible de créer l'itération.</translation>
     </message>
+    <message>
+        <source>The directory for the computation cannot be created.</source>
+        <translation>Impossible de créer le répertoire pour le calcul de l'itération.</translation>
+    </message>
     <message>
         <source>This iteration is the first of the case and cannot be computed.</source>
         <translation>Cette itération définit le point de départ du cas. Elle ne peut pas Ãªtre calculée.</translation>
     </message>
-<message>
+    <message>
         <source>This iteration does not have any associated hypothesis.</source>
         <translation>Cette itération n'est associée Ã  aucune hypothèse.</translation>
     </message>
     </message>
     <message>
         <source>Rank</source>
-        <translation>Numéro d&apos;ordre</translation>
+        <translation>Numéro d'ordre</translation>
     </message>
     <message>
         <source>Hypothesis</source>
     </message>
     <message>
         <source>Create an hypothesis</source>
-        <translation>Création d&apos;une hypothèse</translation>
+        <translation>Création d'une hypothèse</translation>
     </message>
     <message>
         <source>HOM_HYPO_NAME</source>
-        <translation>Il faut donner un nom Ã  l&apos;hypothèse.</translation>
+        <translation>Il faut donner un nom Ã  l'hypothèse.</translation>
     </message>
     <message>
         <source>HOM_HYPO_FIELD_FILE</source>
     </message>
     <message>
         <source>HOM_HYPO_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une hypothèse</translation>
+        <translation>Edition d'une hypothèse</translation>
     </message>
     <message>
         <source>Type of adaptation</source>
-        <translation>Type d&apos;adaptation</translation>
+        <translation>Type d'adaptation</translation>
     </message>
     <message>
         <source>Uniform</source>
     </message>
     <message>
         <source>Governing field for the adaptation</source>
-        <translation>Champ pilotant l&apos;adaptation</translation>
+        <translation>Champ pilotant l'adaptation</translation>
     </message>
     <message>
         <source>Field name</source>
     </message>
     <message>
         <source>Create a zone</source>
-        <translation>Création d&apos;une zone</translation>
+        <translation>Création d'une zone</translation>
     </message>
     <message>
         <source>HOM_ZONE_NAME</source>
     </message>
     <message>
         <source>HOM_ZONE_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une zone</translation>
+        <translation>Edition d'une zone</translation>
     </message>
     <message>
         <source>Type of zone</source>
     </message>
     <message>
         <source>Create an analytical boundary</source>
-        <translation>Création d&apos;une frontière analytique</translation>
+        <translation>Création d'une frontière analytique</translation>
     </message>
     <message>
         <source>Create a discrete boundary</source>
-        <translation>Création d&apos;une frontière discrète</translation>
+        <translation>Création d'une frontière discrète</translation>
     </message>
     <message>
         <source>Type of boundary</source>
     </message>
     <message>
         <source>HOM_BOUN_A_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une frontière analytique</translation>
+        <translation>Edition d'une frontière analytique</translation>
     </message>
     <message>
         <source>HOM_BOUN_D_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une frontière discrète</translation>
+        <translation>Edition d'une frontière discrète</translation>
     </message>
     <message>
         <source>HOM_GROU_EDIT_WINDOW_TITLE</source>
         <source>The directory for the calculation cannot be cleared.</source>
         <translation>Menage du repertoire de calcul impossible</translation>
     </message>
+    <message>
+        <source>Starting point</source>
+        <translation>Point de départ</translation>
+    </message>
+    <message>
+        <source>From an iteration</source>
+        <translation>A partir d'une itération</translation>
+    </message>
+    <message>
+        <source>From a case</source>
+        <translation>A partir d'un cas</translation>
+    </message>
+    <message>
+        <source>Iteration into the case</source>
+        <translation>Choix d'une itération dans le cas</translation>
+    </message>
+    <message>
+        <source>Last iteration</source>
+        <translation>A partir de la dernière itération</translation>
+    </message>
+    <message>
+        <source>Iteration number</source>
+        <translation>A partir d'une itération numérotée</translation>
+    </message>
+    <message>
+        <source>The directory for the case cannot be modified because some iterations are already defined.</source>
+        <translation>Impossible de changer le répertoire du cas car des itérations ont déjà Ã©té définies.</translation>
+    </message>
+    <message>
+        <source>The directory for the case cannot be reached.</source>
+        <translation>Impossible d'atteindre ce répertoire pour le cas.</translation>
+    </message>
+    <message>
+        <source>The starting point for the case cannot be copied into the working directory.</source>
+        <translation>Impossible de copier le point de départ du cas dans le répertoire de travail.</translation>
+    </message>
+    <message>
+        <source>The starting point for the case cannot be moved into the new directory.</source>
+        <translation>Impossible de déplacer le point de départ du cas dans le nouveau répertoire.</translation>
+    </message>
+    <message>
+        <source>This directory of the case does not exist.</source>
+        <translation>Le répertoire du cas de reprise n'existe pas.</translation>
+    </message>
+    <message>
+        <source>The directory of the iteration does not exist.</source>
+        <translation>Le répertoire de l'itération de reprise n'existe pas.</translation>
+    </message>
+    <message>
+        <source>The number of iteration must be positive.</source>
+        <translation>Le numéro de l'itération doit etre positif.</translation>
+    </message>
+    <message>
+        <source>Number of iteration</source>
+        <translation>Numéro de l'itération</translation>
+    </message>
     <message>
         <source>Edit a file</source>
-        <translation>Affichage d&apos;un fichier</translation>
+        <translation>Affichage d'un fichier</translation>
     </message>
     <message>
         <source>Print</source>
index c5ec50b9a3ff1915031c0dc205f3ce48aebda052..46dffbb7b40993fd3349e85ab291c53cf4455f88 100644 (file)
@@ -45,6 +45,8 @@ salomeinclude_HEADERS =       \
        MonCreateIteration.h  \
        CreateIteration.h     \
        MonEditIteration.h    \
+       MonPursueIteration.h  \
+       PursueIteration.h     \
        MonMeshInfo.h         \
        MeshInfo.h            \
        MonIterInfo.h         \
@@ -74,6 +76,7 @@ dist_libHOMARD_la_SOURCES =     \
        MonEditListGroup.cxx    \
        MonCreateIteration.cxx  \
        MonEditIteration.cxx    \
+       MonPursueIteration.cxx  \
        MonCreateZone.cxx       \
        MonEditZone.cxx         \
        MonMeshInfo.cxx         \
@@ -98,6 +101,7 @@ MOC_FILES =                         \
        MonEditListGroup_moc.cxx    \
        MonCreateIteration_moc.cxx  \
        MonEditIteration_moc.cxx    \
+       MonPursueIteration_moc.cxx  \
        MonMeshInfo_moc.cxx         \
        MonIterInfo_moc.cxx         \
        MonEditFile_moc.cxx
@@ -146,6 +150,7 @@ CreateHypothesis.ui \
 CreateIteration.ui  \
 CreateListGroup.ui  \
 CreateZone.ui       \
+PursueIteration.ui  \
 MeshInfo.ui         \
 IterInfo.ui         \
 EditFile.ui
index 1580c998c83731fa4080e9cc977f9963a73e4bb4..65f3bc9235f78f3ff9807778249a4d53c4920993 100644 (file)
@@ -376,81 +376,75 @@ bool MonCreateBoundaryAn:: CreateOrUpdateBoundaryAn()
 //----------------------------------------------------
 //  Creation de l'objet boundary
 {
-//   if (_aName != LEBoundaryName->text().trimmed())
-//   {
-    _aName = LEBoundaryName->text().trimmed();
-    switch (_Type)
+  _aName = LEBoundaryName->text().trimmed();
+  switch (_Type)
+  {
+    case 1 : // il s agit d un cylindre
     {
-      case 1 : // il s agit d un cylindre
+      try
       {
-        try
-        {
-          aBoundaryAn = _myHomardGen->CreateBoundaryCylinder(CORBA::string_dup(_aName.toStdString().c_str()), \
-          _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon );
-        }
-        catch( SALOME::SALOME_Exception& S_ex )
-        {
-          QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
-                                    QObject::tr(CORBA::string_dup(S_ex.details.text)) );
-          return false ;
-        }
-        break;
+        aBoundaryAn = _myHomardGen->CreateBoundaryCylinder(CORBA::string_dup(_aName.toStdString().c_str()), \
+        _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnXaxis, _BoundaryAnYaxis, _BoundaryAnZaxis, _BoundaryAnRayon );
       }
-      case 2 : // il s agit d une sphere
+      catch( SALOME::SALOME_Exception& S_ex )
       {
-        try
-        {
-          aBoundaryAn = _myHomardGen->CreateBoundarySphere(CORBA::string_dup(_aName.toStdString().c_str()), \
-          _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon);
-        }
-        catch( SALOME::SALOME_Exception& S_ex )
-        {
-          QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
-                                    QObject::tr(CORBA::string_dup(S_ex.details.text)) );
-          return false ;
-        }
-        break;
+        QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                  QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+        return false ;
       }
-      case 3 : // il s agit d un cone defini par un axe et un angle
+      break;
+    }
+    case 2 : // il s agit d une sphere
+    {
+      try
       {
-        try
-        {
-          aBoundaryAn = _myHomardGen->CreateBoundaryConeA(CORBA::string_dup(_aName.toStdString().c_str()), \
-          _BoundaryAnXaxisCone, _BoundaryAnYaxisCone, _BoundaryAnZaxisCone, _BoundaryAngle, \
-          _BoundaryAnXorigCone, _BoundaryAnYorigCone, _BoundaryAnYorigCone);
-        }
-        catch( SALOME::SALOME_Exception& S_ex )
-        {
-          QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
-                                    QObject::tr(CORBA::string_dup(S_ex.details.text)) );
-          return false ;
-        }
-        break;
+        aBoundaryAn = _myHomardGen->CreateBoundarySphere(CORBA::string_dup(_aName.toStdString().c_str()), \
+        _BoundaryAnXcentre, _BoundaryAnYcentre, _BoundaryAnZcentre, _BoundaryAnRayon);
       }
-      case 4 : // il s agit d un cone defini par les 2 rayons
+      catch( SALOME::SALOME_Exception& S_ex )
       {
-        try
-        {
-          aBoundaryAn = _myHomardGen->CreateBoundaryConeR(CORBA::string_dup(_aName.toStdString().c_str()), \
-          _BoundaryAnXcone1, _BoundaryAnYcone1, _BoundaryAnZcone1, _BoundaryAnRayon1, \
-          _BoundaryAnXcone2, _BoundaryAnYcone2, _BoundaryAnZcone2, _BoundaryAnRayon2);
-        }
-        catch( SALOME::SALOME_Exception& S_ex )
-        {
-          QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
-                                    QObject::tr(CORBA::string_dup(S_ex.details.text)) );
-          return false ;
-        }
-        break;
+        QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                  QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+        return false ;
+      }
+      break;
+    }
+    case 3 : // il s agit d un cone defini par un axe et un angle
+    {
+      try
+      {
+        aBoundaryAn = _myHomardGen->CreateBoundaryConeA(CORBA::string_dup(_aName.toStdString().c_str()), \
+        _BoundaryAnXaxisCone, _BoundaryAnYaxisCone, _BoundaryAnZaxisCone, _BoundaryAngle, \
+        _BoundaryAnXorigCone, _BoundaryAnYorigCone, _BoundaryAnYorigCone);
+      }
+      catch( SALOME::SALOME_Exception& S_ex )
+      {
+        QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                  QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+        return false ;
+      }
+      break;
+    }
+    case 4 : // il s agit d un cone defini par les 2 rayons
+    {
+      try
+      {
+        aBoundaryAn = _myHomardGen->CreateBoundaryConeR(CORBA::string_dup(_aName.toStdString().c_str()), \
+        _BoundaryAnXcone1, _BoundaryAnYcone1, _BoundaryAnZcone1, _BoundaryAnRayon1, \
+        _BoundaryAnXcone2, _BoundaryAnYcone2, _BoundaryAnZcone2, _BoundaryAnRayon2);
       }
+      catch( SALOME::SALOME_Exception& S_ex )
+      {
+        QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                  QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+        return false ;
+      }
+      break;
     }
-    _parent->AddBoundaryAn(_aName);
-// Mise en place des attributs
-    aBoundaryAn->SetLimit(_Xincr, _Yincr, _Zincr);
+  }
+  _parent->AddBoundaryAn(_aName);
 
-    return true;
-//   }
-//   else { return false ; }
+  return true;
 }
 // ------------------------------------------------------------------------
 void MonCreateBoundaryAn::PushOnOK()
index a160fe352a7f9cd6da994140df5ddc239d3b5065..fae57f8598b5ce3c9722e7dbd0858e83a4997858 100644 (file)
@@ -34,33 +34,36 @@ using namespace std;
 #include <utilities.h>
 
 
-// -----------------------------------------------------------------------------------------
-MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen)
 // -----------------------------------------------------------------------------------------
 /* Constructs a MonCreateCase
  * Inherits from CasHomard
  * Sets attributes to default values
  */
+// -----------------------------------------------------------------------------------------
+MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen)
     :
     Ui_CreateCase(),
     _aCaseName(""),_aDirName(""),
     _ConfType(1),
     _Pyram(0)
 {
-      _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
-      setupUi(this);
-      setModal(modal);
-      InitConnect();
+  MESSAGE("Debut du constructeur de MonCreateCase");
+  _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+  setupUi(this);
+  setModal(modal);
+  InitConnect();
 
-      SetNewCaseName() ;
-      GBBoundaryA->setVisible(0);
-      GBBoundaryD->setVisible(0);
-      GBTypeNoConf->setVisible(0);
-      adjustSize();
-      GBAdvancedOptions->setVisible(0);
-      CBPyramid->setChecked(false);
-}
+  SetNewCaseName() ;
+  GBBoundaryA->setVisible(0);
+  GBBoundaryD->setVisible(0);
+  GBTypeNoConf->setVisible(0);
+  GBAdvancedOptions->setVisible(0);
+  Comment->setVisible(0);
+  CBPyramid->setChecked(false);
 
+  adjustSize();
+  MESSAGE("Fin du constructeur de MonCreateCase");
+}
 // ------------------------------------------------------------------------
 MonCreateCase::~MonCreateCase()
 // ------------------------------------------------------------------------
@@ -71,6 +74,7 @@ MonCreateCase::~MonCreateCase()
 void MonCreateCase::InitConnect()
 // ------------------------------------------------------------------------
 {
+    connect( LECaseName,     SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
     connect( PushDir,        SIGNAL(pressed()), this, SLOT(SetDirName()));
     connect( PushFichier,    SIGNAL(pressed()), this, SLOT(SetFileName()));
 
@@ -95,7 +99,6 @@ void MonCreateCase::InitConnect()
     connect( buttonApply,    SIGNAL(pressed()), this, SLOT(PushOnApply()));
     connect( buttonCancel,   SIGNAL(pressed()), this, SLOT(close()));
     connect( buttonHelp,     SIGNAL(pressed()), this, SLOT(PushOnHelp()));
-    connect( LECaseName,     SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
 }
 // ------------------------------------------------------------------------
 void MonCreateCase::InitBoundarys()
@@ -295,8 +298,8 @@ bool MonCreateCase::PushOnApply()
 void MonCreateCase::PushOnOK()
 // ---------------------------
 {
-     bool bOK = PushOnApply();
-     if ( bOK )  this->close();
+  bool bOK = PushOnApply();
+  if ( bOK ) this->close();
 }
 //------------------------------
 void MonCreateCase::PushOnHelp()
index 2508d499d8146f0b032e8c10cdeb58453e3b831b..ace8e1e6ca60024ce1826de0124221394e1da6ff 100644 (file)
@@ -31,7 +31,6 @@ using namespace std;
 #include "HomardQtCommun.h"
 #include <utilities.h>
 
-
 // -----------------------------------------------------------------------------------------------------
 MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal,
                                        HOMARD::HOMARD_Gen_var myHomardGen, QString IterParentName ):
@@ -60,7 +59,6 @@ MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal,
          {setModal(false); /* permet selection de l iteration dans l arbre d etude */}
       SetTSNo();
     }
-
 // ------------------------------------------------------------------------
 MonCreateIteration::~MonCreateIteration()
 // ------------------------------------------------------------------------
@@ -94,7 +92,6 @@ void MonCreateIteration::GetHypotheses()
          CBHypothese->addItem(QString(mesHypotheses[i]));
      }
 }
-
 // ------------------------------------------------------------------------
 bool MonCreateIteration::PushOnApply()
 // ------------------------------------------------------------------------
@@ -162,7 +159,6 @@ bool MonCreateIteration::PushOnApply()
        return false;
     }
   }
-
 // Mise en place des attributs
   const char* IterName = aIter->GetName() ;
   std::cerr << IterName << std::endl;
@@ -183,7 +179,6 @@ bool MonCreateIteration::PushOnApply()
 
   return true;
 }
-
 // ------------------------------------------------------------------------
 void MonCreateIteration::PushOnOK()
 // ------------------------------------------------------------------------
@@ -191,14 +186,12 @@ void MonCreateIteration::PushOnOK()
      bool bOK = PushOnApply();
      if ( bOK )  this->close();
 }
-
 // ------------------------------------------------------------------------
 void MonCreateIteration::PushOnHelp()
 // ------------------------------------------------------------------------
 {
   HOMARD_UTILS::PushOnHelp(QString("gui_create_iteration.html"));
 }
-
 // ------------------------------------------------------------------------
 void MonCreateIteration::SetIterParentName()
 // ------------------------------------------------------------------------
@@ -217,7 +210,6 @@ void MonCreateIteration::SetIterParentName()
 
   LEIterationParentName->setText(_IterParentName);
 }
-
 // -------------------------------------------------
 void MonCreateIteration::SetNewIterationName()
 // --------------------------------------------------
@@ -243,8 +235,6 @@ void MonCreateIteration::SetNewIterationName()
   }
   LEIterationName->setText(aIterationName);
 }
-
-
 // ------------------------------------------------------------------------
 void MonCreateIteration::PushHypoEdit()
 // ------------------------------------------------------------------------
@@ -282,18 +272,16 @@ void MonCreateIteration::PushHypoNew()
   }
   if ( _CaseName == QString(""))
   {
-         HOMARD::HOMARD_Iteration_var aIterParent = _myHomardGen->GetIteration(_IterParentName.toStdString().c_str()) ;
-        _CaseName = aIterParent->GetCaseName();
+    HOMARD::HOMARD_Iteration_var aIterParent = _myHomardGen->GetIteration(_IterParentName.toStdString().c_str()) ;
+    _CaseName = aIterParent->GetCaseName();
   }
   QString aFieldFile=LEFieldFile->text().trimmed();
   MonCreateHypothesis *HypoDlg = new MonCreateHypothesis(this,TRUE,HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),QString(""),_CaseName, aFieldFile) ;
   HypoDlg->show();
 }
-
 // ------------------------------------------------------------------------
 void MonCreateIteration::SetFieldFile()
 // ------------------------------------------------------------------------
-
 {
   QString fileName0 = LEFieldFile->text().trimmed();
   QString fileName = HOMARD_QT_COMMUN::PushNomFichier(false);
index f4b8f938a437df02af18366403f4bcf51491e2ba..20f55c41a7f97390a49500c4ea547c766a28a5ad 100644 (file)
@@ -27,14 +27,14 @@ using namespace std;
 #include <utilities.h>
 
 
-// -------------------------------------------------------------
-MonEditCase::MonEditCase ( QWidget* parent, bool modal,
-                           HOMARD::HOMARD_Gen_var myHomardGen,
-                           QString CaseName ):
 // -------------------------------------------------------------
 /* Constructs a MonEditCase
     herite de MonCreateCase
 */
+// -------------------------------------------------------------
+MonEditCase::MonEditCase ( QWidget* parent, bool modal,
+                           HOMARD::HOMARD_Gen_var myHomardGen,
+                           QString CaseName ):
    MonCreateCase(parent, modal, myHomardGen)
 {
     MESSAGE("Debut de MonEditCase" << CaseName.toStdString().c_str());
@@ -48,8 +48,6 @@ MonEditCase::~MonEditCase()
 // ------------------------------
 {
 }
-
-
 // ------------------------------
 void MonEditCase::InitValEdit()
 // ------------------------------
@@ -194,6 +192,14 @@ void MonEditCase::InitValEdit()
   { GBAdvancedOptions->setVisible(0);
     CBPyramid->setChecked(false);
  }
+//
+// L'etat
+  int etat = aCase->GetState();
+  MESSAGE("etat "<<etat);
+  if ( etat == 0 ) { Comment->setText(QApplication::translate("CreateCase", "HOM_CASE_EDIT_STATE_0", 0, QApplication::UnicodeUTF8)); }
+  else             { Comment->setText(QApplication::translate("CreateCase", "HOM_CASE_EDIT_STATE", 0, QApplication::UnicodeUTF8)); }
+
+  Comment->setVisible(1);
 //
   adjustSize();
 }
index d012248351f1ebb30df98fe9337b4c4e2c6b856d..4986104f0cb8053aa28d91fa3c65c2ad2865eb54 100644 (file)
@@ -83,21 +83,21 @@ void MonEditFile::EditText()
 // Lecture
 //    Remarque : il serait plus clair de tout lire d'un coup mais cela ne marche pas !
 //               alors on fait ligne par ligne et on cumule en ajoutant un saut de ligne.
-      QTextStream stream( &file );
-      QString tout;
-      while ( !stream.atEnd() )
-      {
-        tout = tout + stream.readLine() + "\n" ;
-      }
+    QTextStream stream( &file );
+    QString tout;
+    while ( !stream.atEnd() )
+    {
+      tout = tout + stream.readLine() + "\n" ;
+    }
 //       tout = stream.readAll() ;
-      QTBEditFile->setPlainText( tout );
+    QTBEditFile->setPlainText( tout );
   }
   else
   {
-     // GERALD -- QMESSAGE BOX
-     MESSAGE( "EditText " << _aFileName.toStdString().c_str() << " est impossible a ouvrir ");
+    // GERALD -- QMESSAGE BOX
+    MESSAGE( "EditText " << _aFileName.toStdString().c_str() << " est impossible a ouvrir ");
     QMessageBox::warning( 0, QObject::tr("HOM_WARNING"),
-                              QObject::tr("HOM_SELECT_FILE_3") );
+                             QObject::tr("HOM_SELECT_FILE_3") );
     _codret = 1 ;
   }
 }
index e1cf044aba8fe245fa41446b61df09aa0a9ca1a4..0261e80989f1b2912176c990b0aafae94f92b1bd 100644 (file)
@@ -44,9 +44,9 @@ MonEditIteration::MonEditIteration ( QWidget* parent, bool modal,
     aIter = _myHomardGen->GetIteration(_IterationName.toStdString().c_str());
 
 //  Attention au cas ou c'est une iteration initiale : il faut inhiber l'essentiel
-    int number = aIter->GetNumber() ;
-    if ( number == 0 ) { InitValEdit0(); }
-    else               { InitValEdit(); }
+    int etat = aIter->GetState() ;
+    if ( etat <= 0 ) { InitValEdit0(etat); }
+    else             { InitValEdit(); }
 }
 // ------------------------------
 MonEditIteration::~MonEditIteration()
@@ -55,9 +55,9 @@ MonEditIteration::~MonEditIteration()
 }
 
 // ------------------------------
-void MonEditIteration::InitValEdit0()
+void MonEditIteration::InitValEdit0(int etat)
 // ------------------------------
-//    Cas d'une iteration 0
+//    Cas d'une iteration initiale d'un cas (initial ou poursuite)
 {
 //
       LEIterationName->setText(_IterationName);
@@ -75,7 +75,8 @@ void MonEditIteration::InitValEdit0()
       LEMeshName_n->setReadOnly(1);
 
 //    Message general
-      Mesh_np1->setText(QObject::tr("HOM_ITER_STARTING_POINT_1"));
+      if ( etat == 0 ) { Mesh_np1->setText(QObject::tr("HOM_ITER_STARTING_POINT_1")) ; }
+      else             { Mesh_np1->setText(QObject::tr("HOM_ITER_STARTING_POINT_2")) ; }
       LEMeshName_np1->setVisible(0);
 //
 //    Invisibilite des hypotheses et des champs
@@ -87,76 +88,76 @@ void MonEditIteration::InitValEdit0()
 // ------------------------------
 void MonEditIteration::InitValEdit()
 // ------------------------------
-//    Cas d'une iteration > 0
+//    Cas d'une iteration courante
 {
 //    Affichage bloque du nom de l'iteration
-      LEIterationName->setText(_IterationName);
-      LEIterationName->setReadOnly(true);
+  LEIterationName->setText(_IterationName);
+  LEIterationName->setReadOnly(true);
 
 //    Affichage bloque du nom de l'iteration parent
-      _IterParentName = aIter->GetIterParentName();
-      LEIterationParentName->setText(_IterParentName);
-      LEIterationParentName->setReadOnly(true);
-      PBIterParent->setEnabled(false);
-      PBIterParent->setVisible(0);
+  _IterParentName = aIter->GetIterParentName();
+  LEIterationParentName->setText(_IterParentName);
+  LEIterationParentName->setReadOnly(true);
+  PBIterParent->setEnabled(false);
+  PBIterParent->setVisible(0);
 
 //    Affichage bloque du nom du maillage de l'iteration parent
-      aIterParent = _myHomardGen->GetIteration(_IterParentName.toStdString().c_str());
-      QString MeshNameParent = aIterParent->GetMeshName();
-      LEMeshName_n->setText(MeshNameParent);
-      LEMeshName_n->setReadOnly(1);
+  aIterParent = _myHomardGen->GetIteration(_IterParentName.toStdString().c_str());
+  QString MeshNameParent = aIterParent->GetMeshName();
+  LEMeshName_n->setText(MeshNameParent);
+  LEMeshName_n->setReadOnly(1);
 
 //    Affichage bloque du nom du maillage de l'iteration courante
-      QString MeshName = aIter->GetMeshName();
-      LEMeshName_np1->setText(MeshName);
-      LEMeshName_np1->setReadOnly(1);
+  QString MeshName = aIter->GetMeshName();
+  LEMeshName_np1->setText(MeshName);
+  LEMeshName_np1->setReadOnly(1);
 
 //    Affichage de la bonne hypothese
-      QString HypoName = aIter->GetHypoName();
-      CBHypothese->insertItem(0,HypoName);
-      CBHypothese->setCurrentIndex(0);
-      CBHypothese->setEnabled(false);
-      PBHypoNew->setVisible(0);
+  QString HypoName = aIter->GetHypoName();
+  CBHypothese->insertItem(0,HypoName);
+  CBHypothese->setCurrentIndex(0);
+  CBHypothese->setEnabled(false);
+  PBHypoNew->setVisible(0);
 
 //    Pour une adaptation selon un champ
-      HOMARD::HOMARD_Hypothesis_var myHypo = _myHomardGen->GetHypothesis(HypoName.toStdString().c_str()) ;
-      _aTypeAdap = myHypo->GetAdapType() ;
-      if ( _aTypeAdap == 1 )
-      {
-          _FieldFile = aIter->GetFieldFile();
-          LEFieldFile->setText(_FieldFile);
-          _step = aIter->GetTimeStep() ;
-          SpinBox_TimeStep->setValue(_step);
-          _rank = aIter->GetRank() ;
-          SpinBox_Rank->setValue(_rank);
+  HOMARD::HOMARD_Hypothesis_var myHypo = _myHomardGen->GetHypothesis(HypoName.toStdString().c_str()) ;
+  _aTypeAdap = myHypo->GetAdapType() ;
+  if ( _aTypeAdap == 1 )
+  {
+    _FieldFile = aIter->GetFieldFile();
+    LEFieldFile->setText(_FieldFile);
+    _step = aIter->GetTimeStep() ;
+    SpinBox_TimeStep->setValue(_step);
+    _rank = aIter->GetRank() ;
+    SpinBox_Rank->setValue(_rank);
 
 // Cas ou on prend le dernier pas de temps ou sans pas de temps
-          if ( _step <= -1 )
-          {
-            Rank->setVisible(0);
-            SpinBox_Rank->setVisible(0);
-            TimeStep->setVisible(0);
-            SpinBox_TimeStep->setVisible(0);
+    if ( _step <= -1 )
+    {
+      Rank->setVisible(0);
+      SpinBox_Rank->setVisible(0);
+      TimeStep->setVisible(0);
+      SpinBox_TimeStep->setVisible(0);
 
-            if ( _step == -2 ) { RBLast->setChecked(true); }
-            else               { RBNo->setChecked(true); }
-          }
+      if ( _step == -2 ) { RBLast->setChecked(true); }
+      else               { RBNo->setChecked(true); }
+    }
 
 // Cas avec pas de temps
-          else
-          {
-            Rank->setVisible(1);
-            SpinBox_Rank->setVisible(1);
-            TimeStep->setVisible(1);
-            SpinBox_TimeStep->setVisible(1);
-            RBChosen->setChecked(true);
-          }
-      }
-      else
-      {
-          GBField->setVisible(0);
-      }
-      adjustSize();
+    else
+    {
+      Rank->setVisible(1);
+      SpinBox_Rank->setVisible(1);
+      TimeStep->setVisible(1);
+      SpinBox_TimeStep->setVisible(1);
+      RBChosen->setChecked(true);
+    }
+  }
+  else
+  {
+    GBField->setVisible(0);
+  }
+  adjustSize();
 //
 }
 
index 8bd084726c5c0d6e482aa9ee019d185f8d0d1acf..63d49072d7aa3f5a0224483fb10aab3e5306b80e 100644 (file)
@@ -45,7 +45,7 @@ protected :
     int _step ;
 
     virtual void InitValEdit();
-    virtual void InitValEdit0();
+    virtual void InitValEdit0(int etat);
     virtual bool PushOnApply();
 
 public slots:
index ded85a6a9ca5a43608f71ca75db28c85fee2c1f4..c660fbf728cfcdf3a3774f987bd7e4f21602b1e5 100644 (file)
@@ -29,6 +29,7 @@ using namespace std;
 #include "SalomeApp_Tools.h"
 #include "HOMARDGUI_Utils.h"
 #include "HomardQtCommun.h"
+#include "MonEditFile.h"
 #include <utilities.h>
 
 
@@ -112,31 +113,9 @@ bool MonIterInfo::PushOnApply()
 
   // Le bilan de l'analyse a afficher
   QString aFileName = aIter->GetFileInfo() ;
-// // Creation de l'objet fichier QT associe
-//   QFile file( aFileName );
-// // Ouverture
-//   bool bOpen = file.open( QIODevice::ReadOnly | QIODevice::Text ) ;
-// //
-//   if ( bOpen )
-//   {
-//      Ui_EditFile() ;
-// // Lecture
-// //    Remarque : il serait plus clair de tout lire d'un coup mais cela ne marche pas !
-// //               alors on fait ligne par ligne et on cumule en ajoutant un saut de ligne.
-//       QTextStream stream( &file );
-//       QString tout;
-//       while ( !stream.atEnd() )
-//       {
-//         tout = tout + stream.readLine() + "\n" ;
-//       }
-//       QTBEditFile->setPlainText( tout );
-//   QMessageBox::information( 0, QObject::tr("HOM_MESH_INFO_0"),
-//                                tout );
-//   }
+  MonEditFile *aDlg = new MonEditFile( 0, true, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), aFileName ) ;
+  if ( aDlg->_codret == 0 ) { aDlg->show(); }
 
-  // Message simple en attendant de savoir faire
-  QMessageBox::information( 0, QObject::tr("HOM_MESH_INFO_0"),
-                               QObject::tr("HOM_MESH_INFO_2")+aFileName );
 
   HOMARD_UTILS::updateObjBrowser();
   return true;
index 0484a0657e1cf252c270851378cf578caeca0b7f..b35f6029ce4f7a42638e5ec011afa6b0e8cd7e81 100644 (file)
@@ -27,6 +27,7 @@ using namespace std;
 #include "SalomeApp_Tools.h"
 #include "HOMARDGUI_Utils.h"
 #include "HomardQtCommun.h"
+#include "MonEditFile.h"
 #include <utilities.h>
 
 
@@ -155,15 +156,23 @@ bool MonMeshInfo::PushOnApply()
     }
   }
 
-  HOMARD_UTILS::updateObjBrowser();
+  // Le bilan de l'analyse a afficher
+  aCase = _myHomardGen->GetCase(_aCaseName.toStdString().c_str());
+  string iter0 = aCase->GetIter0Name();
+  HOMARD::HOMARD_Iteration_var aIter =  _myHomardGen->GetIteration(iter0.c_str());
+  aFileName = aIter->GetFileInfo() ;
+  MonEditFile *aDlg = new MonEditFile( 0, true, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), aFileName ) ;
+  if ( aDlg->_codret == 0 ) { aDlg->show(); }
+
+HOMARD_UTILS::updateObjBrowser();
   return true;
 }
 // ---------------------------
 void MonMeshInfo::PushOnOK()
 // ---------------------------
 {
-     bool bOK = PushOnApply();
-     if ( bOK )  this->close();
+  bool bOK = PushOnApply();
+  if ( bOK )  this->close();
 }
 //------------------------------
 void MonMeshInfo::PushOnHelp()
@@ -183,18 +192,17 @@ void MonMeshInfo::SetNewCaseName()
     aCaseName.insert(0, QString("Case_")) ;
     for ( int i=0; i<MyCases->length(); i++)
     {
-      if ( aCaseName ==  QString((MyCases)[i]))
+      if ( aCaseName == QString((MyCases)[i]) )
       {
-          num=num+1;
-          aCaseName="";
-          break;
+        num += 1 ;
+        aCaseName="";
+        break;
       }
    }
   }
   LECaseName->clear() ;
   LECaseName->insert(aCaseName);
 }
-
 // ------------------------------------------------------------------------
 void MonMeshInfo::SetDirName()
 // ------------------------------------------------------------------------
@@ -215,11 +223,11 @@ void MonMeshInfo::SetFileName()
 void MonMeshInfo::CaseNameChanged()
 // ------------------------------------------------------------------------
 {
-    if (_aCaseName != LECaseName->text().trimmed())
-    {
-       LEFileName->setReadOnly(false);
-       PushFichier->show();
-    }
+  if (_aCaseName != LECaseName->text().trimmed())
+  {
+    LEFileName->setReadOnly(false);
+    PushFichier->show();
+  }
 }
 // ------------------------------------------------------------------------
 void MonMeshInfo::SetBlockSize()
diff --git a/src/HOMARDGUI/MonPursueIteration.cxx b/src/HOMARDGUI/MonPursueIteration.cxx
new file mode 100644 (file)
index 0000000..58aec13
--- /dev/null
@@ -0,0 +1,260 @@
+// Copyright (C) 2011-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+using namespace std;
+
+#include "MonPursueIteration.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -----------------------------------------------------------------------------------------
+/* Constructs a MonPursueIteration
+ * Inherits from CasHomard
+ * Sets attributes to default values
+ */
+// -----------------------------------------------------------------------------------------
+MonPursueIteration::MonPursueIteration (QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen)
+    :
+    Ui_PursueIteration(),
+    _aCaseName(""), _aDirName(""), _aDirNameStart("")
+{
+  MESSAGE("Debut du constructeur de MonPursueIteration");
+  _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+  setupUi(this);
+  setModal(modal);
+
+  InitConnect();
+
+  SetNewCaseName() ;
+  _Type = 1 ;
+  GBIterationintoCase->setVisible(0);
+  spinBoxNumber->setVisible(0);
+
+  adjustSize();
+  MESSAGE("Fin du constructeur de MonPursueIteration");
+}
+
+// ------------------------------------------------------------------------
+MonPursueIteration::~MonPursueIteration()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonPursueIteration::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( LECaseName,     SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
+    connect( PushDir,        SIGNAL(pressed()), this, SLOT(SetDirName()));
+
+    connect( RBIteration,    SIGNAL(clicked()), this, SLOT(FromIteration()));
+    connect( RBCase,         SIGNAL(clicked()), this, SLOT(FromCase()));
+    connect( PushDirStart,   SIGNAL(pressed()), this, SLOT(SetDirNameStart()));
+
+    connect( RBCaseLastIteration, SIGNAL(clicked()), this, SLOT(CaseLastIteration()));
+    connect( RBCaseNIteration,    SIGNAL(clicked()), this, SLOT(CaseNIteration()));
+
+    connect( buttonOk,       SIGNAL(pressed()), this, SLOT(PushOnOK()));
+    connect( buttonApply,    SIGNAL(pressed()), this, SLOT(PushOnApply()));
+    connect( buttonCancel,   SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonHelp,     SIGNAL(pressed()), this, SLOT(PushOnHelp()));
+}
+// -------------------------------
+bool MonPursueIteration::PushOnApply()
+// --------------------------------
+{
+  MESSAGE("PushOnApply");
+
+  QString aDirName=LEDirName->text().trimmed();
+  if (aDirName == QString(""))
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_CASE_DIRECTORY_1") );
+    return false;
+  }
+  if ((aDirName != _aDirName) and (_myHomardGen->VerifieDir( aDirName.toStdString().c_str()) == false))
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_CASE_DIRECTORY_2") );
+    return false;
+  }
+  if (chdir(aDirName.toStdString().c_str()) != 0)
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_CASE_DIRECTORY_3") );
+    return false;
+  }
+
+// Enregistrement du numero d'iteration
+  int Number ;
+  if ( _Type == 3 ) { Number = spinBoxNumber->value() ; }
+
+// Creation du cas
+  QString _aCaseName=LECaseName->text().trimmed();
+
+  MESSAGE("_Type = "<<_Type);
+  switch (_Type)
+  {
+    case 1 : // Poursuite a partir d'une iteration
+    {
+      try
+      {
+        MESSAGE("Poursuite a partir d'une iteration");
+        aCase = _myHomardGen->CreateCaseFromIteration( \
+                  CORBA::string_dup(_aCaseName.toStdString().c_str()),  \
+                  CORBA::string_dup(_aDirNameStart.toStdString().c_str()) );
+      }
+      catch( SALOME::SALOME_Exception& S_ex )
+      {
+        QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                  QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+        return false ;
+      }
+      break;
+    }
+    case 2 : // Poursuite a partir de la derniere iteration dans un cas
+    {
+      try
+      {
+        MESSAGE("Poursuite a partir de la derniere iteration dans un cas");
+        aCase = _myHomardGen->CreateCaseFromCaseLastIteration( \
+                  CORBA::string_dup(_aCaseName.toStdString().c_str()),  \
+                  CORBA::string_dup(_aDirNameStart.toStdString().c_str()) );
+      }
+      catch( SALOME::SALOME_Exception& S_ex )
+      {
+        QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                  QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+        return false ;
+      }
+      break;
+    }
+    case 3 : // Poursuite a partir d'une iteration dans un cas
+    {
+      try
+      {
+        MESSAGE("Poursuite a partir d'une iteration dans un cas");
+        aCase = _myHomardGen->CreateCaseFromCaseIteration( \
+                  CORBA::string_dup(_aCaseName.toStdString().c_str()),  \
+                  CORBA::string_dup(_aDirNameStart.toStdString().c_str()),  \
+                  Number );
+      }
+      catch( SALOME::SALOME_Exception& S_ex )
+      {
+        QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                  QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+        return false ;
+      }
+      break;
+    }
+  }
+
+  HOMARD_UTILS::updateObjBrowser();
+
+  return true;
+}
+// ---------------------------
+void MonPursueIteration::PushOnOK()
+// ---------------------------
+{
+  bool bOK = PushOnApply();
+  if ( bOK )  this->close();
+}
+//------------------------------
+void MonPursueIteration::PushOnHelp()
+//-------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"));
+}
+// ---------------------------------
+void MonPursueIteration::SetNewCaseName()
+// ------------------------------
+{
+  HOMARD::listeCases_var  MyCases = _myHomardGen->GetAllCasesName();
+  int num = 0; QString aCaseName="";
+  while (aCaseName=="" )
+  {
+    aCaseName.setNum(num+1) ;
+    aCaseName.insert(0, QString("Case_")) ;
+    for ( int i=0; i<MyCases->length(); i++)
+    {
+      if ( aCaseName == QString((MyCases)[i]))
+      {
+          num += 1;
+          aCaseName = "";
+          break;
+      }
+   }
+  }
+  LECaseName->clear() ;
+  LECaseName->insert(aCaseName);
+}
+// ------------------------------------------------------------------------
+void MonPursueIteration::SetDirName()
+// ------------------------------------------------------------------------
+{
+  QString aDirName=QFileDialog::getExistingDirectory ();
+  if (!(aDirName.isEmpty()))LEDirName->setText(aDirName);
+}
+// ------------------------------------------------------------------------
+void MonPursueIteration::SetDirNameStart()
+// ------------------------------------------------------------------------
+{
+  QString aDirName=QFileDialog::getExistingDirectory ();
+  if (!(aDirName.isEmpty()))LEDirNameStart->setText(aDirName);
+}
+// ------------------------------------------------------------------------
+void MonPursueIteration::FromIteration()
+// ------------------------------------------------------------------------
+{
+  GBIterationintoCase->setVisible(0);
+  spinBoxNumber->setVisible(0);
+  _Type = 1 ;
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonPursueIteration::FromCase()
+// ------------------------------------------------------------------------
+{
+  GBIterationintoCase->setVisible(1);
+  CaseLastIteration();
+}
+// ------------------------------------------------------------------------
+void MonPursueIteration::CaseLastIteration()
+// ------------------------------------------------------------------------
+{
+  spinBoxNumber->setVisible(0);
+  _Type = 2 ;
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonPursueIteration::CaseNIteration()
+// ------------------------------------------------------------------------
+{
+  spinBoxNumber->setVisible(1);
+  _Type = 3 ;
+  adjustSize();
+}
diff --git a/src/HOMARDGUI/MonPursueIteration.h b/src/HOMARDGUI/MonPursueIteration.h
new file mode 100644 (file)
index 0000000..cb73e94
--- /dev/null
@@ -0,0 +1,70 @@
+// Copyright (C) 2011-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MON_PURSUEITERATION_H
+#define MON_PURSUEITERATION_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+
+#include <PursueIteration.h>
+#include <QWidget>
+
+class MonPursueIteration : public QDialog, public Ui_PursueIteration
+{
+    Q_OBJECT
+
+  public:
+    MonPursueIteration( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen);
+    virtual ~MonPursueIteration();
+
+  protected :
+    QString _aCaseName;
+    QString _aDirName;
+    QString _aDirNameStart;
+
+    int _Type ;
+
+    HOMARD::HOMARD_Cas_var aCase ;
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+
+    virtual void InitConnect();
+    virtual void SetNewCaseName();
+
+  public slots:
+    virtual void SetDirName();
+
+    virtual void FromIteration();
+    virtual void FromCase();
+    virtual void SetDirNameStart();
+
+    virtual void CaseLastIteration();
+    virtual void CaseNIteration();
+
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+
+};
+
+#endif // MON_PURSUEITERATION_H
diff --git a/src/HOMARDGUI/PursueIteration.h b/src/HOMARDGUI/PursueIteration.h
new file mode 100644 (file)
index 0000000..565464f
--- /dev/null
@@ -0,0 +1,258 @@
+/********************************************************************************
+** Form generated from reading UI file 'PursueIteration.ui'
+**
+** Created: Mon Apr 8 11:14:52 2013
+**      by: Qt User Interface Compiler version 4.6.3
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef PURSUEITERATION_H
+#define PURSUEITERATION_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QDialog>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QRadioButton>
+#include <QtGui/QSpacerItem>
+#include <QtGui/QSpinBox>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_PursueIteration
+{
+public:
+    QGridLayout *gridLayout_2;
+    QHBoxLayout *hboxLayout;
+    QLabel *Name;
+    QLineEdit *LECaseName;
+    QHBoxLayout *_2;
+    QLabel *Directory;
+    QPushButton *PushDir;
+    QLineEdit *LEDirName;
+    QRadioButton *RBIteration;
+    QRadioButton *RBCase;
+    QHBoxLayout *hboxLayout1;
+    QLabel *DirectoryStart;
+    QPushButton *PushDirStart;
+    QLineEdit *LEDirNameStart;
+    QGroupBox *GBIterationintoCase;
+    QGridLayout *gridLayout;
+    QRadioButton *RBCaseLastIteration;
+    QRadioButton *RBCaseNIteration;
+    QSpinBox *spinBoxNumber;
+    QGroupBox *GroupButtons;
+    QGridLayout *gridLayout1;
+    QPushButton *buttonHelp;
+    QPushButton *buttonApply;
+    QPushButton *buttonOk;
+    QPushButton *buttonCancel;
+    QSpacerItem *spacer_2;
+
+    void setupUi(QDialog *PursueIteration)
+    {
+        if (PursueIteration->objectName().isEmpty())
+            PursueIteration->setObjectName(QString::fromUtf8("PursueIteration"));
+        PursueIteration->resize(601, 300);
+        QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+        sizePolicy.setHorizontalStretch(0);
+        sizePolicy.setVerticalStretch(0);
+        sizePolicy.setHeightForWidth(PursueIteration->sizePolicy().hasHeightForWidth());
+        PursueIteration->setSizePolicy(sizePolicy);
+        PursueIteration->setAutoFillBackground(true);
+        gridLayout_2 = new QGridLayout(PursueIteration);
+        gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+        hboxLayout = new QHBoxLayout();
+#ifndef Q_OS_MAC
+        hboxLayout->setSpacing(6);
+#endif
+#ifndef Q_OS_MAC
+        hboxLayout->setContentsMargins(0, 0, 0, 0);
+#endif
+        hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
+        Name = new QLabel(PursueIteration);
+        Name->setObjectName(QString::fromUtf8("Name"));
+
+        hboxLayout->addWidget(Name);
+
+        LECaseName = new QLineEdit(PursueIteration);
+        LECaseName->setObjectName(QString::fromUtf8("LECaseName"));
+        LECaseName->setMinimumSize(QSize(382, 21));
+
+        hboxLayout->addWidget(LECaseName);
+
+
+        gridLayout_2->addLayout(hboxLayout, 0, 0, 1, 2);
+
+        _2 = new QHBoxLayout();
+#ifndef Q_OS_MAC
+        _2->setSpacing(6);
+#endif
+        _2->setContentsMargins(0, 0, 0, 0);
+        _2->setObjectName(QString::fromUtf8("_2"));
+        Directory = new QLabel(PursueIteration);
+        Directory->setObjectName(QString::fromUtf8("Directory"));
+
+        _2->addWidget(Directory);
+
+        PushDir = new QPushButton(PursueIteration);
+        PushDir->setObjectName(QString::fromUtf8("PushDir"));
+        PushDir->setAutoDefault(false);
+
+        _2->addWidget(PushDir);
+
+        LEDirName = new QLineEdit(PursueIteration);
+        LEDirName->setObjectName(QString::fromUtf8("LEDirName"));
+        LEDirName->setMinimumSize(QSize(382, 21));
+
+        _2->addWidget(LEDirName);
+
+
+        gridLayout_2->addLayout(_2, 1, 0, 1, 3);
+
+        RBIteration = new QRadioButton(PursueIteration);
+        RBIteration->setObjectName(QString::fromUtf8("RBIteration"));
+        RBIteration->setChecked(true);
+
+        gridLayout_2->addWidget(RBIteration, 2, 0, 1, 1);
+
+        RBCase = new QRadioButton(PursueIteration);
+        RBCase->setObjectName(QString::fromUtf8("RBCase"));
+
+        gridLayout_2->addWidget(RBCase, 2, 1, 1, 1);
+
+        hboxLayout1 = new QHBoxLayout();
+#ifndef Q_OS_MAC
+        hboxLayout1->setSpacing(6);
+#endif
+        hboxLayout1->setContentsMargins(0, 0, 0, 0);
+        hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
+        DirectoryStart = new QLabel(PursueIteration);
+        DirectoryStart->setObjectName(QString::fromUtf8("DirectoryStart"));
+
+        hboxLayout1->addWidget(DirectoryStart);
+
+        PushDirStart = new QPushButton(PursueIteration);
+        PushDirStart->setObjectName(QString::fromUtf8("PushDirStart"));
+        PushDirStart->setAutoDefault(false);
+
+        hboxLayout1->addWidget(PushDirStart);
+
+        LEDirNameStart = new QLineEdit(PursueIteration);
+        LEDirNameStart->setObjectName(QString::fromUtf8("LEDirNameStart"));
+        LEDirNameStart->setMinimumSize(QSize(382, 21));
+
+        hboxLayout1->addWidget(LEDirNameStart);
+
+
+        gridLayout_2->addLayout(hboxLayout1, 3, 0, 1, 3);
+
+        GBIterationintoCase = new QGroupBox(PursueIteration);
+        GBIterationintoCase->setObjectName(QString::fromUtf8("GBIterationintoCase"));
+        gridLayout = new QGridLayout(GBIterationintoCase);
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        RBCaseLastIteration = new QRadioButton(GBIterationintoCase);
+        RBCaseLastIteration->setObjectName(QString::fromUtf8("RBCaseLastIteration"));
+        RBCaseLastIteration->setChecked(true);
+
+        gridLayout->addWidget(RBCaseLastIteration, 0, 0, 1, 1);
+
+        RBCaseNIteration = new QRadioButton(GBIterationintoCase);
+        RBCaseNIteration->setObjectName(QString::fromUtf8("RBCaseNIteration"));
+
+        gridLayout->addWidget(RBCaseNIteration, 1, 0, 1, 1);
+
+        spinBoxNumber = new QSpinBox(GBIterationintoCase);
+        spinBoxNumber->setObjectName(QString::fromUtf8("spinBoxNumber"));
+        spinBoxNumber->setMaximum(1789);
+
+        gridLayout->addWidget(spinBoxNumber, 1, 1, 1, 1);
+
+
+        gridLayout_2->addWidget(GBIterationintoCase, 4, 0, 1, 2);
+
+        GroupButtons = new QGroupBox(PursueIteration);
+        GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
+        gridLayout1 = new QGridLayout(GroupButtons);
+#ifndef Q_OS_MAC
+        gridLayout1->setSpacing(6);
+#endif
+#ifndef Q_OS_MAC
+        gridLayout1->setContentsMargins(9, 9, 9, 9);
+#endif
+        gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
+        buttonHelp = new QPushButton(GroupButtons);
+        buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+        buttonHelp->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonHelp, 0, 4, 1, 1);
+
+        buttonApply = new QPushButton(GroupButtons);
+        buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+        buttonApply->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonApply, 0, 1, 1, 1);
+
+        buttonOk = new QPushButton(GroupButtons);
+        buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+        buttonOk->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonOk, 0, 0, 1, 1);
+
+        buttonCancel = new QPushButton(GroupButtons);
+        buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+        buttonCancel->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1);
+
+
+        gridLayout_2->addWidget(GroupButtons, 5, 0, 1, 2);
+
+        spacer_2 = new QSpacerItem(128, 25, QSizePolicy::Fixed, QSizePolicy::Minimum);
+
+        gridLayout_2->addItem(spacer_2, 5, 2, 1, 1);
+
+
+        retranslateUi(PursueIteration);
+
+        QMetaObject::connectSlotsByName(PursueIteration);
+    } // setupUi
+
+    void retranslateUi(QDialog *PursueIteration)
+    {
+        PursueIteration->setWindowTitle(QApplication::translate("PursueIteration", "Pursue an iteration", 0, QApplication::UnicodeUTF8));
+        Name->setText(QApplication::translate("PursueIteration", "Name", 0, QApplication::UnicodeUTF8));
+        Directory->setText(QApplication::translate("PursueIteration", "Directory", 0, QApplication::UnicodeUTF8));
+        PushDir->setText(QString());
+        RBIteration->setText(QApplication::translate("PursueIteration", "From an iteration", 0, QApplication::UnicodeUTF8));
+        RBCase->setText(QApplication::translate("PursueIteration", "From a case", 0, QApplication::UnicodeUTF8));
+        DirectoryStart->setText(QApplication::translate("PursueIteration", "Directory", 0, QApplication::UnicodeUTF8));
+        PushDirStart->setText(QString());
+        GBIterationintoCase->setTitle(QApplication::translate("PursueIteration", "Iteration into the case", 0, QApplication::UnicodeUTF8));
+        RBCaseLastIteration->setText(QApplication::translate("PursueIteration", "Last iteration", 0, QApplication::UnicodeUTF8));
+        RBCaseNIteration->setText(QApplication::translate("PursueIteration", "Iteration number", 0, QApplication::UnicodeUTF8));
+        GroupButtons->setTitle(QString());
+        buttonHelp->setText(QApplication::translate("PursueIteration", "Help", 0, QApplication::UnicodeUTF8));
+        buttonApply->setText(QApplication::translate("PursueIteration", "Apply", 0, QApplication::UnicodeUTF8));
+        buttonOk->setText(QApplication::translate("PursueIteration", "OK", 0, QApplication::UnicodeUTF8));
+        buttonCancel->setText(QApplication::translate("PursueIteration", "Cancel", 0, QApplication::UnicodeUTF8));
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class PursueIteration: public Ui_PursueIteration {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // PURSUEITERATION_H
diff --git a/src/HOMARDGUI/PursueIteration.ui b/src/HOMARDGUI/PursueIteration.ui
new file mode 100644 (file)
index 0000000..cf2fbe2
--- /dev/null
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PursueIteration</class>
+ <widget class="QDialog" name="PursueIteration">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>601</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Pursue an iteration</string>
+  </property>
+  <property name="autoFillBackground">
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0" colspan="2">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="Name">
+       <property name="text">
+        <string>Name</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LECaseName">
+       <property name="minimumSize">
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0" colspan="3">
+    <layout class="QHBoxLayout" name="_2">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="Directory">
+       <property name="text">
+        <string>Directory</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PushDir">
+       <property name="text">
+        <string/>
+       </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LEDirName">
+       <property name="minimumSize">
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="0">
+    <widget class="QRadioButton" name="RBIteration">
+     <property name="text">
+      <string>From an iteration</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QRadioButton" name="RBCase">
+     <property name="text">
+      <string>From a case</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="3">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="DirectoryStart">
+       <property name="text">
+        <string>Directory</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PushDirStart">
+       <property name="text">
+        <string/>
+       </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LEDirNameStart">
+       <property name="minimumSize">
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="4" column="0" colspan="2">
+    <widget class="QGroupBox" name="GBIterationintoCase">
+     <property name="title">
+      <string>Iteration into the case</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QRadioButton" name="RBCaseLastIteration">
+        <property name="text">
+         <string>Last iteration</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QRadioButton" name="RBCaseNIteration">
+        <property name="text">
+         <string>Iteration number</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QSpinBox" name="spinBoxNumber">
+        <property name="maximum">
+         <number>1789</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="5" column="0" colspan="2">
+    <widget class="QGroupBox" name="GroupButtons">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="4">
+       <widget class="QPushButton" name="buttonHelp">
+        <property name="text">
+         <string>Help</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="buttonApply">
+        <property name="text">
+         <string>Apply</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QPushButton" name="buttonOk">
+        <property name="text">
+         <string>OK</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QPushButton" name="buttonCancel">
+        <property name="text">
+         <string>Cancel</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="5" column="2">
+    <spacer name="spacer_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>128</width>
+       <height>25</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index aa14a605df2699815e8dbbdf30896ee6c1583932..3eec2c4cffc04b72641dfd191a407a42b042b27a 100644 (file)
@@ -42,7 +42,6 @@ HOMARD_Boundary_i::HOMARD_Boundary_i()
   MESSAGE( "Default constructor, not for use" );
   ASSERT( 0 );
 }
-
 //=============================================================================
 /*!
  *  standard constructor
@@ -62,7 +61,6 @@ HOMARD_Boundary_i::HOMARD_Boundary_i( CORBA::ORB_ptr orb,
  *  standard destructor
  */
 //=============================================================================
-
 HOMARD_Boundary_i::~HOMARD_Boundary_i()
 {
 }
@@ -101,7 +99,6 @@ std::string HOMARD_Boundary_i::Dump() const
 {
   return HOMARD::Dump( *myHomardBoundary );
 }
-
 //=============================================================================
 bool HOMARD_Boundary_i::Restore( const std::string& stream )
 {
index c8fa51eafc1642639082bf43f9ca53c1df73c454..ff5491ab239ebbeb4a71d102a114663e8405ab52 100755 (executable)
@@ -116,7 +116,39 @@ bool HOMARD_Cas_i::Restore( const std::string& stream )
 void HOMARD_Cas_i::SetDirName( const char* NomDir )
 {
   ASSERT( myHomardCas );
-  myHomardCas->SetDirName( NomDir );
+  int codret ;
+  // A. Changement/creation du repertoire
+  char* oldrep = GetDirName() ;
+  codret = myHomardCas->SetDirName( NomDir );
+  if ( codret != 0 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    std::string text ;
+    if ( codret == 1 ) { text = "The directory for the case cannot be modified because some iterations are already defined." ; }
+    else               { text = "The directory for the case cannot be reached." ; }
+    es.text = CORBA::string_dup(text.c_str());
+    throw SALOME::SALOME_Exception(es);
+  }
+  // B. En cas de reprise, deplacement du point de depart
+  if ( GetState() != 0 )
+  {
+    MESSAGE ( "etat : " << GetState() ) ;
+    char* Iter0Name = GetIter0Name() ;
+    HOMARD::HOMARD_Iteration_ptr Iter = _gen_i->GetIteration(Iter0Name) ;
+    char* DirNameIter = Iter->GetDirName() ;
+    std::string commande = "mv " + std::string(oldrep) + "/" + std::string(DirNameIter) + " " + std::string(NomDir) ;
+    codret = system(commande.c_str()) ;
+    if ( codret != 0 )
+    {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      std::string text = "The starting point for the case cannot be moved into the new directory." ;
+      es.text = CORBA::string_dup(text.c_str());
+      throw SALOME::SALOME_Exception(es);
+    }
+  }
+  return ;
 }
 //=============================================================================
 char* HOMARD_Cas_i::GetDirName()
@@ -125,10 +157,20 @@ char* HOMARD_Cas_i::GetDirName()
   return CORBA::string_dup( myHomardCas->GetDirName().c_str() );
 }
 //=============================================================================
-CORBA::Long HOMARD_Cas_i::GetNumber()
+CORBA::Long HOMARD_Cas_i::GetState()
+{
+  ASSERT( myHomardCas );
+// Nom de l'iteration initiale
+  char* Iter0Name = GetIter0Name() ;
+  HOMARD::HOMARD_Iteration_ptr Iter = _gen_i->GetIteration(Iter0Name) ;
+  int state = Iter->GetNumber() ;
+  return state ;
+}
+//=============================================================================
+CORBA::Long HOMARD_Cas_i::GetNumberofIter()
 {
   ASSERT( myHomardCas );
-  return myHomardCas->GetNumber();
+  return myHomardCas->GetNumberofIter();
 }
 //=============================================================================
 void HOMARD_Cas_i::SetConfType( CORBA::Long ConfType )
@@ -153,7 +195,6 @@ void HOMARD_Cas_i::SetBoundingBox( const HOMARD::extrema& LesExtrema )
   {
     VExtrema[i] = LesExtrema[i];
   }
-
   myHomardCas->SetBoundingBox( VExtrema );
 }
 //=============================================================================
@@ -267,13 +308,14 @@ void HOMARD_Cas_i::MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn
   char* IterName = GetIter0Name() ;
   CORBA::Long etatMenage = -1 ;
   CORBA::Long modeHOMARD = 7 ;
-  CORBA::Long Option = 1 ;
+  CORBA::Long Option1 = 1 ;
+  CORBA::Long Option2 = 1 ;
   if ( Qual != 0 ) { modeHOMARD = modeHOMARD*5 ; }
   if ( Diam != 0 ) { modeHOMARD = modeHOMARD*19 ; }
   if ( Conn != 0 ) { modeHOMARD = modeHOMARD*11 ; }
   if ( Tail != 0 ) { modeHOMARD = modeHOMARD*13 ; }
   if ( Inte != 0 ) { modeHOMARD = modeHOMARD*3 ; }
-  CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option) ;
+  CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option1, Option2) ;
   MESSAGE ( "MeshInfo : codret = " << codret );
   return ;
 }
@@ -290,7 +332,7 @@ char* HOMARD_Cas_i::GetIter0Name()
 //=============================================================================
 HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::GetIter0()
 {
-// Nom de l'iteration parent
+// Nom de l'iteration initiale
   char* Iter0Name = GetIter0Name() ;
   MESSAGE ( "GetIter0 : Iter0Name      = " << Iter0Name );
   return _gen_i->GetIteration(Iter0Name) ;
index 7de4916099d26af79d968e5d8aab758f55787e6d..5d2526adf49393776e0b364e06f591a82f6e524d 100644 (file)
@@ -67,7 +67,9 @@ public:
   void                   SetDirName( const char* NomDir );
   char*                  GetDirName();
 
-  CORBA::Long            GetNumber();
+  CORBA::Long            GetState();
+
+  CORBA::Long            GetNumberofIter();
 
   void                   SetConfType( CORBA::Long ConfType );
   CORBA::Long            GetConfType();
index 758ca76144b4e333c38e16a3182d33e931947ba1..bc40259decb4fd94353996a42e96a15c21f3fcbb 100755 (executable)
 #include <sys/stat.h>
 #include <dirent.h>
 #include <string>
+#include <cstring>
 #include <iostream>
+#include <fstream>
 #include <iomanip>
-#include <sys/stat.h>
 #include <set>
 #include <vector>
 #include <stdio.h>
@@ -167,10 +168,10 @@ CORBA::Long HOMARD_Gen_i::GetCurrentStudyID()
 // Utilitaires pour l'iteration
 //=============================================================================
 //=============================================================================
-void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Boolean EtatCalcul)
+void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Long Etat)
 //=====================================================================================
 {
-  MESSAGE( "SetEtatIter : affectation de l'etat '" << EtatCalcul << "' a l'iteration " << nomIter );
+  MESSAGE( "SetEtatIter : affectation de l'etat " << Etat << " a l'iteration " << nomIter );
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
   if (CORBA::is_nil(myIteration))
   {
@@ -181,16 +182,15 @@ void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Boolean EtatCal
       return ;
   };
 
-  myIteration->SetEtat(EtatCalcul);
+  myIteration->SetState(Etat);
 
   SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
   SALOMEDS::SObject_var aIterSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
 
-  int number = myIteration->GetNumber() ;
   const char* icone ;
-  if ( number == 0 )
+  if ( Etat <= 0 )
     icone = "iter0.png" ;
-  else if (EtatCalcul)
+  else if ( Etat == 2 )
     icone = "iter_calculee.png" ;
   else
     icone = "iter_non_calculee.png" ;
@@ -576,10 +576,10 @@ void HOMARD_Gen_i::InvalideIterOption(const char* nomIter, CORBA::Long Option)
       aStudyBuilder->RemoveObject(so);
   }
 
-  int number = myIteration->GetNumber();
-  if ( number > 0 )
+  int etat = myIteration->GetState();
+  if ( etat > 0 )
   {
-    SetEtatIter(nomIter,false);
+    SetEtatIter(nomIter,1);
     const char * nomCas = myIteration->GetCaseName();
     HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
     if (CORBA::is_nil(myCase))
@@ -658,13 +658,12 @@ void HOMARD_Gen_i::InvalideIterInfo(const char* nomIter)
 /*  MESSAGE ( "commande = " << commande );*/
   if ((system(commande.c_str())) != 0)
   {
-        SALOME::ExceptionStruct es;
-        es.type = SALOME::BAD_PARAM;
-        es.text = "The directory for the calculation cannot be cleared." ;
-        throw SALOME::SALOME_Exception(es);
-        return ;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "The directory for the calculation cannot be cleared." ;
+    throw SALOME::SALOME_Exception(es);
+    return ;
   }
-
 }
 //=============================================================================
 void HOMARD_Gen_i::InvalideZone(const char* ZoneName)
@@ -699,37 +698,37 @@ void HOMARD_Gen_i::InvalideZone(const char* ZoneName)
 //=============================================================================
 void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, const char* labelIter)
 {
-  MESSAGE( "AssociateCaseIter : " << nomCas << " ," << nomIter << ","  << labelIter );
+  MESSAGE( "AssociateCaseIter : " << nomCas << ", " << nomIter << ", "  << labelIter );
 
   HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
   if (CORBA::is_nil(myCase))
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid case";
-      throw SALOME::SALOME_Exception(es);
-      return ;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid case";
+    throw SALOME::SALOME_Exception(es);
+    return ;
   };
 
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
   if (CORBA::is_nil(myIteration))
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid iteration";
-      throw SALOME::SALOME_Exception(es);
-      return ;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid iteration";
+    throw SALOME::SALOME_Exception(es);
+    return ;
   };
 
   SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
   SALOMEDS::SObject_var aCasSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myCase)));
   if (CORBA::is_nil(aCasSO))
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid case";
-      throw SALOME::SALOME_Exception(es);
-      return ;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid case";
+    throw SALOME::SALOME_Exception(es);
+    return ;
   };
 
   aStudyBuilder->NewCommand();
@@ -994,7 +993,7 @@ void HOMARD_Gen_i::MeshInfo(const char* nomCas, const char* MeshName, const char
   IsValidStudy () ;
 
 // Creation du cas
-  HOMARD::HOMARD_Cas_ptr myCase = CreateCase(nomCas, MeshName, MeshFile) ;
+  HOMARD::HOMARD_Cas_ptr myCase = CreateCase0(nomCas, MeshName, MeshFile, 1, 0, 1) ;
   myCase->SetDirName(DirName) ;
 // Analyse
   myCase->MeshInfo(Qual, Diam, Conn, Tail, Inte) ;
@@ -1075,83 +1074,488 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::newZone()
 //=============================================================================
 //=============================================================================
 HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* MeshName, const char* MeshFile)
+//
+// Creation d'un cas initial
+// nomCas : nom du cas a creer
+// MeshName, MeshFile : nom et fichier du maillage correspondant
+//
 {
   MESSAGE ( "CreateCase : nomCas = " << nomCas << ", MeshName = " << MeshName << ", MeshFile = " << MeshFile );
-  IsValidStudy () ;
 
-  if ((myContextMap[GetCurrentStudyID()]._mesCas).find(nomCas)!=(myContextMap[GetCurrentStudyID()]._mesCas).end())
+  HOMARD::HOMARD_Cas_ptr myCase = CreateCase0(nomCas, MeshName,  MeshFile, 0, 0, 2) ;
+
+// Valeurs par defaut des filtrages
+  myCase->SetPyram(0);
+
+  return HOMARD::HOMARD_Cas::_duplicate(myCase);
+}
+//=============================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, const char* DirNameStart)
+//
+// nomCas : nom du cas a creer
+// DirNameStart : nom du repertoire contenant l'iteration de reprise
+//
+{
+  MESSAGE ( "CreateCaseFromIteration : nomCas = " << nomCas << ", DirNameStart = " << DirNameStart );
+  char* nomDirWork = getenv("PWD") ;
+  int codret ;
+
+  // A. Decodage du point de reprise
+  // A.1. Controle du repertoire de depart de l'iteration
+  codret = chdir(DirNameStart) ;
+  if ( codret != 0 )
   {
     SALOME::ExceptionStruct es;
     es.type = SALOME::BAD_PARAM;
-    es.text = "This case has already been defined.";
+    es.text = "The directory of the iteration does not exist.";
     throw SALOME::SALOME_Exception(es);
     return 0;
   };
+  // A.2. Reperage des fichiers du repertoire de reprise
+  std::string file_configuration = "" ;
+  std::string file_maillage_homard = "" ;
+  int bilan ;
+  DIR *dp;
+  struct dirent *dirp;
+  dp  = opendir(DirNameStart);
+  while ( (dirp = readdir(dp)) != NULL )
+  {
+    std::string file_name(dirp->d_name);
+//     MESSAGE ( file_name );
+    bilan = file_name.find("HOMARD.Configuration.") ;
+    if ( bilan != string::npos ) { file_configuration = file_name ; }
+    bilan = file_name.find("maill.") ;
+    if ( bilan != string::npos )
+    {
+      bilan = file_name.find(".hom.med") ;
+      if ( bilan != string::npos ) { file_maillage_homard = file_name ; }
+    }
+  }
+  closedir(dp);
+  MESSAGE ( "==> file_configuration   : " << file_configuration ) ;
+  MESSAGE ( "==> file_maillage_homard : " << file_maillage_homard ) ;
+  // A.3. Controle
+  if ( ( file_configuration == "" ) or ( file_maillage_homard == "" ) )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    std::string text ;
+    if ( file_configuration == "" ) { text = "The configuration file cannot be found." ; }
+    else                            { text = "The HOMARD mesh file cannot be found." ; }
+    es.text = CORBA::string_dup(text.c_str());
+    throw SALOME::SALOME_Exception(es);
+  }
+
+  // B. Lecture du fichier de configuration
+  // ATTENTION : on doit veiller a la coherence entre HomardDriver et CreateCaseFromIteration
+  int NumeIter ;
+  int TypeConf = 0 ;
+  int Pyram = 0 ;
+  char* MeshName ;
+  char* MeshFile ;
+  // le constructeur de ifstream permet d'ouvrir un fichier en lecture
+  std::ifstream fichier( file_configuration.c_str() );
+  if ( fichier ) // ce test Ã©choue si le fichier n'est pas ouvert
+  {
+    std::string ligne; // variable contenant chaque ligne lue
+    std::string mot_cle;
+    std::string argument;
+    int decalage;
+    // cette boucle sur les lignes s'arrête dès qu'une erreur de lecture survient
+    while ( std::getline( fichier, ligne ) )
+    {
+      // B.1. Pour la ligne courante, on identifie le premier mot : le mot-cle
+      std::istringstream ligne_bis(ligne); // variable contenant chaque ligne sous forme de flux
+      ligne_bis >> mot_cle ;
+      // B.2. Des valeurs entieres : le second bloc de la ligne
+      if ( mot_cle == "NumeIter" )
+      {
+        ligne_bis >> NumeIter ;
+        NumeIter += 1 ;
+      }
+      // B.3. Des valeurs caracteres brutes : le second bloc de la ligne est la valeur
+      else if ( ( mot_cle == "TypeConf" ) or ( mot_cle == "TypeElem" ) )
+      {
+        ligne_bis >> argument ;
+
+        if ( mot_cle == "TypeConf" )
+        {
+          if      ( argument == "conforme" )                { TypeConf = 1 ; }
+          else if ( argument == "non_conforme_1_noeud" )    { TypeConf = 2 ; }
+          else if ( argument == "non_conforme_1_arete" )    { TypeConf = 3 ; }
+          else if ( argument == "non_conforme_indicateur" ) { TypeConf = 4 ; }
+        }
+        else if ( mot_cle == "TypeElem" )
+        {
+          if ( argument == "ignore_pyra" ) { Pyram = 1 ; }
+          else if ( argument == "HOMARD" ) { Pyram = 0 ; }
+        }
+      }
+      // B.4. Des valeurs caracteres : le deuxieme bloc de la ligne peut etre encadre par des quotes :
+      //                               il faut les supprimer
+      else if ( ( mot_cle == "CCNoMNP1" ) or ( mot_cle == "CCMaiNP1" ) )
+      {
+        ligne_bis >> argument ;
+        if ( argument[0] == '"' ) { decalage = 1 ; }
+        else                      { decalage = 0 ; }
+        size_t size = argument.size() + 1 - 2*decalage ;
+
+        if ( mot_cle == "CCNoMNP1" )
+        {
+          MeshName = new char[ size ];
+          strncpy( MeshName, argument.c_str()+decalage, size );
+          MeshName[size-1] = '\0' ;
+        }
+        else if ( mot_cle == "CCMaiNP1" )
+        {
+          MeshFile = new char[ size ];
+          strncpy( MeshFile, argument.c_str()+decalage, size );
+          MeshFile[size-1] = '\0' ;
+        }
+      }
+    }
+    MESSAGE ( "==> TypeConf   : " << TypeConf ) ;
+    MESSAGE ( "==> MeshName   : " << MeshName ) ;
+    MESSAGE ( "==> MeshFile   : " << MeshFile ) ;
+    MESSAGE ( "==> NumeIter   : " << NumeIter ) ;
+    MESSAGE ( "==> Pyram      : " << Pyram ) ;
+  }
+  else
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    std::string text = "The configuration file cannot be read." ;
+    es.text = CORBA::string_dup(text.c_str());
+    throw SALOME::SALOME_Exception(es);
+  }
+
+  // C. Creation effective du cas
+
+  HOMARD::HOMARD_Cas_ptr myCase = CreateCase0(nomCas, MeshName,  MeshFile, 1, NumeIter, 2) ;
+
+  // D. Parametrages lus dans le fichier de configuration
+
+  myCase->SetConfType (TypeConf) ;
+  myCase->SetPyram (Pyram) ;
+
+  // E. Copie du fichier de maillage homard
+  // E.1. Repertoire associe au cas
+  char* nomDirCase = myCase->GetDirName() ;
+  // E.2. Repertoire associe a l'iteration de ce cas
+  char* IterName ;
+  IterName = myCase->GetIter0Name() ;
+  HOMARD::HOMARD_Iteration_var Iter = GetIteration(IterName) ;
+  char* nomDirIter = CreateDirNameIter(nomDirCase, 0 );
+  Iter->SetDirName(nomDirIter);
+  std::string nomDirIterTotal ;
+  nomDirIterTotal = std::string(nomDirCase) + "/" + std::string(nomDirIter) ;
+  if (mkdir(nomDirIterTotal.c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0)
+  {
+    MESSAGE ( "nomDirIterTotal : " << nomDirIterTotal ) ;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    std::string text = "The directory for the computation cannot be created." ;
+    es.text = CORBA::string_dup(text.c_str());
+    throw SALOME::SALOME_Exception(es);
+  }
+  // E.3. Copie du maillage HOMARD au format MED
+  codret = chdir(DirNameStart) ;
+  std::string commande = "cp " + file_maillage_homard + " " + nomDirIterTotal ;
+  MESSAGE ( "commande : " << commande ) ;
+  codret = system(commande.c_str()) ;
+  MESSAGE ( "codret : " << codret ) ;
+  if ( codret != 0 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "The starting point for the case cannot be copied into the working directory.";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
+  };
+
+  // F. Menage
+
+  delete[] MeshName ;
+  delete[] MeshFile ;
+
+  chdir(nomDirWork);
+
+  return HOMARD::HOMARD_Cas::_duplicate(myCase);
+}
+//=============================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseLastIteration(const char* nomCas, const char* DirNameStart)
+//
+// nomCas : nom du cas a creer
+// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+//
+{
+  MESSAGE ( "CreateCaseFromCaseLastIteration : nomCas = " << nomCas << ", DirNameStart = " << DirNameStart );
+
+  std::string DirNameStartIter = CreateCase1(DirNameStart, -1) ;
+
+  DirNameStartIter = string(DirNameStart) + "/" + DirNameStartIter ;
+  HOMARD::HOMARD_Cas_ptr myCase = CreateCaseFromIteration(nomCas, DirNameStartIter.c_str()) ;
+
+  return HOMARD::HOMARD_Cas::_duplicate(myCase);
+}
+//=============================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseIteration(const char* nomCas, const char* DirNameStart, CORBA::Long Number)
+//
+// nomCas : nom du cas a creer
+// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+// Number : numero de l'iteration de depart
+//
+{
+  MESSAGE ( "CreateCaseFromCaseIteration : nomCas = " << nomCas << ", DirNameStart = " << DirNameStart << ", Number = " << Number );
+  if ( Number < 0 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "The number of iteration must be positive.";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
+  };
+
+  std::string DirNameStartIter = CreateCase1(DirNameStart, Number) ;
+
+  DirNameStartIter = string(DirNameStart) + "/" + DirNameStartIter ;
+  HOMARD::HOMARD_Cas_ptr myCase = CreateCaseFromIteration(nomCas, DirNameStartIter.c_str()) ;
+
+  return HOMARD::HOMARD_Cas::_duplicate(myCase);
+}
+//=============================================================================
+std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Number)
+//
+// Retourne le nom du repertoire ou se trouve l'iteration voulue.
+// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+// Number : numero de l'iteration de depart ou -1 si on cherche la derniere
+//
+{
+  MESSAGE ( "CreateCase1 : DirNameStart = " << DirNameStart << ", Number = " << Number );
+  std::string nomDirWork = getenv("PWD") ;
+  std::string DirNameStartIter ;
+  int codret ;
+  int NumeIterMax = -1 ;
+
+  // A.1. Controle du repertoire de depart du cas
+  codret = chdir(DirNameStart) ;
+  if ( codret != 0 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This directory of the case does not exist.";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
+  };
+  // A.2. Reperage des sous-repertoire du repertoire de reprise
+  bool existe = false ;
+  DIR *dp;
+  struct dirent *dirp;
+  dp  = opendir(DirNameStart);
+  while ( (dirp = readdir(dp)) != NULL )
+  {
+    std::string DirName_1(dirp->d_name);
+    if ( ( DirName_1 != "." ) and ( DirName_1 != ".." ) )
+    {
+      if ( chdir(DirName_1.c_str()) == 0 )
+      {
+  //   On cherche le fichier de configuration dans ce sous-repertoire
+        codret = chdir(DirNameStart) ;
+        DIR *dp_1;
+        struct dirent *dirp_1;
+        dp_1  = opendir(DirName_1.c_str()) ;
+        while ( (dirp_1 = readdir(dp_1)) != NULL )
+        {
+          std::string file_name_1(dirp_1->d_name);
+          int bilan = file_name_1.find("HOMARD.Configuration.") ;
+          if ( bilan != string::npos )
+          {
+  // Decodage du fichier pour trouver le numero d'iteration
+            chdir(DirName_1.c_str()) ;
+            std::ifstream fichier( file_name_1.c_str() );
+            if ( fichier ) // ce test Ã©choue si le fichier n'est pas ouvert
+            {
+              int NumeIter ;
+              std::string ligne; // variable contenant chaque ligne lue
+              std::string mot_cle;
+              // cette boucle sur les lignes s'arrête dès qu'une erreur de lecture survient
+              while ( std::getline( fichier, ligne ) )
+              {
+                // B.1. Pour la ligne courante, on identifie le premier mot : le mot-cle
+                std::istringstream ligne_bis(ligne); // variable contenant chaque ligne sous forme de flux
+                ligne_bis >> mot_cle ;
+                if ( mot_cle == "NumeIter" )
+                {
+                  ligne_bis >> NumeIter ;
+                  NumeIter += 1 ;
+//                   MESSAGE ( "==> NumeIter   : " << NumeIter ) ;
+                  if ( Number == - 1 )
+                  {
+                    if ( NumeIter >= NumeIterMax )
+                    {
+                      NumeIterMax = NumeIter ;
+                      DirNameStartIter = DirName_1 ;
+                    }
+                  }
+                  else
+                  {
+                    if ( NumeIter == Number )
+                    {
+                      DirNameStartIter = DirName_1 ;
+                      existe = true ;
+                      break ;
+                    }
+                  }
+                }
+              }
+            }
+            else
+            {
+              SALOME::ExceptionStruct es;
+              es.type = SALOME::BAD_PARAM;
+              std::string text = "The configuration file cannot be read." ;
+              es.text = CORBA::string_dup(text.c_str());
+              throw SALOME::SALOME_Exception(es);
+            }
+            chdir(DirNameStart) ;
+          }
+          if ( existe ) { break ; }
+        }
+        closedir(dp_1);
+        if ( existe ) { break ; }
+      }
+    }
+  }
+  closedir(dp);
+
+  chdir(nomDirWork.c_str());
+
+  if ( ( Number >= 0 and ( not existe ) ) or ( Number < 0 and ( NumeIterMax == -1 ) ) )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "The directory of the iteration does not exist.";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
+  };
+
+  return DirNameStartIter ;
+}
+//=============================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase0(const char* nomCas, const char* MeshName, const char* MeshFile, CORBA::Long MeshOption, CORBA::Long NumeIter, CORBA::Long Option)
+//
+// nomCas : nom du cas a creer
+// MeshName, MeshFile : nom et fichier du maillage correspondant
+// MeshOption : 0 : le maillage fourni est obligatoirement present ==> erreur si absent
+//              1 : le maillage fourni peut ne pas exister ==> on continue si absent
+//             -1 : le maillage n'est pas fourni
+// NumeIter : numero de l'iteration correspondante : 0, pour un depart, n>0 pour une poursuite
+// Option : multiple de nombres premiers
+//         1 : aucune option
+//        x2 : publication du maillage dans SMESH
+{
+  MESSAGE ( "CreateCase0 : nomCas = " << nomCas );
+  MESSAGE ( "CreateCase0 : MeshName = " << MeshName << ", MeshFile = " << MeshFile << ", MeshOption = " << MeshOption );
+  MESSAGE ( "CreateCase0 : NumeIter = " << NumeIter << ", Option = " << Option );
+//
+  // A. Controles
+  // A.1. L'etude
+  IsValidStudy () ;
 
-  int existe = MEDFileExist ( MeshFile ) ;
-  if ( existe == 0 )
+  // A.2. Controle du nom :
+  if ((myContextMap[GetCurrentStudyID()]._mesCas).find(nomCas)!=(myContextMap[GetCurrentStudyID()]._mesCas).end())
   {
     SALOME::ExceptionStruct es;
     es.type = SALOME::BAD_PARAM;
-    es.text = "The mesh file does not exist.";
+    es.text = "This case has already been defined.";
     throw SALOME::SALOME_Exception(es);
     return 0;
+  };
+
+  // A.3. Controle du fichier du maillage
+  int existeMeshFile ;
+  if ( MeshOption >= 0 )
+  {
+    existeMeshFile = MEDFileExist ( MeshFile ) ;
+    MESSAGE ( "CreateCase0 : existeMeshFile = " << existeMeshFile );
+    if ( ( existeMeshFile == 0 ) and ( MeshOption == 0 ) )
+    {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "The mesh file does not exist.";
+      throw SALOME::SALOME_Exception(es);
+      return 0;
+    }
   }
+  else { existeMeshFile = 0 ; }
 
+  // B. Creation de l'objet cas et publication
+//   MESSAGE ( "CreateCase0 : Creation de l'objet" );
   HOMARD::HOMARD_Cas_var myCase = newCase();
   myCase->SetName(nomCas);
   SALOMEDS::SObject_var aSO;
   PublishInStudy(myCurrentStudy, aSO, myCase, nomCas);
   myContextMap[GetCurrentStudyID()]._mesCas[nomCas] = myCase;
 
-  std::vector<double> LesExtremes =GetBoundingBoxInMedFile(MeshFile);
-  HOMARD::extrema_var aSeq = new HOMARD::extrema();
-  if (LesExtremes.size()!=10) { return false; }
-  aSeq->length(10);
-  for (int i =0; i< LesExtremes.size(); i++)
-       aSeq[i]=LesExtremes[i];
-  myCase->SetBoundingBox(aSeq);
-
-  std::set<std::string> LesGroupes  =GetListeGroupesInMedFile(MeshFile);
-  HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType;
-  aSeqGroupe->length(LesGroupes.size());
-  std::set<std::string>::const_iterator it;
-  int i = 0;
-  for (it=LesGroupes.begin() ; it != LesGroupes.end(); it++)
-     aSeqGroupe[i++]=(*it).c_str();
-  myCase->SetGroups(aSeqGroupe);
-
-// Recherche d'un nom pour l'iteration 0. Par defaut, on prend le nom
-// du maillage du cas. Si ce nom existe deja, on incremente avec 0, 1, 2, etc.
-  int monNum=0;
+  // C. Caracteristiques du maillage
+  if ( existeMeshFile != 0 )
+  {
+  // Les valeurs extremes des coordonnees
+//     MESSAGE ( "CreateCase0 : Les valeurs extremes des coordonnees" );
+    std::vector<double> LesExtremes =GetBoundingBoxInMedFile(MeshFile) ;
+    HOMARD::extrema_var aSeq = new HOMARD::extrema() ;
+    if (LesExtremes.size()!=10) { return false; }
+    aSeq->length(10) ;
+    for (int i =0 ; i< LesExtremes.size() ; i++)
+        aSeq[i]=LesExtremes[i] ;
+    myCase->SetBoundingBox(aSeq) ;
+  // Les groupes
+//     MESSAGE ( "CreateCase0 : Les groupes" );
+    std::set<std::string> LesGroupes  =GetListeGroupesInMedFile(MeshFile) ;
+    HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType ;
+    aSeqGroupe->length(LesGroupes.size());
+    std::set<std::string>::const_iterator it ;
+    int i = 0 ;
+    for (it=LesGroupes.begin() ; it != LesGroupes.end() ; it++)
+      aSeqGroupe[i++]=(*it).c_str() ;
+    myCase->SetGroups(aSeqGroupe) ;
+  }
+
+  // D. L'iteration initiale du cas
+  MESSAGE ( "CreateCase0 : iteration initiale du cas" );
+  // D.1. Recherche d'un nom : par defaut, on prend le nom du maillage correspondant.
+  // Si ce nom d'iteration existe deja, on incremente avec 0, 1, 2, etc.
+  int monNum = 0;
   std::string NomIteration = std::string(MeshName) ;
-  while ((myContextMap[GetCurrentStudyID()]._mesIterations).find(NomIteration) != (myContextMap[GetCurrentStudyID()]._mesIterations.end()))
+  while ( (myContextMap[GetCurrentStudyID()]._mesIterations).find(NomIteration) != (myContextMap[GetCurrentStudyID()]._mesIterations.end()) )
   {
-     std::ostringstream nom;
-     nom << MeshName << monNum;
-     NomIteration=nom.str();
-     monNum = monNum+1;
+    std::ostringstream nom;
+    nom << MeshName << monNum;
+    NomIteration = nom.str();
+    monNum += 1;
   }
-  MESSAGE ( "CreateCase : NomIteration = " << NomIteration );
+  MESSAGE ( "CreateCas0 : ==> NomIteration = " << NomIteration );
 
+  // D.2. Creation de l'iteration
   HOMARD::HOMARD_Iteration_var anIter = newIteration();
   myContextMap[GetCurrentStudyID()]._mesIterations[NomIteration] = anIter;
-  std::ostringstream DirName;
-  DirName << "I00";
-
-  anIter->SetDirName(DirName.str().c_str());
   anIter->SetName(NomIteration.c_str());
-  anIter->SetMeshFile(MeshFile);
+  AssociateCaseIter (nomCas, NomIteration.c_str(), "IterationHomard");
+
+  // D.4. Maillage correspondant
+  if ( existeMeshFile != 0 )
+  {
+    anIter->SetMeshFile(MeshFile);
+    if ( Option % 2 == 0 ) { PublishResultInSmesh(MeshFile, 0); }
+  }
   anIter->SetMeshName(MeshName);
-  anIter->SetNumber(0);
 
-  AssociateCaseIter (nomCas,NomIteration.c_str(),"IterationHomard");
-  SetEtatIter(NomIteration.c_str(),true);
-//
-  PublishResultInSmesh(MeshFile, 0);
+  // D.5. Numero d'iteration
+  anIter->SetNumber(NumeIter);
 
-// Valeurs par defaut des filtrages
-  myCase->SetPyram(0);
+  // D.6. Etat
+  SetEtatIter(NomIteration.c_str(), -NumeIter);
+//
 
   return HOMARD::HOMARD_Cas::_duplicate(myCase);
 }
@@ -1161,14 +1565,15 @@ HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypo
   MESSAGE ( "CreateHypothesis : nomHypothesis  = " << nomHypothesis );
   IsValidStudy () ;
 
+  // Controle du nom :
   if ((myContextMap[GetCurrentStudyID()]._mesHypotheses).find(nomHypothesis) != (myContextMap[GetCurrentStudyID()]._mesHypotheses).end())
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "This hypothesis has already been defined.";
-      throw SALOME::SALOME_Exception(es);
-      return 0;
-    }
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This hypothesis has already been defined.";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
+  }
 
   HOMARD::HOMARD_Hypothesis_var myHypothesis = newHypothesis();
   myHypothesis->SetName(nomHypothesis);
@@ -1195,11 +1600,11 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIterat
   HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterParent];
   if (CORBA::is_nil(myIterationParent))
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "The parent iteration is not defined.";
-      throw SALOME::SALOME_Exception(es);
-      return 0;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "The parent iteration is not defined.";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
   };
 
   const char* nomCas = myIterationParent->GetCaseName();
@@ -1207,47 +1612,47 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIterat
   HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
   if (CORBA::is_nil(myCase))
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid case context";
-      throw SALOME::SALOME_Exception(es);
-      return 0;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid case context";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
   };
+  const char* nomDirCase = myCase->GetDirName();
 
+  // Controle du nom :
   if ((myContextMap[GetCurrentStudyID()]._mesIterations).find(NomIteration)!=(myContextMap[GetCurrentStudyID()]._mesIterations).end())
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "This iteration has already been defined.";
-      throw SALOME::SALOME_Exception(es);
-      return 0;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This iteration has already been defined.";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
   };
 
    HOMARD::HOMARD_Iteration_var myIteration = newIteration();
    if (CORBA::is_nil(myIteration))
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Unable to create the iteration";
-      throw SALOME::SALOME_Exception(es);
-      return 0;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Unable to create the iteration";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
   };
   myContextMap[GetCurrentStudyID()]._mesIterations[std::string(NomIteration)] = myIteration;
 // Nom de l'iteration et du maillage
   myIteration->SetName(NomIteration);
   myIteration->SetMeshName(NomIteration);
+  myIteration->SetState(1);
 
   int numero = myIterationParent->GetNumber() + 1;
   myIteration->SetNumber(numero);
 
 // Nombre d'iterations deja connues pour le cas, permettant
 // la creation d'un sous-repertoire unique
-   int nbitercase = myCase->GetNumber();
-   std::ostringstream iaux ;
-   iaux << std::setw(2) << std::setfill('0') << nbitercase ;
-   std::stringstream DirName;
-   DirName << "I" << iaux.str();
-   myIteration->SetDirName(DirName.str().c_str());
+  int nbitercase = myCase->GetNumberofIter();
+  char* nomDirIter = CreateDirNameIter(nomDirCase, nbitercase );
+  myIteration->SetDirName(nomDirIter);
 
 // Le nom du fichier du maillage MED est indice par le nombre d'iterations du cas.
 // Si on a une chaine unique depuis le depart, ce nombre est le meme que le
@@ -1255,10 +1660,17 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIterat
 // situation la plus frequente.
 // Si on a plusieurs branches, donc des iterations du meme niveau d'adaptation, utiliser
 // le nombre d'iterations du cas permet d'eviter les collisions.
-   std::stringstream MeshFile;
-   const char* nomDir = myCase->GetDirName();
-   MeshFile << nomDir << "/maill." << iaux.str() << ".med";
-   myIteration->SetMeshFile(MeshFile.str().c_str());
+  int jaux ;
+  if      ( nbitercase <    100 ) { jaux = 2 ; }
+  else if ( nbitercase <   1000 ) { jaux = 3 ; }
+  else if ( nbitercase <  10000 ) { jaux = 4 ; }
+  else if ( nbitercase < 100000 ) { jaux = 5 ; }
+  else                            { jaux = 9 ; }
+  std::ostringstream iaux ;
+  iaux << std::setw(jaux) << std::setfill('0') << nbitercase ;
+  std::stringstream MeshFile;
+  MeshFile << nomDirCase << "/maill." << iaux.str() << ".med";
+  myIteration->SetMeshFile(MeshFile.str().c_str());
 
 // Association avec le cas
   std::string label = "IterationHomard_" + std::string(nomIterParent);
@@ -1275,14 +1687,15 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryNam
   MESSAGE ("CreateBoundary : BoundaryName  = " << BoundaryName << ", BoundaryType = " << BoundaryType);
   IsValidStudy () ;
 
+  // Controle du nom :
   if ((myContextMap[GetCurrentStudyID()]._mesBoundarys).find(BoundaryName)!=(myContextMap[GetCurrentStudyID()]._mesBoundarys).end())
   {
-      MESSAGE ("CreateBoundary : la frontiere " << BoundaryName << " existe deja");
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "This boundary has already been defined";
-      throw SALOME::SALOME_Exception(es);
-      return 0;
+    MESSAGE ("CreateBoundary : la frontiere " << BoundaryName << " existe deja");
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This boundary has already been defined";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
   };
 
   HOMARD::HOMARD_Boundary_var myBoundary = newBoundary();
@@ -1425,13 +1838,14 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZone(const char* ZoneName, CORBA::Lo
   MESSAGE ("CreateZone : ZoneName  = " << ZoneName << ", ZoneType = " << ZoneType);
   IsValidStudy () ;
 
+  // Controle du nom :
   if ((myContextMap[GetCurrentStudyID()]._mesZones).find(ZoneName)!=(myContextMap[GetCurrentStudyID()]._mesZones).end())
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "This zone has already been defined";
-      throw SALOME::SALOME_Exception(es);
-      return 0;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This zone has already been defined";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
   };
 
   HOMARD::HOMARD_Zone_var myZone = newZone();
@@ -1731,13 +2145,15 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneNam
 // etatMenage = 1 : destruction du repertoire d'execution
 // modeHOMARD  = 1 : adaptation
 //            != 1 : information avec les options modeHOMARD
-// Option >0 : appel depuis python
-//        <0 : appel depuis GUI
-//=============================================================================
+// Option1 >0 : appel depuis python
+//         <0 : appel depuis GUI
+// Option2 : multiple de nombres premiers
+//         1 : aucune option
+//        x2 : publication du maillage dans SMESH
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option)
+CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option1, CORBA::Long Option2)
 {
-  MESSAGE ( "Compute : traitement de " << NomIteration << ", avec modeHOMARD = " << modeHOMARD << ", avec Option = " << Option );
+  MESSAGE ( "Compute : traitement de " << NomIteration << ", avec modeHOMARD = " << modeHOMARD << ", avec Option1 = " << Option1 << ", avec Option2 = " << Option2 );
 
   // A. Prealable
   int codret = 0;
@@ -1780,7 +2196,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   // B.1. Le repertoire courant
   char* nomDirWork = getenv("PWD") ;
   // B.2. Le sous-repertoire de l'iteration a traiter
-  char* DirCompute = ComputeDir(myCase, myIteration, etatMenage);
+  char* DirCompute = ComputeDirManagement(myCase, myIteration, etatMenage);
   MESSAGE( ". DirCompute = " << DirCompute );
 
   // C. Le fichier des messages
@@ -1809,7 +2225,8 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   // E. Les donnees de l'execution HOMARD
   // E.1. L'objet du texte du fichier de configuration
   HomardDriver* myDriver = new HomardDriver(siter, siterp1);
-  myDriver->TexteInit(DirCompute, LogFile);
+  std::string Langue = "Francais" ;
+  myDriver->TexteInit(DirCompute, LogFile, Langue);
 
   // E.2. Le maillage associe a l'iteration
   const char* NomMesh = myIteration->GetMeshName();
@@ -1824,7 +2241,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
     iaux = 1 ;
     myDriver->TexteMaillageHOMARD( DirCompute, siterp1, iaux ) ;
     myDriver->TexteMaillage(NomMesh, MeshFile, 1);
-    codret = ComputeAdap(myCase, myIteration, etatMenage, myDriver, Option) ;
+    codret = ComputeAdap(myCase, myIteration, etatMenage, myDriver, Option1, Option2) ;
   }
   else
   {
@@ -1848,13 +2265,13 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   int codretexec = 12 ;
   if (codret == 0)
   {
-    codretexec = myDriver->ExecuteHomard(Option);
+    codretexec = myDriver->ExecuteHomard(Option1);
 //
     MESSAGE ( "Erreur en executant HOMARD : " << codretexec );
     if ( modeHOMARD == 1 )
     {
-      if (codretexec == 0) { SetEtatIter(NomIteration,true); }
-      else                 { SetEtatIter(NomIteration,false); }
+      if (codretexec == 0) { SetEtatIter(NomIteration,2); }
+      else                 { SetEtatIter(NomIteration,1); }
       // GERALD -- QMESSAGE BOX
     }
   }
@@ -1884,7 +2301,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
         Commentaire = "Iteration" ;
         Commentaire += " " + siter ;
         PublishFileUnderIteration(NomIteration, MeshFile, Commentaire.c_str());
-        PublishResultInSmesh(MeshFile, 1);
+        if ( Option2 % 2 == 0 ) { PublishResultInSmesh(MeshFile, 1); }
       }
     }
   // H.3 Message d'erreur en cas de probleme
@@ -1895,10 +2312,10 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
       std::string text = "Error during the adaptation.\n" ;
       try
       {
-          ifstream fichier(LogFile.c_str(), ios::in);
-          string ligne;
-          while(getline(fichier, ligne) and (ligne != "===== HOMARD ===== STOP ====="));
-          while (getline(fichier, ligne)) { text += ligne+ "\n";};
+        ifstream fichier(LogFile.c_str(), ios::in);
+        string ligne;
+        while(getline(fichier, ligne) and (ligne != "===== HOMARD ===== STOP ====="));
+        while (getline(fichier, ligne)) { text += ligne+ "\n";};
       }
       catch (...) {
         text += "no log file ....";
@@ -1921,13 +2338,15 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
 //=============================================================================
 // Calcul d'une iteration : partie specifique a l'adaptation
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option)
+CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option1, CORBA::Long Option2)
 {
   MESSAGE ( "ComputeAdap" );
 
   // A. Prealable
   // A.1. Bases
   int codret = 0;
+  // Etat de l'iteration
+  int etat = myIteration->GetState();
   // Numero de l'iteration
   int NumeIter = myIteration->GetNumber();
   std::stringstream saux0 ;
@@ -1935,14 +2354,15 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
   std::string siter = saux0.str() ;
   if (NumeIter < 11) { siter = "0" + siter ; }
 
-  // A.2. On ne calcule pas l iteration 0
-  if ( NumeIter == 0 )
+  // A.2. On ne calcule pas l iteration initiale
+  if ( etat <= 0 )
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "This iteration is the first of the case and cannot be computed.";
-      throw SALOME::SALOME_Exception(es);
-      return 1;
+    MESSAGE ( "etat = "<<etat );
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This iteration is the first of the case and cannot be computed.";
+    throw SALOME::SALOME_Exception(es);
+    return 1;
   };
 
   // A.3. On verifie qu il y a une hypothese (erreur improbable);
@@ -1963,19 +2383,19 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
   HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterationParent];
   ASSERT(!CORBA::is_nil(myIterationParent));
   // Si l'iteration parent n'est pas calculee, on le fait (recursivite amont)
-  if ( ! myIterationParent->GetEtat() )
+  if ( myIterationParent->GetState() == 1 )
   {
-      int iaux = 1 ;
-      int codret = Compute(nomIterationParent, etatMenage, iaux, Option);
-      if (codret != 0)
-      {
-        // GERALD -- QMESSAGE BOX
-        ASSERT("Pb au calcul de l'iteration precedente" == 0);
-      }
+    int iaux = 1 ;
+    int codret = Compute(nomIterationParent, etatMenage, iaux, Option1, Option2);
+    if (codret != 0)
+    {
+      // GERALD -- QMESSAGE BOX
+      ASSERT("Pb au calcul de l'iteration precedente" == 0);
+    }
   };
 
   // C. Le sous-repertoire de l'iteration precedente
-  char* DirComputePa = ComputeDirPa(myCase, myIteration);
+  char* DirComputePa = ComputeDirPaManagement(myCase, myIteration);
   MESSAGE( ". DirComputePa = " << DirComputePa );
 
   // D. Les donnees de l'adaptation HOMARD
@@ -1998,26 +2418,26 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
     fclose(file);
     if (etatMenage == 0)
     {
-          SALOME::ExceptionStruct es;
-          es.type = SALOME::BAD_PARAM;
-          std::string text = "MeshFile : " + std::string(MeshFile) + " already exists ";
-          es.text = CORBA::string_dup(text.c_str());
-          throw SALOME::SALOME_Exception(es);
-          return 4;
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      std::string text = "MeshFile : " + std::string(MeshFile) + " already exists ";
+      es.text = CORBA::string_dup(text.c_str());
+      throw SALOME::SALOME_Exception(es);
+      return 4;
     }
     else
     {
-        std::string commande = "rm -f " + std::string(MeshFile);
-        codret = system(commande.c_str());
-        if (codret != 0)
-        {
-          SALOME::ExceptionStruct es;
-          es.type = SALOME::BAD_PARAM;
-          es.text = "The mesh file cannot be deleted.";
-          throw SALOME::SALOME_Exception(es);
-          return 5;
-        }
+      std::string commande = "rm -f " + std::string(MeshFile);
+      codret = system(commande.c_str());
+      if (codret != 0)
+      {
+        SALOME::ExceptionStruct es;
+        es.type = SALOME::BAD_PARAM;
+        es.text = "The mesh file cannot be deleted.";
+        throw SALOME::SALOME_Exception(es);
+        return 5;
       }
+    }
   }
 
   // D.4. Les types de raffinement et de deraffinement
@@ -2077,15 +2497,72 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
   return codret ;
 }
 //=============================================================================
+// Creation d'un nom de sous-repertoire pour l'iteration au sein d'un repertoire
+//  nomrep : nom du repertoire parent
+//  num : le nom du sous-repertoire est sous la forme 'In', n est >= num
+//=============================================================================
+char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
+{
+  MESSAGE ( "CreateDirNameIter : nomrep ="<< nomrep << ", num = "<<num);
+  char* nomDirActuel = getenv("PWD") ;
+  std::string DirName ;
+  // On boucle sur tous les noms possibles jusqu'a trouver un nom correspondant a un repertoire inconnu
+  bool a_chercher = true ;
+  while ( a_chercher )
+  {
+    // On passe dans le repertoire parent
+    chdir(nomrep);
+    // On recherche un nom sous la forme Iabc, avec abc representant le numero
+    int jaux ;
+    if      ( num <    100 ) { jaux = 2 ; }
+    else if ( num <   1000 ) { jaux = 3 ; }
+    else if ( num <  10000 ) { jaux = 4 ; }
+    else if ( num < 100000 ) { jaux = 5 ; }
+    else                     { jaux = 9 ; }
+    std::ostringstream iaux ;
+    iaux << std::setw(jaux) << std::setfill('0') << num ;
+    std::ostringstream DirNameA ;
+    DirNameA << "I" << iaux.str();
+    // Si on ne pas peut entrer dans le repertoire, on doit verifier
+    // que c'est bien un probleme d'absence
+    if ( chdir(DirNameA.str().c_str()) != 0 )
+    {
+      bool existe = false ;
+      DIR *dp;
+      struct dirent *dirp;
+      dp  = opendir(nomrep);
+      while ( (dirp = readdir(dp)) != NULL )
+      {
+        std::string file_name(dirp->d_name);
+        if ( file_name == DirNameA.str() ) { existe = true ; }
+      }
+      closedir(dp);
+      if ( not existe )
+      {
+        DirName = DirNameA.str() ;
+        a_chercher = false ;
+        break ;
+      }
+    }
+    num += 1;
+  }
+
+  MESSAGE ( "==> DirName = " << DirName);
+  MESSAGE ( ". On retourne dans nomDirActuel = " << nomDirActuel );
+  chdir(nomDirActuel);
+
+  return CORBA::string_dup( DirName.c_str() );
+}
+//=============================================================================
 // Calcul d'une iteration : gestion du repertoire de calcul
 //        Si le sous-repertoire existe :
 //         etatMenage =  0 : on sort en erreur si le repertoire n'est pas vide
 //         etatMenage =  1 : on fait le menage du repertoire
 //         etatMenage = -1 : on ne fait rien
 //=============================================================================
-char* HOMARD_Gen_i::ComputeDir(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage)
+char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage)
 {
-  MESSAGE ( "ComputeDir : repertoires pour le calcul" );
+  MESSAGE ( "ComputeDirManagement : repertoires pour le calcul" );
   // B.2. Le repertoire du cas
   const char* nomDirCase = myCase->GetDirName();
   MESSAGE ( ". nomDirCase = " << nomDirCase );
@@ -2116,15 +2593,15 @@ char* HOMARD_Gen_i::ComputeDir(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Ite
 //  On demande de faire le menage de son contenu :
     if (etatMenage == 1)
     {
-       MESSAGE (". Menage du repertoire DirCompute = " << DirCompute.str());
-       std::string commande= "rm -rf " + DirCompute.str()+"/*" ;
-       int codret = system(commande.c_str());
-       if (codret != 0)
-       {
-         // GERALD -- QMESSAGE BOX
-         std::cerr << ". Menage du repertoire de calcul" << DirCompute.str() << std::endl;
-         ASSERT("Pb au menage du repertoire de calcul" == 0);
-       }
+      MESSAGE (". Menage du repertoire DirCompute = " << DirCompute.str());
+      std::string commande= "rm -rf " + DirCompute.str()+"/*" ;
+      int codret = system(commande.c_str());
+      if (codret != 0)
+      {
+        // GERALD -- QMESSAGE BOX
+        std::cerr << ". Menage du repertoire de calcul" << DirCompute.str() << std::endl;
+        ASSERT("Pb au menage du repertoire de calcul" == 0);
+      }
     }
 //  On n'a pas demande de faire le menage de son contenu : on sort en erreur :
     else
@@ -2137,18 +2614,18 @@ char* HOMARD_Gen_i::ComputeDir(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Ite
         bool result = true;
         while ((dirp = readdir(dp)) != NULL && result )
         {
-              std::string file_name(dirp->d_name);
-              result = file_name.empty() || file_name == "." || file_name == ".."; //if any file - break and return false
+          std::string file_name(dirp->d_name);
+          result = file_name.empty() || file_name == "." || file_name == ".."; //if any file - break and return false
         }
         closedir(dp);
         if ( result == false)
         {
-            SALOME::ExceptionStruct es;
-            es.type = SALOME::BAD_PARAM;
-            std::string text = "Directory : " + DirCompute.str() + "is not empty";
-            es.text = CORBA::string_dup(text.c_str());
-            throw SALOME::SALOME_Exception(es);
-            ASSERT("Directory is not empty" == 0);
+          SALOME::ExceptionStruct es;
+          es.type = SALOME::BAD_PARAM;
+          std::string text = "Directory : " + DirCompute.str() + "is not empty";
+          es.text = CORBA::string_dup(text.c_str());
+          throw SALOME::SALOME_Exception(es);
+          ASSERT("Directory is not empty" == 0);
         }
       }
     }
@@ -2159,9 +2636,9 @@ char* HOMARD_Gen_i::ComputeDir(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Ite
 //=============================================================================
 // Calcul d'une iteration : gestion du repertoire de calcul de l'iteration parent
 //=============================================================================
-char* HOMARD_Gen_i::ComputeDirPa(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration)
+char* HOMARD_Gen_i::ComputeDirPaManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration)
 {
-  MESSAGE ( "ComputeDirPa : repertoires pour le calcul" );
+  MESSAGE ( "ComputeDirPaManagement : repertoires pour le calcul" );
   // Le repertoire du cas
   const char* nomDirCase = myCase->GetDirName();
   MESSAGE ( ". nomDirCase = " << nomDirCase );
@@ -2444,16 +2921,16 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
 
 // Controle de la non publication d'un objet de meme nom
    if ((!aHypo->_is_nil()) or (!aZone->_is_nil()) or (!aBoundary->_is_nil()))
+  {
+    SALOMEDS::Study::ListOfSObject_var listSO = theStudy->FindObjectByName(theName, ComponentDataType());
+    if (listSO->length() >= 1)
     {
-      SALOMEDS::Study::ListOfSObject_var listSO = theStudy->FindObjectByName(theName, ComponentDataType());
-      if (listSO->length() >= 1)
-      {
-          MESSAGE("This name "<<theName<<" is already used "<<listSO->length()<<" time(s)");
-          std::cerr <<"This name "<<theName<<" is already used "<<listSO->length()<<" time(s)" << std::endl;
-          aResultSO = listSO[0];
-          return aResultSO._retn();
-      }
+      MESSAGE("This name "<<theName<<" is already used "<<listSO->length()<<" time(s)");
+      std::cerr <<"This name "<<theName<<" is already used "<<listSO->length()<<" time(s)" << std::endl;
+      aResultSO = listSO[0];
+      return aResultSO._retn();
     }
+  }
 
   // Caracteristiques de l'etude
   SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder();
@@ -2761,11 +3238,11 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long Option)
   MESSAGE( "PublishResultInSmesh " << NomFich << ", avec Option = " << Option);
   if (CORBA::is_nil(myCurrentStudy))
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid study context";
-      throw SALOME::SALOME_Exception(es);
-      return ;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid study context";
+    throw SALOME::SALOME_Exception(es);
+    return ;
   };
 
 // Le module SMESH est-il actif ?
@@ -2777,33 +3254,33 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long Option)
     SALOMEDS::ChildIterator_var aIter = myCurrentStudy->NewChildIterator(aSmeshSO);
     for (; aIter->More(); aIter->Next())
     {
-       SALOMEDS::SObject_var  aSO = aIter->Value();
-       SALOMEDS::GenericAttribute_var aGAttr;
-       if (aSO->FindAttribute(aGAttr,"AttributeExternalFileDef"))
-       {
-           SALOMEDS::AttributeExternalFileDef_var anAttr = SALOMEDS::AttributeExternalFileDef::_narrow(aGAttr);
-           CORBA::String_var value=anAttr->Value();
-           if (strcmp((const char*)value,NomFich) == 0)
-           {
-             MESSAGE ( "PublishResultInSmesh : le fichier " << NomFich << " est deja publie." );
-             // Pour un fichier importe, on ne republie pas
-             if ( Option == 0 )
-             {
-                return;
-             }
-             // Pour un fichier calcule, on commence par faire la depublication
-             else
-             {
-                MESSAGE ( "PublishResultInSmesh : depublication" );
-                SALOMEDS::AttributeName_var anAttr2 = SALOMEDS::AttributeName::_narrow(aGAttr);
-                CORBA::String_var value2=anAttr2->Value();
-                const char* MeshName = value2 ;
-                MESSAGE ( "PublishResultInSmesh : depublication de " << MeshName );
-                DeleteResultInSmesh(NomFich, MeshName) ;
-             }
-           }
-       }
-     }
+      SALOMEDS::SObject_var  aSO = aIter->Value();
+      SALOMEDS::GenericAttribute_var aGAttr;
+      if (aSO->FindAttribute(aGAttr,"AttributeExternalFileDef"))
+      {
+        SALOMEDS::AttributeExternalFileDef_var anAttr = SALOMEDS::AttributeExternalFileDef::_narrow(aGAttr);
+        CORBA::String_var value=anAttr->Value();
+        if (strcmp((const char*)value,NomFich) == 0)
+        {
+          MESSAGE ( "PublishResultInSmesh : le fichier " << NomFich << " est deja publie." );
+          // Pour un fichier importe, on ne republie pas
+          if ( Option == 0 )
+          {
+            return;
+          }
+          // Pour un fichier calcule, on commence par faire la depublication
+          else
+          {
+            MESSAGE ( "PublishResultInSmesh : depublication" );
+            SALOMEDS::AttributeName_var anAttr2 = SALOMEDS::AttributeName::_narrow(aGAttr);
+            CORBA::String_var value2=anAttr2->Value();
+            const char* MeshName = value2 ;
+            MESSAGE ( "PublishResultInSmesh : depublication de " << MeshName );
+            DeleteResultInSmesh(NomFich, MeshName) ;
+          }
+        }
+      }
+    }
   }
 
 // On enregistre le fichier
index b08a42005c9d1aedd65d9925d61a860a6afd9ceb..3fcf18a1bfdeb110a3f38e0bb1e57ce735b8f479 100644 (file)
@@ -73,8 +73,12 @@ public:
                                       CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis, CORBA::Double Angle,
                                       CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre);
 
-  HOMARD::HOMARD_Cas_ptr          CreateCase      (const char* nomCas,
-                                                   const char* MeshName, const char* FileName);
+  HOMARD::HOMARD_Cas_ptr          CreateCase (const char* nomCas, const char* MeshName, const char* FileName);
+  HOMARD::HOMARD_Cas_ptr          CreateCaseFromIteration (const char* nomCas, const char* DirNameStart);
+  HOMARD::HOMARD_Cas_ptr          CreateCaseFromCaseLastIteration (const char* nomCas, const char* DirNameStart);
+  HOMARD::HOMARD_Cas_ptr          CreateCaseFromCaseIteration (const char* nomCas, const char* DirNameStart, CORBA::Long Number);
+  HOMARD::HOMARD_Cas_ptr          CreateCase0 (const char* nomCas, const char* MeshName, const char* FileName, CORBA::Long MeshOption, CORBA::Long NumeIter, CORBA::Long Option);
+  std::string                     CreateCase1 (const char* DirNameStart, CORBA::Long Number);
 
   HOMARD::HOMARD_Hypothesis_ptr   CreateHypothesis(const char* nomHypothesis);
 
@@ -155,12 +159,14 @@ public:
   void                            AssociateCaseIter(const char* nomCas, const char* nomIter,
                                                     const char* labelIter);
 
-  void                            SetEtatIter(const char* nomIter,const CORBA::Boolean EtatCalcul);
+// Actions
+  void                            SetEtatIter(const char* nomIter,const CORBA::Long Etat);
+  char*                           CreateDirNameIter(const char* nomrep, CORBA::Long num );
 
-  CORBA::Long                     Compute(const char* nomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option);
-  CORBA::Long                     ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option);
-  char*                           ComputeDir(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage);
-  char*                           ComputeDirPa(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration);
+  CORBA::Long                     Compute(const char* nomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option1, CORBA::Long Option2);
+  CORBA::Long                     ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option1, CORBA::Long Option2);
+  char*                           ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage);
+  char*                           ComputeDirPaManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration);
   void                            DriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
   void                            DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
   void                            DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
index 0e555430d723254bbd8058f1eed4b745f70eb3fb..d90d4215d21778f57844e2e631c9150a52766e77 100644 (file)
@@ -292,7 +292,7 @@ void HOMARD_Hypothesis_i::SetGroups(const HOMARD::ListGroupType& ListGroup)
   std::list<std::string> ListString;
   for ( int i = 0; i < ListGroup.length(); i++ )
   {
-      ListString.push_back(std::string(ListGroup[i]));
+    ListString.push_back(std::string(ListGroup[i]));
   }
   myHomardHypothesis->SetGroups( ListString );
 }
index 3800555e75cbae11be705624ba492e3423f56f68..6ccffbbd3de46ee79c632b6c3da4fa209dc93208 100644 (file)
@@ -45,7 +45,6 @@ HOMARD_Iteration_i::HOMARD_Iteration_i()
   MESSAGE( "Default constructor, not for use" );
   ASSERT( 0 );
 }
-
 //=============================================================================
 /*!
  *  standard constructor
@@ -60,7 +59,6 @@ HOMARD_Iteration_i::HOMARD_Iteration_i( CORBA::ORB_ptr orb,
   myHomardIteration = new ::HOMARD_Iteration();
   ASSERT( myHomardIteration );
 }
-
 //=============================================================================
 /*!
  *  standard destructor
@@ -138,16 +136,16 @@ CORBA::Long HOMARD_Iteration_i::GetNumber()
   return  myHomardIteration->GetNumber() ;
 }
 //=============================================================================
-void HOMARD_Iteration_i::SetEtat( CORBA::Boolean Etat )
+void HOMARD_Iteration_i::SetState( CORBA::Long Etat )
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetEtat( Etat );
+  myHomardIteration->SetState( Etat );
 }
 //=============================================================================
-CORBA::Boolean HOMARD_Iteration_i::GetEtat()
+CORBA::Long HOMARD_Iteration_i::GetState()
 {
   ASSERT( myHomardIteration );
-  return CORBA::Boolean( myHomardIteration->GetEtat());
+  return myHomardIteration->GetState() ;
 }
 //=============================================================================
 void HOMARD_Iteration_i::SetMeshName( const char* NomMesh )
@@ -222,17 +220,17 @@ char* HOMARD_Iteration_i::GetLogFile()
   return CORBA::string_dup( myHomardIteration->GetLogFile().c_str() );
 }
 //=============================================================================
-CORBA::Long HOMARD_Iteration_i::Compute(CORBA::Long etatMenage)
+CORBA::Long HOMARD_Iteration_i::Compute(CORBA::Long etatMenage, CORBA::Long Option)
 {
-  MESSAGE ( "Compute : calcul d'une iteration" );
+  MESSAGE ( "Compute : calcul d'une iteration"<<", Option = "<<Option );
   ASSERT( myHomardIteration );
 //
 // Nom de l'iteration
   char* IterName = GetName() ;
   CORBA::Long modeHOMARD = 1 ;
-  CORBA::Long Option = 1 ;
+  CORBA::Long Option1 = 1 ;
   MESSAGE ( "Compute : calcul de l'teration " << IterName );
-  return _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option) ;
+  return _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option1, Option) ;
 }
 //=============================================================================
 void HOMARD_Iteration_i::MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte)
@@ -261,7 +259,8 @@ void HOMARD_Iteration_i::MeshInfoOption(CORBA::Long Qual, CORBA::Long Diam, CORB
   if ( Tail != 0 ) { modeHOMARD = modeHOMARD*13 ; }
   if ( Inte != 0 ) { modeHOMARD = modeHOMARD*3 ; }
   MESSAGE ( "MeshInfoOption : information sur le maillage de l'iteration " << IterName );
-  CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option) ;
+  CORBA::Long Option2 = 1 ;
+  CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option, Option2) ;
   MESSAGE ( "MeshInfoOption : codret = " << codret );
 //
   return ;
index 530f842f32f2bcb52870239953e0cca45a0b5d3f..c29d5c4df01054070df782ad34c310426485dc5a 100644 (file)
@@ -71,8 +71,8 @@ public:
   void                   SetNumber( CORBA::Long NumIter );
   CORBA::Long            GetNumber();
 
-  void                   SetEtat( CORBA::Boolean etat );
-  CORBA::Boolean         GetEtat();
+  void                   SetState( CORBA::Long etat );
+  CORBA::Long            GetState();
 
   void                   SetMeshName( const char* NomMesh );
   char*                  GetMeshName();
@@ -90,7 +90,7 @@ public:
   void                   SetLogFile( const char* LogFile );
   char*                  GetLogFile();
 
-  CORBA::Long            Compute(CORBA::Long etatMenage);
+  CORBA::Long            Compute(CORBA::Long etatMenage, CORBA::Long Option);
 
   void                   MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte);
 
index 49860787935f22693b09817dcc9e33f9db034fd6..19208d1a41edb8a1992618ee1c200c865165133d 100644 (file)
@@ -130,10 +130,10 @@ std::set<std::string> GetListeGroupesInMedFile(const char * aFile)
 
     for (int j=0;j<ngro;j++)
     {
-          char str2[MED_LNAME_SIZE+1];
-          strncpy(str2,gro+j*MED_LNAME_SIZE,MED_LNAME_SIZE);
-          str2[MED_LNAME_SIZE] = '\0';
-          ListeGroupes.insert(std::string(str2));
+      char str2[MED_LNAME_SIZE+1];
+      strncpy(str2,gro+j*MED_LNAME_SIZE,MED_LNAME_SIZE);
+      str2[MED_LNAME_SIZE] = '\0';
+      ListeGroupes.insert(std::string(str2));
     }
     free(gro);
   }
index 71aa114439284078707bd0824033d0d850fdafc9..08307af09601593aa4c19f607c41e170c9ef6b1d 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2013
 Test test_1
 """
-__revision__ = "V1.8"
+__revision__ = "V1.9"
 
 #========================================================================
 Test_Name = "test_1"
@@ -117,7 +117,7 @@ Copyright EDF-R&D 2010, 2013
     I1.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.00.med'))
     I1.SetTimeStepRank(1, 1)
     I1.AssociateHypo('a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
-    error = I1.Compute(1)
+    error = I1.Compute(1, 1)
     if error :
       error = 1
       break
@@ -129,7 +129,7 @@ Copyright EDF-R&D 2010, 2013
     I2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.01.med'))
     I2.SetTimeStepRank(1, 1)
     I2.AssociateHypo('a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM')
-    error = I2.Compute(1)
+    error = I2.Compute(1, 1)
     if error :
       error = 2
       break
@@ -139,7 +139,7 @@ Copyright EDF-R&D 2010, 2013
     I3.SetMeshName('M3')
     I3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med'))
     I3.AssociateHypo('Zones_1_et_2')
-    error = I3.Compute(1)
+    error = I3.Compute(1, 1)
     if error :
       error = 3
       break
index b5a10cb94304240e90d2d45f66a6aa2345ec4f0a..20fc41ab9d4b85e939d0dcf502a3231946bd0619 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2013
 Test test_2
 """
-__revision__ = "V1.7"
+__revision__ = "V1.8"
 
 #========================================================================
 Test_Name = "test_2"
@@ -108,7 +108,7 @@ Copyright EDF-R&D 2010, 2013
     Iter_1.SetMeshName('PLAQUE_1')
     Iter_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
     Iter_1.AssociateHypo('Hypo_1')
-    error = Iter_1.Compute(1)
+    error = Iter_1.Compute(1, 1)
     if error :
       error = 1
       break
@@ -118,7 +118,7 @@ Copyright EDF-R&D 2010, 2013
     Iter_2.SetMeshName('PLAQUE_2')
     Iter_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
     Iter_2.AssociateHypo('Hypo_1')
-    error = Iter_2.Compute(1)
+    error = Iter_2.Compute(1, 1)
     if error :
       error = 2
       break
@@ -128,7 +128,7 @@ Copyright EDF-R&D 2010, 2013
     Iter_3.SetMeshName('PLAQUE_3')
     Iter_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med'))
     Iter_3.AssociateHypo('Hypo_2')
-    error = Iter_3.Compute(1)
+    error = Iter_3.Compute(1, 1)
     if error :
       error = 3
       break
index 5c7e49a53e68841467eb6d5b6554d8221bf3ddaf..0d7bd3d402af66766a473ce1deaa961b247bb334 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2011, 2013
 Test test_3
 """
-__revision__ = "V1.5"
+__revision__ = "V1.6"
 
 #========================================================================
 Test_Name = "test_3"
@@ -121,7 +121,7 @@ Copyright EDF-R&D 2010, 2013
       Iter_1.SetMeshName('MOYEU_1')
       Iter_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med'))
       Iter_1.AssociateHypo('Hypo')
-      error = Iter_1.Compute(1)
+      error = Iter_1.Compute(1, 1)
       if error :
         error = 10*iaux + 1
         break
@@ -131,7 +131,7 @@ Copyright EDF-R&D 2010, 2013
       Iter_2.SetMeshName('MOYEU_2')
       Iter_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med'))
       Iter_2.AssociateHypo('Hypo')
-      error = Iter_2.Compute(1)
+      error = Iter_2.Compute(1, 1)
       if error :
         error = 10*iaux + 2
         break