Salome HOME
integration of modifications from Gerald Nicolas BR_KERNEL_REFACTORING
authorrnc <rnc@opencascade.com>
Mon, 4 Feb 2013 14:56:06 +0000 (14:56 +0000)
committerrnc <rnc@opencascade.com>
Mon, 4 Feb 2013 14:56:06 +0000 (14:56 +0000)
74 files changed:
doc/files/tutorial_1.00.med.gz
doc/files/tutorial_1.py
doc/files/tutorial_2.00.med.gz
doc/files/tutorial_2.py
doc/files/tutorial_3.00.med.gz
doc/files/tutorial_3.01.med.gz
doc/files/tutorial_3.py
doc/files/tutorial_4.00.med.gz
doc/files/tutorial_4.fr.med.gz
doc/files/tutorial_4.py
doc/files/tutorial_5.00.med.gz
doc/files/tutorial_5.fr.med.gz
doc/files/tutorial_5.py
doc/gui_create_hypothese.rst
doc/images/create_hypothese_ch_3.png
doc/tui_create_boundary.rst
doc/tui_create_case.rst
doc/tui_create_hypothese.rst
doc/tui_create_iteration.rst
doc/tui_create_zone.rst
doc/tutorials.rst
idl/Gen.xml
idl/HOMARD_Boundary.idl
idl/HOMARD_Cas.idl
idl/HOMARD_Gen.idl
idl/HOMARD_Hypothesis.idl
idl/HOMARD_Iteration.idl
idl/HOMARD_Zone.idl
idl/Makefile.am
resources/HOMARDCatalog.xml.in
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_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/HOMARDGUI/CreateHypothesis.h
src/HOMARDGUI/CreateHypothesis.ui
src/HOMARDGUI/HOMARDGUI.cxx
src/HOMARDGUI/HOMARDGUI.h
src/HOMARDGUI/HOMARD_msg_en.ts
src/HOMARDGUI/HOMARD_msg_fr.ts
src/HOMARDGUI/HomardQtCommun.cxx
src/HOMARDGUI/MonCreateBoundaryAn.cxx
src/HOMARDGUI/MonCreateBoundaryDi.cxx
src/HOMARDGUI/MonCreateCase.cxx
src/HOMARDGUI/MonCreateCase.h
src/HOMARDGUI/MonCreateHypothesis.cxx
src/HOMARDGUI/MonCreateHypothesis.h
src/HOMARDGUI/MonEditCase.cxx
src/HOMARDGUI/MonEditHypothesis.cxx
src/HOMARD_I/HOMARD_Boundary_i.cxx
src/HOMARD_I/HOMARD_Boundary_i.hxx
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_Hypothesis_i.hxx
src/HOMARD_I/HOMARD_Iteration_i.cxx
src/HOMARD_I/HOMARD_Iteration_i.hxx
src/HOMARD_I/HOMARD_Zone_i.cxx
src/HOMARD_I/HOMARD_Zone_i.hxx
src/HOMARD_I/HomardMedCommun.cxx
src/HOMARD_I/HomardMedCommun.h
tests/test_1.py
tests/test_2.py
tests/test_3.py

index 68242dfd0943fb04eb3954997d1d4eb3e9812cc9..fd09700b2e12f0fd23aba48060533d0363ea3aab 100644 (file)
Binary files a/doc/files/tutorial_1.00.med.gz and b/doc/files/tutorial_1.00.med.gz differ
index dd941e766d10a19bc17c28d9d776efda9dee6d85..de07bc9433f1c9200af35d44b390277220848529 100644 (file)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.3"
+__revision__ = "V1.4"
+#
+import os
 #
 # ==================================
 # Repertoire a personnaliser
 # Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med, maill.03.med
-dircase = "/tmp"
+if os.environ.has_key("LOGNAME") :
+  user = os.environ ["LOGNAME"]
+else :
+  user = "anonymous"
+dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
 # ==================================
-import os
 # Ce repertoire contient les fichiers de donnees : tutorial_1.00.med
 pathHomard = os.getenv('HOMARD_ROOT_DIR')
 data_dir = os.path.join(pathHomard, "share/doc/salome/gui/HOMARD/_downloads")
index 51a01c9c686500443d42d233dbb350fa1c9eaf9d..a090234c7c2857b5ec0506b5d0197764b27cc266 100644 (file)
Binary files a/doc/files/tutorial_2.00.med.gz and b/doc/files/tutorial_2.00.med.gz differ
index 8560506a7088271ab652b11e406e38f182a1d0c4..93af69f82ad0a82a855b778f120b5a91bd6d2e45 100644 (file)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.4"
+__revision__ = "V1.5"
+#
+import os
 #
 # ==================================
 # Repertoire a personnaliser
 # Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med
-dircase = "/tmp"
+if os.environ.has_key("LOGNAME") :
+  user = os.environ ["LOGNAME"]
+else :
+  user = "anonymous"
+dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
 # ==================================
-import os
 # Ce repertoire contient les fichiers de donnees : tutorial_2.00.med
 pathHomard = os.getenv('HOMARD_ROOT_DIR')
 data_dir = os.path.join(pathHomard, "share/doc/salome/gui/HOMARD/_downloads")
index 8fb733a6b1d58cc3ad1a21d5e0947625f3227475..d99332b746e865436db77a975c8b3cde5f0ecec6 100644 (file)
Binary files a/doc/files/tutorial_3.00.med.gz and b/doc/files/tutorial_3.00.med.gz differ
index 266b495e891f5ea26871ac1909e4cb8a7e2739f6..4ea6788de9ac236048bc5d34533e2ac312181fa4 100644 (file)
Binary files a/doc/files/tutorial_3.01.med.gz and b/doc/files/tutorial_3.01.med.gz differ
index a66c2aa1cd5f18d6df8f0fe2b685237993e94847..a457e50918ed651ce0142b9226233e4c513c61fc 100644 (file)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.4"
+__revision__ = "V1.5"
+#
+import os
 #
 # ==================================
 # Repertoire a personnaliser
 # Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med
-dircase = "/tmp"
+if os.environ.has_key("LOGNAME") :
+  user = os.environ ["LOGNAME"]
+else :
+  user = "anonymous"
+dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
 # ==================================
-import os
 # Ce repertoire contient les fichiers de donnees : tutorial_3.00.med, tutorial_3.01.med
 pathHomard = os.getenv('HOMARD_ROOT_DIR')
 data_dir = os.path.join(pathHomard, "share/doc/salome/gui/HOMARD/_downloads")
index a9c94d7739051eb3e25d56d8b741a452c78e5886..b0bc427354a4c1453f07751be52cc802a2a56f5c 100644 (file)
Binary files a/doc/files/tutorial_4.00.med.gz and b/doc/files/tutorial_4.00.med.gz differ
index 3bdc67a462e9a92f0f6ec6f5534a79bd3a1f5bea..171bc3ade1e10706dff6448d8f41bd78bb802f0a 100644 (file)
Binary files a/doc/files/tutorial_4.fr.med.gz and b/doc/files/tutorial_4.fr.med.gz differ
index 6f8a27fd5ecaa7cdd421df0740a40f31c94ede25..ab4c2dc836093a042e5d667cbb57694e459a8802 100644 (file)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2011, 2013
 """
-__revision__ = "V1.4"
+__revision__ = "V2.1"
+#
+import os
 #
 # ==================================
 # Repertoire a personnaliser
-# Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med
-dircase = "/tmp"
+# Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med, maill.03.med
+if os.environ.has_key("LOGNAME") :
+  user = os.environ ["LOGNAME"]
+else :
+  user = "anonymous"
+dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+    os.mkdir (dircase)
 # ==================================
-import os
 # Ce repertoire contient les fichiers de donnees : tutorial_4.00.med, tutorial_4.fr.med
 pathHomard = os.getenv('HOMARD_ROOT_DIR')
 data_dir = os.path.join(pathHomard, "share/doc/salome/gui/HOMARD/_downloads")
@@ -76,27 +83,33 @@ Hypo_2.AddGroup('T2_EXT')
 Case = homard.CreateCase('Case', 'PIQUAGE', data_dir+'/tutorial_4.00.med')
 Case.SetDirName(dircase)
 Case.AddBoundaryGroup( 'intersection', '' )
-Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' )
-Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' )
-Case.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' )
 Case.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_I' )
+Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_I' )
 Case.AddBoundaryGroup( 'cyl_1_int', 'T1_INT_O' )
+Case.AddBoundaryGroup( 'cyl_1_ext', 'T1_EXT_O' )
 Case.AddBoundaryGroup( 'cyl_2_int', 'T2_INT' )
+Case.AddBoundaryGroup( 'cyl_2_ext', 'T2_EXT' )
 #
 # Creation of the iterations
 # ==========================
-# Creation of the iteration Iter_1
+# Creation of the iteration Iter_1 : raffinement selon les faces internes
 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)
-# Creation of the iteration Iter_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)
+# 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)
 
 if salome.sg.hasDesktop():
   salome.sg.updateObjBrowser(1)
index e017044031edbd500ec21b855f5a7aa7273e25f5..3fa867a9e310f544f3fb0db7347236e0e56842e7 100644 (file)
Binary files a/doc/files/tutorial_5.00.med.gz and b/doc/files/tutorial_5.00.med.gz differ
index 4c9ccbdd11b066ea381bcdb2805ce9ef936cc8f4..aa586d051f3a83d45b9d87908f861835c7cacca5 100644 (file)
Binary files a/doc/files/tutorial_5.fr.med.gz and b/doc/files/tutorial_5.fr.med.gz differ
index 48f0fcffc06a300373ef2b9b48c36601eb7e82ba..3104253bc38ac873fae04a5e2c5a35c3a811553c 100644 (file)
 Exemple de couplage HOMARD-Salome
 Copyright EDF-R&D 1996, 2010, 2013
 """
-__revision__ = "V1.3"
+__revision__ = "V1.4"
+#
+import os
 #
 # ==================================
 # Repertoire a personnaliser
-# Ce repertoire contient les fichiers de donnees : tutorial_5.00.med, tutorial_5.fr.med
 # Ce repertoire contiendra les fichiers de resultats : maill.01.med, maill.02.med
-dircase = "/tmp"
+if os.environ.has_key("LOGNAME") :
+  user = os.environ ["LOGNAME"]
+else :
+  user = "anonymous"
+dircase = os.path.join( os.sep, "tmp", "HOMARD_"+user)
+if not os.path.isdir(dircase) :
+  os.mkdir (dircase)
 # ==================================
-import os
 # Ce repertoire contient les fichiers de donnees : tutorial_5.00.med, tutorial_5.fr.med
 pathHomard = os.getenv('HOMARD_ROOT_DIR')
 data_dir = os.path.join(pathHomard, "share/doc/salome/gui/HOMARD/_downloads")
index ea7f004e338e3962b300d62218e62b36537540e8..1fc08f2b6a6d1a3e100683467518b33ad57a3e62 100644 (file)
@@ -45,11 +45,12 @@ On peut choisir de ne pas utiliser directement le champ, mais sa variation d'un
 
 
 Le raffinement se fait selon un seuil qui définit un critère haut de raffinement. Toutes les mailles pour lesquelles l'indicateur est supérieur Ã  ce critère seront raffinées.
-Pour le choix du critère, trois variantes sont possible :
+Pour le choix du critère, quatre variantes sont possible :
 
   - selon un pourcentage de mailles Ã  raffiner, nombre réel compris entre 0 et 100 ; HOMARD raffinera les x% des mailles qui ont la plus grande valeur du champ.
   - selon une valeur relative du champ, nombre compris entre 0 et 100 ; HOMARD raffinera les mailles où le champ est supérieur Ã  x% de l'intervalle [mini,maxi].
-  - selon une valeur absolue ; toutes les mailles avec une valeur de champ supérieure Ã  cette valeur seront raffinées.
+  - au dela d'une valeur absolue ; toutes les mailles avec une valeur de champ supérieure Ã  cette valeur seront raffinées.
+  - au dela d'une valeur absolue valant la moyenne de la répartition du champ augmentée de n fois son Ã©cart-type ; toutes les mailles avec une valeur de champ supérieure Ã  cette valeur seront raffinées.
 
 La même convention s'applique au déraffinement, en remplaçant supérieur par inférieur. On peut inactiver une des fonctions (raffinement ou déraffinement) en cochant le bouton ad_hoc.
 
index d1f146c6b61cc447a7f7a946893601de39f67c82..a78111d5b0f05ee1470fb04ba482b51b2c903826 100644 (file)
Binary files a/doc/images/create_hypothese_ch_3.png and b/doc/images/create_hypothese_ch_3.png differ
index 092bd711998e561510ee6ffef39c9dce6549971c..aed6017d6aef55f999a7d7afa80c28bb11fda189 100644 (file)
@@ -64,31 +64,69 @@ Ces m
 |                                                               |
 +---------------------------------------------------------------+
 
+Méthodes de la classe cas
+"""""""""""""""""""""""""
+Voir Ã©galement dans dans :ref:`tui_create_case`.
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: AddBoundaryGroup                                  |
+|                                                               |
+| **AddBoundaryGroup(boundary, group)**                         |
+|     Ajoute une frontière Ã  la définition du cas               |
+|                                                               |
+|     - ``boundary`` : nom d'une frontière courbe Ã  suivre      |
+|                                                               |
+|     Pour une frontière discrète :                             |
+|                                                               |
+|     . si toutes les lignes courbes sont suivies, le second    |
+|       argument est une chaîne vide.                           |
+|     . si seulement certaines lignes courbes sont suivies,     |
+|       ``group`` est le nom d'un groupe de segments Ã  suivre.  |
+|                                                               |
+|     Pour une frontière analytique :                           |
+|                                                               |
+|     - ``group`` : nom d'un groupe de faces placées sur la     |
+|       frontière                                               |
++---------------------------------------------------------------+
+
 Méthodes de la classe boundary
 """"""""""""""""""""""""""""""
 
-+-------------------------------------------------------------------+
-+-------------------------------------------------------------------+
-| .. module:: GetName                                               |
-|                                                                   |
-| **GetName()**                                                     |
-|     Retourne le nom de la frontière                               |
-+-------------------------------------------------------------------+
-| .. module:: GetType                                               |
-|                                                                   |
-| **GetType()**                                                     |
-|     Retourne le type de la frontière :                            |
-|                                                                   |
-|         * 0 : discrète                                            |
-|         * 1 : cylindre                                            |
-|         * 2 : sphère                                              |
-+-------------------------------------------------------------------+
-| .. module:: GetCoords                                             |
-|                                                                   |
-| **GetCoords()**                                                   |
-|     Retourne un tableau contenant les coordonnées de la frontière |
-|     dans l'ordre d'entrée dans le CreateBoundaryXXXX associé      |
-+-------------------------------------------------------------------+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: GetName                                           |
+|                                                               |
+| **GetName()**                                                 |
+|     Retourne le nom de la frontière                           |
++---------------------------------------------------------------+
+| .. module:: GetType                                           |
+|                                                               |
+| **GetType()**                                                 |
+|     Retourne le type de la frontière :                        |
+|                                                               |
+|         * 0 : discrète                                        |
+|         * 1 : cylindre                                        |
+|         * 2 : sphère                                          |
++---------------------------------------------------------------+
+| .. module:: GetCoords                                         |
+|                                                               |
+| **GetCoords()**                                               |
+|     Retourne un tableau contenant les coordonnées de la       |
+|     frontière dans l'ordre d'entrée dans le CreateBoundaryXXXX|
+|     associé                                                   |
++---------------------------------------------------------------+
+| .. index:: single: Delete                                     |
+|                                                               |
+| **Delete()**                                                  |
+|     Detruit la frontière.                                     |
+|     Pour une frontière discrète, le fichier du maillage       |
+|     associé est conservé.                                     |
+|                                                               |
+|     Retourne un entier :                                      |
+|         * 0 : destruction réussie                             |
+|         * autre valeur : problème                             |
++---------------------------------------------------------------+
 
 
 Exemple
index 420d1e903b08a31e4a642cc4aecd4259940f5f2d..21b6950d40ebf5fd78405ffd38fee7403df7f6cd 100644 (file)
@@ -109,6 +109,16 @@ M
 |     - ``group`` : nom d'un groupe de faces placées sur la     |
 |       frontière                                               |
 +---------------------------------------------------------------+
+| .. index:: single: Delete                                     |
+|                                                               |
+| **Delete()**                                                  |
+|     Detruit le cas et toutes les itérations associées.        |
+|     Le fichier du maillage associé est conservé.              |
+|                                                               |
+|     Retourne un entier :                                      |
+|         * 0 : destruction réussie                             |
+|         * autre valeur : problème                             |
++---------------------------------------------------------------+
 
 Les options avancées
 ^^^^^^^^^^^^^^^^^^^^
index 71663fc4963e2ff3900a4cfe8cefc17da80d1eed..93cfc15c1f1920e78130cfb9f112b420e5479de6 100644 (file)
@@ -86,6 +86,15 @@ G
 | **GetUnRefType()**                                            |
 |     Retourne le type de déraffinement                         |
 +---------------------------------------------------------------+
+| .. index:: single: Delete                                     |
+|                                                               |
+| **Delete()**                                                  |
+|     Detruit l'hypothèse                                       |
+|                                                               |
+|     Retourne un entier :                                      |
+|         * 0 : destruction réussie                             |
+|         * autre valeur : problème                             |
++---------------------------------------------------------------+
 
 Le champ et les seuils
 ^^^^^^^^^^^^^^^^^^^^^^
@@ -125,6 +134,7 @@ Le champ et les seuils
 |        * 1 : valeur absolue                                   |
 |        * 2 : valeur relative en %                             |
 |        * 3 : fraction des mailles en %                        |
+|        * 4 : moyenne + n fois l'écart-type                    |
 |                                                               |
 |     - ``threshold`` : valeur du seuil                         |
 +---------------------------------------------------------------+
@@ -144,6 +154,7 @@ Le champ et les seuils
 |        * 1 : valeur absolue                                   |
 |        * 2 : valeur relative en %                             |
 |        * 3 : fraction des mailles en %                        |
+|        * 4 : moyenne - n fois l'écart-type                    |
 |                                                               |
 |     - ``threshold`` : valeur du seuil                         |
 +---------------------------------------------------------------+
index d09ab686a2945b81c89a94420f3dadee88386a25..4f4234bd5d1f44a721665881e60ec56399a04927 100644 (file)
@@ -38,15 +38,24 @@ M
 |                                                               |
 | **NextIteration(iter_name)**                                  |
 |     Retourne une instance de la classe ``iteration`` après    |
-|     sa création : celle qui suit immédiatement l'itération    |
+|     sa création : elle suit immédiatement l'itération         |
 |     initiale, correspondant au maillage définissant le cas    |
 |                                                               |
-|     - ``iter_name`` : le nom de l'itération                   |
+|     - ``iter_name`` : le nom Ã  donner Ã  la nouvelle itération |
 |                                                               |
 | Par défaut :                                                  |
 |                                                               |
 |  * le maillage produit a le même nom que l'itération          |
 +---------------------------------------------------------------+
+| .. module:: LastIteration                                     |
+|                                                               |
+| **LastIteration()**                                           |
+|     Retourne une instance de la classe ``iteration`` : la     |
+|     dernière créée dans la descendance de l'itération initiale|
+|     du cas. C'est celle qui est sans fille. Il y a erreur s'il|
+|     existe plus d'une branche dans la descendance.            |
+|                                                               |
++---------------------------------------------------------------+
 
 Méthodes de la classe iteration
 """""""""""""""""""""""""""""""
@@ -62,7 +71,7 @@ G
 |     Retourne une instance de la classe ``iteration`` qui suit |
 |     l'itération courante                                      |
 |                                                               |
-|     - ``iter_name`` : le nom de l'itération                   |
+|     - ``iter_name`` : le nom Ã  donner Ã  la nouvelle itération |
 |                                                               |
 | Par défaut :                                                  |
 |                                                               |
@@ -102,6 +111,14 @@ G
 | **GetIterParent()**                                           |
 |     Retourne l'itération mère                                 |
 +---------------------------------------------------------------+
+| .. module:: LastIteration                                     |
+|                                                               |
+| **LastIteration()**                                           |
+|     Retourne une instance de la classe ``iteration`` : la     |
+|     dernière créée dans la descendance de l'itération. C'est  |
+|     celle qui est sans fille. Il y a erreur s'il existe plus  |
+|     d'une branche dans la descendance.                        |
++---------------------------------------------------------------+
 | .. module:: AssociateHypo                                     |
 |                                                               |
 | **AssociateHypo(hypo_name)**                                  |
@@ -127,12 +144,29 @@ G
 |     - ``0`` : itération non calculée                          |
 |     - ``1`` : itération calculée correctement                 |
 +---------------------------------------------------------------+
+| .. index:: single: Delete                                     |
+|                                                               |
+| **Delete()**                                                  |
+|     Detruit l'itération et toutes ses filles Ã©ventuelles. Les |
+|     fichiers des maillages associés sont supprimés.           |
+|                                                               |
+|     Retourne un entier :                                      |
+|         * 0 : destruction réussie                             |
+|         * autre valeur : problème                             |
++---------------------------------------------------------------+
 
 Informations sur les maillages
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
+| .. module:: SetMeshName                                       |
+|                                                               |
+| **SetMeshName(mesh_name)**                                    |
+|     Définit le nom du maillage produit                        |
+|                                                               |
+|     - ``mesh_name`` : le nom du maillage produit              |
++---------------------------------------------------------------+
 | .. module:: GetMeshName                                       |
 |                                                               |
 | **GetMeshName()**                                             |
index dccbe8c9017fae94a1304c1b26fb3a7dde07960a..1441360e1a9184e518c2fd5ef8f1bce6823b5013 100644 (file)
@@ -172,6 +172,15 @@ M
 |     Retourne un tableau contenant les coordonnées de la zone  |
 |     dans l'ordre d'entrée dans le CreateZoneXXXX associé      |
 +---------------------------------------------------------------+
+| .. index:: single: Delete                                     |
+|                                                               |
+| **Delete()**                                                  |
+|     Detruit la zone                                           |
+|                                                               |
+|     Retourne un entier :                                      |
+|         * 0 : destruction réussie                             |
+|         * autre valeur : problème                             |
++---------------------------------------------------------------+
 
 
 Exemple
index 72976ac3ebb547bec8be859e5624cc50a9553c07..41ca5c029031dace451dca60a27b87c14ea03a16 100644 (file)
@@ -3,7 +3,8 @@ Exemples
 .. index:: single: exemple
 .. index:: single: python
 
-On trouvera ici les instructions python pour quelques configurations caractéristiques. Les fichiers de données associés sont téléchargeables. Il faut penser Ã  adapter la valeur de la variable ``data_dir`` : c'est le répertoire dans lequel les fichiers med auront Ã©té enregistrés. C'est dans ce répertoire ``dircase`` que seront Ã©crits les fichiers résultant des adaptations successives.
+On trouvera ici les instructions python pour quelques configurations caractéristiques. Les fichiers de données associés sont téléchargeables. Il faut penser Ã  adapter la valeur de la variable ``data_dir`` : c'est le répertoire dans lequel les fichiers med auront Ã©té enregistrés.
+C'est dans le répertoire ``dircase`` que seront Ã©crits les fichiers résultant des adaptations successives. Ce répertoire est créé par défaut dans ``/tmp``.
 
 Raffinement uniforme
 """"""""""""""""""""
@@ -215,7 +216,8 @@ Suivi de fronti
 """""""""""""""""""""""""""
 .. index:: single: champ
 
-On teste ici le suivi des frontières courbes : des frontières analytiques pour décrire les différentes surfaces des tuyaux et une frontière discrète pour décrire les lignes d'intersection des deux tuyaux. Le pilotage du raffinement est le suivant : raffinement uniforme de toutes les mailles contenues dans des groupes désignés.
+On teste ici le suivi des frontières courbes : des frontières analytiques pour décrire les différentes surfaces des tuyaux et une frontière discrète pour décrire les lignes d'intersection des deux tuyaux. Le pilotage du raffinement est le suivant : raffinement uniforme de toutes les mailles contenues dans des groupes désignés. On commence par raffiner les faces internes aux tuyaux ; ensuite, on raffine deux fois de suite les faces externes aux tuyaux.
+Le schéma YACS réalisant cette adaptation est téléchargeable.
 ::
 
   #
@@ -260,18 +262,24 @@ On teste ici le suivi des fronti
   #
   # Creation of the iterations
   # ==========================
-  # Creation of the iteration Iter_1
+  # Creation of the iteration Iter_1 : raffinement selon les faces internes
   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)
-  # Creation of the iteration Iter_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)
+  # 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)
 
 .. note::
   Téléchargement des fichiers
@@ -279,6 +287,7 @@ On teste ici le suivi des fronti
   * :download:`maillage initial<files/tutorial_4.00.med.gz>`
   * :download:`maillage de la frontière discrète<files/tutorial_4.fr.med.gz>`
   * :download:`commandes python<files/tutorial_4.py>`
+  * :download:`schéma YACS<files/tutorial_4.xml>`
 
 
 Instructions spécifiques au 2D
index d18a7f282efb022e3d019dcb7f0858d6d373de78..468db6d74b7819326933ce01f4758ede87201b5d 100644 (file)
@@ -15,7 +15,7 @@
             <component-username>HOMARD</component-username>
             <component-type>OTHER</component-type>
             <component-author>HOMARD team - EDF RD</component-author>
-            <component-version>1.2</component-version>
+            <component-version>1.3</component-version>
             <component-comment>unknown</component-comment>
             <component-multistudy>1</component-multistudy>
             <component-impltype>1</component-impltype>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
-                    <component-service>
-                        <service-name>CreateIteration</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>IterName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>PreviousIterName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>HOMARD/HOMARD_Iteration</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
                     <component-service>
                         <service-name>CreateZoneBox</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <DataStream-list></DataStream-list>
                     </component-service>
                     <component-service>
-                        <service-name>GetZone</service-name>
+                        <service-name>GetHypothesis</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <service-version>1.1</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>ZoneName</inParameter-name>
+                                <inParameter-name>HypoName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <outParameter-list>
                             <outParameter>
                                 <outParameter-name>return</outParameter-name>
-                                <outParameter-type>HOMARD/HOMARD_Zone</outParameter-type>
+                                <outParameter-type>HOMARD/HOMARD_Hypothesis</outParameter-type>
                                 <outParameter-comment>unknown</outParameter-comment>
                             </outParameter>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
                     <component-service>
-                        <service-name>GetHypothesis</service-name>
+                        <service-name>GetIteration</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <service-version>1.1</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>HypoName</inParameter-name>
+                                <inParameter-name>IterName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <outParameter-list>
                             <outParameter>
                                 <outParameter-name>return</outParameter-name>
-                                <outParameter-type>HOMARD/HOMARD_Hypothesis</outParameter-type>
+                                <outParameter-type>HOMARD/HOMARD_Iteration</outParameter-type>
                                 <outParameter-comment>unknown</outParameter-comment>
                             </outParameter>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
                     <component-service>
-                        <service-name>GetIteration</service-name>
+                        <service-name>GetZone</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <service-version>1.1</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>IterName</inParameter-name>
+                                <inParameter-name>ZoneName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <outParameter-list>
                             <outParameter>
                                 <outParameter-name>return</outParameter-name>
-                                <outParameter-type>HOMARD/HOMARD_Iteration</outParameter-type>
+                                <outParameter-type>HOMARD/HOMARD_Zone</outParameter-type>
                                 <outParameter-comment>unknown</outParameter-comment>
                             </outParameter>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
                     <component-service>
-                        <service-name>SetCurrentStudy</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>theStudy</inParameter-name>
-                                <inParameter-type>SALOMEDS/Study</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>InvalideBoundary</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>BounName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>InvalideZone</service-name>
+                        <service-name>LastIteration</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <service-version>1.1</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>ZoneName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>InvalideHypo</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>HypoName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>InvalideIter</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>IterName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>Compute</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.2</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>IterName</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>etatMenage</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>long</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>VerifieDir</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>IterName</inParameter-name>
+                                <inParameter-name>CaseName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <outParameter-list>
                             <outParameter>
                                 <outParameter-name>return</outParameter-name>
-                                <outParameter-type>boolean</outParameter-type>
+                                <outParameter-type>HOMARD/HOMARD_Iteration</outParameter-type>
                                 <outParameter-comment>unknown</outParameter-comment>
                             </outParameter>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
                     <component-service>
-                        <service-name>PublishFileUnderIteration</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list>
-                            <inParameter>
-                                <inParameter-name>NomIter</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>NomFich</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>Commentaire</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                        </inParameter-list>
-                        <outParameter-list></outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>PublishResultInSmesh</service-name>
+                        <service-name>SetCurrentStudy</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <service-version>1.1</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>NomFich</inParameter-name>
-                                <inParameter-type>string</inParameter-type>
-                                <inParameter-comment>unknown</inParameter-comment>
-                            </inParameter>
-                            <inParameter>
-                                <inParameter-name>IconeType</inParameter-name>
-                                <inParameter-type>long</inParameter-type>
+                                <inParameter-name>theStudy</inParameter-name>
+                                <inParameter-type>SALOMEDS/Study</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         </inParameter-list>
                         <outParameter-list></outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
-                    <component-service>
-                        <service-name>GetCurrentStudy</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list></inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>SALOMEDS/Study</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
-                    <component-service>
-                        <service-name>GetCurrentStudyID</service-name>
-                        <service-author>HOMARD team - EDF RD</service-author>
-                        <service-version>1.1</service-version>
-                        <service-comment>unknown</service-comment>
-                        <service-by-default>0</service-by-default>
-                        <inParameter-list></inParameter-list>
-                        <outParameter-list>
-                            <outParameter>
-                                <outParameter-name>return</outParameter-name>
-                                <outParameter-type>long</outParameter-type>
-                                <outParameter-comment>unknown</outParameter-comment>
-                            </outParameter>
-                        </outParameter-list>
-                        <DataStream-list></DataStream-list>
-                    </component-service>
                 </component-service-list>
             </component-interface-list>
         </component>
index 61d9d85dc96c14f28427619b05ecd1625ecd25a5..78954a34a8b28e561f43a27f268aa668fecb0f9f 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_Boundary_IDL
 #define _HOMARD_Boundary_IDL
@@ -32,10 +41,15 @@ module HOMARD
 {
   interface HOMARD_Boundary : Engines::EngineComponent
   {
+// Generalites
+    void     SetName(in string Name)                       raises (SALOME::SALOME_Exception);
+    string   GetName()                                     raises (SALOME::SALOME_Exception);
+
+    long     Delete()                                      raises (SALOME::SALOME_Exception);
 
-    void     SetName (in string Name)                      raises (SALOME::SALOME_Exception);
-    string   GetName ()                                    raises (SALOME::SALOME_Exception);
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
 
+// Caracteristiques
     void     SetType (in long Type)                        raises (SALOME::SALOME_Exception);
     long     GetType()                                     raises (SALOME::SALOME_Exception);
 
@@ -58,14 +72,13 @@ module HOMARD
                                                            raises (SALOME::SALOME_Exception);
     HOMARD::double_array GetLimit()                        raises (SALOME::SALOME_Exception);
 
-    void     SetCaseCreation(in string NomCas)             raises (SALOME::SALOME_Exception);
-    string   GetCaseCreation()                             raises (SALOME::SALOME_Exception);
-
     void       AddGroup(in string LeGroupe)                raises (SALOME::SALOME_Exception);
-    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
     void       SetGroups(in ListGroupType ListGroup)       raises (SALOME::SALOME_Exception);
+    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
 
-    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+// Liens avec les autres iterations
+    void     SetCaseCreation(in string NomCas)             raises (SALOME::SALOME_Exception);
+    string   GetCaseCreation()                             raises (SALOME::SALOME_Exception);
 
   };
 };
index 4690950377366c9392e436b31da69067efca917c..4dd2c3a794b3a760a2215f62a1f87f6fac0d35a8 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_CAS_IDL
 #define _HOMARD_CAS_IDL
@@ -35,40 +44,47 @@ module HOMARD
 
  interface HOMARD_Cas : Engines::EngineComponent
   {
-
-    void     SetName(in string NomCas)                     raises (SALOME::SALOME_Exception);
+// Generalites
+    void     SetName(in string Name)                       raises (SALOME::SALOME_Exception);
     string   GetName()                                     raises (SALOME::SALOME_Exception);
 
+    long     Delete()                                      raises (SALOME::SALOME_Exception);
+
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+
+// Caracteristiques
     void     SetDirName(in string NomDir)                  raises (SALOME::SALOME_Exception);
     string   GetDirName()                                  raises (SALOME::SALOME_Exception);
 
+    long     GetNumber()                                   raises (SALOME::SALOME_Exception);
+
     void     SetConfType(in long ConfType)                 raises (SALOME::SALOME_Exception);
     long     GetConfType()                                 raises (SALOME::SALOME_Exception);
 
-    HOMARD_Iteration GetIter0 ()                           raises (SALOME::SALOME_Exception);
-    string   GetIter0Name ()                               raises (SALOME::SALOME_Exception);
-
-    HOMARD_Iteration NextIteration(in string NomIter)      raises (SALOME::SALOME_Exception);
-
-    void     AddIteration (in string NomIteration)         raises (SALOME::SALOME_Exception);
-
-    extrema  GetBoundingBox()                              raises (SALOME::SALOME_Exception);
     void     SetBoundingBox(in extrema LesExtremes)        raises (SALOME::SALOME_Exception);
+    extrema  GetBoundingBox()                              raises (SALOME::SALOME_Exception);
 
-    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
-    void     SetGroups(in ListGroupType ListGroup)         raises (SALOME::SALOME_Exception);
     void     AddGroup(in string Group)                     raises (SALOME::SALOME_Exception);
+    void     SetGroups(in ListGroupType ListGroup)         raises (SALOME::SALOME_Exception);
+    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
 
-    long     GetNumber()                                   raises (SALOME::SALOME_Exception);
-    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
-
-    ListBoundaryGroupType GetBoundaryGroup()               raises (SALOME::SALOME_Exception);
-    void     AddBoundaryGroup(in string NomBoundary, in string Group)
+    void     AddBoundaryGroup(in string BoundaryName, in string Group)
                                                            raises (SALOME::SALOME_Exception);
+    ListBoundaryGroupType GetBoundaryGroup()               raises (SALOME::SALOME_Exception);
 
     void     SetPyram(in long Pyram)                       raises (SALOME::SALOME_Exception);
     long     GetPyram()                                    raises (SALOME::SALOME_Exception);
 
+// Liens avec les autres structures
+    string   GetIter0Name ()                               raises (SALOME::SALOME_Exception);
+    HOMARD_Iteration GetIter0 ()                           raises (SALOME::SALOME_Exception);
+
+    HOMARD_Iteration NextIteration(in string IterName)     raises (SALOME::SALOME_Exception);
+
+    HOMARD_Iteration LastIteration()                       raises (SALOME::SALOME_Exception);
+
+    void     AddIteration (in string IterName)             raises (SALOME::SALOME_Exception);
+
   };
 };
 #endif
index baff257150f88adeec29510a0d6389549c84058e..5780c4289eea042eea8c654d0b8c0d116ca02381 100644 (file)
@@ -47,6 +47,17 @@ module HOMARD
 //
 // A.1. Les creations
 //
+    HOMARD_Boundary   CreateBoundaryDi (in string BoundaryName, in string MeshName, in string FileName)
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Boundary   CreateBoundaryCylinder (in string BoundaryName,
+                                      in double Xcentre, in double Ycentre, in double Zcentre,
+                                      in double Xaxis, in double Yaxis, in double Zaxis,
+                                      in double Radius)
+                                                           raises (SALOME::SALOME_Exception);
+    HOMARD_Boundary   CreateBoundarySphere (in string BoundaryName,
+                                      in double Xcentre, in double Ycentre, in double Zcentre,
+                                      in double Radius)
+                                                           raises (SALOME::SALOME_Exception);
     HOMARD_Cas        CreateCase(in string CaseName, in string MeshName, in string FileName )
                                                            raises (SALOME::SALOME_Exception);
     HOMARD_Hypothesis CreateHypothesis(in string HypoName )
@@ -56,25 +67,16 @@ module HOMARD
                                      in double Ymini, in double Ymaxi,
                                      in double Zmini, in double Zmaxi)
                                                            raises (SALOME::SALOME_Exception);
-    HOMARD_Zone       CreateZoneSphere (in string ZoneName,
-                                        in double Xcentre, in double Ycentre, in double Zcentre,
-                                        in double Radius)
+    HOMARD_Zone       CreateZoneBox2D (in string ZoneName,
+                                       in double Umini, in double Umaxi,
+                                       in double Vmini, in double Vmaxi,
+                                       in long Orient)
                                                            raises (SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneCylinder (in string ZoneName,
                                           in double Xcentre, in double Ycentre, in double Zcentre,
                                           in double Xaxis, in double Yaxis, in double Zaxis,
                                           in double Radius, in double Height)
                                                            raises (SALOME::SALOME_Exception);
-    HOMARD_Zone       CreateZonePipe (in string ZoneName,
-                                      in double Xcentre, in double Ycentre, in double Zcentre,
-                                      in double Xaxis, in double Yaxis, in double Zaxis,
-                                      in double Radius, in double Height, in double InternalRadius)
-                                                           raises (SALOME::SALOME_Exception);
-    HOMARD_Zone       CreateZoneBox2D (in string ZoneName,
-                                       in double Umini, in double Umaxi,
-                                       in double Vmini, in double Vmaxi,
-                                       in long Orient)
-                                                           raises (SALOME::SALOME_Exception);
     HOMARD_Zone       CreateZoneDisk (in string ZoneName,
                                       in double Ucentre, in double Vcentre,
                                       in double Radius, in long Orient)
@@ -84,65 +86,76 @@ module HOMARD
                                               in double Radius, in double InternalRadius,
                                               in long Orient)
                                                            raises (SALOME::SALOME_Exception);
-    HOMARD_Boundary   CreateBoundaryDi (in string BounName, in string MeshName, in string FileName)
-                                                           raises (SALOME::SALOME_Exception);
-    HOMARD_Boundary   CreateBoundaryCylinder (in string BounName,
+    HOMARD_Zone       CreateZonePipe (in string ZoneName,
                                       in double Xcentre, in double Ycentre, in double Zcentre,
                                       in double Xaxis, in double Yaxis, in double Zaxis,
-                                      in double Radius)
+                                      in double Radius, in double Height, in double InternalRadius)
                                                            raises (SALOME::SALOME_Exception);
-    HOMARD_Boundary   CreateBoundarySphere (in string BounName,
-                                      in double Xcentre, in double Ycentre, in double Zcentre,
-                                      in double Radius)
+    HOMARD_Zone       CreateZoneSphere (in string ZoneName,
+                                        in double Xcentre, in double Ycentre, in double Zcentre,
+                                        in double Radius)
                                                            raises (SALOME::SALOME_Exception);
 //
 // A.2. Les informations
 //
+    HOMARD_Boundary   GetBoundary(in string BoundaryName)  raises (SALOME::SALOME_Exception);
     HOMARD_Cas        GetCase(in string CaseName)          raises (SALOME::SALOME_Exception);
-    HOMARD_Boundary   GetBoundary(in string BounName)      raises (SALOME::SALOME_Exception);
-    HOMARD_Zone       GetZone(in string ZoneName)          raises (SALOME::SALOME_Exception);
     HOMARD_Hypothesis GetHypothesis(in string HypoName)    raises (SALOME::SALOME_Exception);
     HOMARD_Iteration  GetIteration(in string IterName)     raises (SALOME::SALOME_Exception);
+    HOMARD_Zone       GetZone(in string ZoneName)          raises (SALOME::SALOME_Exception);
 
-    listeCases      GetAllCasesName()                      raises (SALOME::SALOME_Exception);
     listeBoundarys  GetAllBoundarysName()                  raises (SALOME::SALOME_Exception);
+    listeCases      GetAllCasesName()                      raises (SALOME::SALOME_Exception);
     listeHypotheses GetAllHypothesesName()                 raises (SALOME::SALOME_Exception);
-    listeZones      GetAllZonesName()                      raises (SALOME::SALOME_Exception);
     listeIterations GetAllIterationsName()                 raises (SALOME::SALOME_Exception);
+    listeZones      GetAllZonesName()                      raises (SALOME::SALOME_Exception);
+
+    HOMARD_Iteration LastIteration(in string CaseName)     raises (SALOME::SALOME_Exception);
 //
 // A.3. L'etude
 //
     void     SetCurrentStudy(in SALOMEDS::Study theStudy)  raises (SALOME::SALOME_Exception);
+    SALOMEDS::Study GetCurrentStudy()                      raises (SALOME::SALOME_Exception);
+    long     GetCurrentStudyID()                           raises (SALOME::SALOME_Exception);
 //
 // B. Les methodes qui suivent n'apparaissent pas dans le composant HOMARD dans YACS
 //    L'utilisateur ne devrait pas les connaitre (ni s'en servir, a fortiori)
 //
     HOMARD_Iteration  CreateIteration(in string IterName, in string PreviousIterName )
                                                            raises (SALOME::SALOME_Exception);
+//
+    void InvalideBoundary (in string BoundaryName)         raises (SALOME::SALOME_Exception);
+    void InvalideHypo (in string HypoName)                 raises (SALOME::SALOME_Exception);
+    void InvalideIter (in string IterName)                 raises (SALOME::SALOME_Exception);
+    void InvalideZone (in string ZoneName)                 raises (SALOME::SALOME_Exception);
+
+    long DeleteBoundary (in string BoundaryName)           raises (SALOME::SALOME_Exception);
+    long DeleteCase(in string CaseName)                    raises (SALOME::SALOME_Exception);
+    long DeleteHypo(in string HypoName)                    raises (SALOME::SALOME_Exception);
+    long DeleteIteration(in string IterName)               raises (SALOME::SALOME_Exception);
+    long DeleteIterationOption(in string IterName, in long Option)
+                                                           raises (SALOME::SALOME_Exception);
+    long DeleteZone (in string ZoneName)                   raises (SALOME::SALOME_Exception);
 //
     void AssociateIterHypo(in string IterName, in string HypoName)
                                                            raises (SALOME::SALOME_Exception);
 
 //
-    void DissociateHypoZone(in string ZoneName, in string HypoName)
+    void AssociateHypoZone(in string HypoName, in string ZoneName, in long TypeUse)
+                                                           raises (SALOME::SALOME_Exception);
+    void DissociateHypoZone(in string HypoName, in string ZoneName)
                                                            raises (SALOME::SALOME_Exception);
 
-    void InvalideBoundary (in string BounName)             raises (SALOME::SALOME_Exception);
-    void InvalideZone (in string ZoneName)                 raises (SALOME::SALOME_Exception);
-    void InvalideHypo (in string HypoName)                 raises (SALOME::SALOME_Exception);
-    void InvalideIter (in string IterName)                 raises (SALOME::SALOME_Exception);
-
-    long Compute (in string IterName, in long etatMenage)  raises (SALOME::SALOME_Exception);
+    long Compute (in string IterName, in long CleanOption) raises (SALOME::SALOME_Exception);
 
     boolean  VerifieDir (in string IterName)               raises (SALOME::SALOME_Exception);
 
-    void  PublishFileUnderIteration(in string NomIter, in string NomFich, in string Commentaire)
+    void  PublishFileUnderIteration(in string IterName, in string FileName, in string Comment)
                                                            raises (SALOME::SALOME_Exception);
-    void  PublishResultInSmesh(in string NomFich, in long IconeType)
+    void  PublishBoundaryUnderCase(in string CaseName, in string BoundaryName);
+    void  PublishResultInSmesh(in string FileName, in long IconeType)
                                                            raises (SALOME::SALOME_Exception);
 
-    SALOMEDS::Study GetCurrentStudy()                      raises (SALOME::SALOME_Exception);
-    long     GetCurrentStudyID()                           raises (SALOME::SALOME_Exception);
   };
 };
 
index c8ce350e4f8c4e6630e69534d33a29b13ad9bcc4..032a1daed57aaa881d1f0238630d21189ba0b1d6 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_HYPOTHESIS_IDL
 #define _HOMARD_HYPOTHESIS_IDL
@@ -47,52 +56,38 @@ module HOMARD
 
   interface HOMARD_Hypothesis : Engines::EngineComponent
   {
-
-    void     SetName(in string NomHypothesis)              raises (SALOME::SALOME_Exception);
+// Generalites
+    void     SetName(in string Name)                       raises (SALOME::SALOME_Exception);
     string   GetName()                                     raises (SALOME::SALOME_Exception);
 
-    void     SetCaseCreation(in string NomCas)             raises (SALOME::SALOME_Exception);
-    string   GetCaseCreation()                             raises (SALOME::SALOME_Exception);
+    long     Delete()                                      raises (SALOME::SALOME_Exception);
+
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
 
-    void       SetAdapRefinUnRef(in long Adap, in long Raff, in long Dera)
+// Caracteristiques
+    void     SetAdapRefinUnRef(in long Adap, in long Raff, in long Dera)
                                                            raises (SALOME::SALOME_Exception);
     listeTypes GetAdapRefinUnRef()                         raises (SALOME::SALOME_Exception);
-    long       GetAdapType()                               raises (SALOME::SALOME_Exception);
-    long       GetRefinType()                              raises (SALOME::SALOME_Exception);
-    long       GetUnRefType()                              raises (SALOME::SALOME_Exception);
+    long     GetAdapType()                                 raises (SALOME::SALOME_Exception);
+    long     GetRefinType()                                raises (SALOME::SALOME_Exception);
+    long     GetUnRefType()                                raises (SALOME::SALOME_Exception);
+
+    void     SetField(in string FieldName)                 raises (SALOME::SALOME_Exception);
+    string   GetFieldName()                                raises (SALOME::SALOME_Exception);
+    void     SetUseField(in long UsField)                  raises (SALOME::SALOME_Exception);
+    InfosHypo GetField()                                  raises (SALOME::SALOME_Exception);
+
+    void     SetUseComp(in long UsCmpI)                    raises (SALOME::SALOME_Exception);
+    void     AddComp(in string NomComposant)               raises (SALOME::SALOME_Exception);
+    void     SupprComp()                                   raises (SALOME::SALOME_Exception);
+    listeComposantsHypo GetListComp()                      raises (SALOME::SALOME_Exception);
 
-    void       SetField(in string FieldName)               raises (SALOME::SALOME_Exception);
-    string     GetFieldName()                              raises (SALOME::SALOME_Exception);
-    void       SetRefinThr(in long TypeThR, in double ThreshR)
+    void     SetRefinThr(in long TypeThR, in double ThreshR)
                                                            raises (SALOME::SALOME_Exception);
-    void       SetUnRefThr(in long TypeThC, in double ThreshC)
+    long     GetRefinThrType()                             raises (SALOME::SALOME_Exception);
+    void     SetUnRefThr(in long TypeThC, in double ThreshC)
                                                            raises (SALOME::SALOME_Exception);
-    long       GetRefinThrType()                           raises (SALOME::SALOME_Exception);
-    long       GetUnRefThrType()                           raises (SALOME::SALOME_Exception);
-    void       SetUseComp(in long UsCmpI)                  raises (SALOME::SALOME_Exception);
-    void       SetUseField(in long UsField)                raises (SALOME::SALOME_Exception);
-    InfosHypo  GetField()                                  raises (SALOME::SALOME_Exception);
-
-    void       AddComp(in string NomComposant)             raises (SALOME::SALOME_Exception);
-    void       SupprComp()                                 raises (SALOME::SALOME_Exception);
-    listeComposantsHypo GetListComp()                      raises (SALOME::SALOME_Exception);
-
-    void       AddZone(in string NomZone, in long TypeUse) raises (SALOME::SALOME_Exception);
-    void       SupprZone(in string NomZone)                raises (SALOME::SALOME_Exception);
-    listeZonesHypo GetZones()                              raises (SALOME::SALOME_Exception);
-
-    listeIters GetIterations()                             raises (SALOME::SALOME_Exception);
-    void       AddIteration(in string NomIteration)        raises (SALOME::SALOME_Exception);
-
-    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
-    void       SetGroups(in ListGroupType ListGroup)       raises (SALOME::SALOME_Exception);
-    void       AddGroup(in string LeGroupe)                raises (SALOME::SALOME_Exception);
-
-    void       SetTypeFieldInterp(in long TypeFieldInterp) raises (SALOME::SALOME_Exception);
-    long       GetTypeFieldInterp()                        raises (SALOME::SALOME_Exception);
-    void       AddFieldInterp(in string FieldInterp)       raises (SALOME::SALOME_Exception);
-    void       SupprFieldInterp()                          raises (SALOME::SALOME_Exception);
-    listFieldInterpHypo GetListFieldInterp()               raises (SALOME::SALOME_Exception);
+    long     GetUnRefThrType()                             raises (SALOME::SALOME_Exception);
 
     void     SetNivMax(in long NivMax)                     raises (SALOME::SALOME_Exception);
     long     GetNivMax()                                   raises (SALOME::SALOME_Exception);
@@ -106,7 +101,28 @@ module HOMARD
     void     SetLevelOutput(in long LevelOutput)           raises (SALOME::SALOME_Exception);
     long     GetLevelOutput()                              raises (SALOME::SALOME_Exception);
 
-    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+    void     AddGroup(in string LeGroupe)                  raises (SALOME::SALOME_Exception);
+    void     SetGroups(in ListGroupType ListGroup)         raises (SALOME::SALOME_Exception);
+    ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
+
+    void     SetTypeFieldInterp(in long TypeFieldInterp)   raises (SALOME::SALOME_Exception);
+    long     GetTypeFieldInterp()                          raises (SALOME::SALOME_Exception);
+    void     AddFieldInterp(in string FieldInterp)         raises (SALOME::SALOME_Exception);
+    void     SupprFieldInterp()                            raises (SALOME::SALOME_Exception);
+    listFieldInterpHypo GetListFieldInterp()               raises (SALOME::SALOME_Exception);
+
+// Liens avec les autres structures
+    void     SetCaseCreation(in string NomCas)             raises (SALOME::SALOME_Exception);
+    string   GetCaseCreation()                             raises (SALOME::SALOME_Exception);
+
+    void     LinkIteration(in string NomIteration)         raises (SALOME::SALOME_Exception);
+    void     UnLinkIteration(in string NomIteration)       raises (SALOME::SALOME_Exception);
+    listeIters GetIterations()                             raises (SALOME::SALOME_Exception);
+
+    void     AddZone(in string NomZone, in long TypeUse)   raises (SALOME::SALOME_Exception);
+    void     AddZone0(in string NomZone, in long TypeUse)  raises (SALOME::SALOME_Exception);
+    void     SupprZone(in string NomZone)                  raises (SALOME::SALOME_Exception);
+    listeZonesHypo GetZones()                              raises (SALOME::SALOME_Exception);
 
   };
 };
index 61d38e56ee3b25ff36099880db9514d792dc7404..ad9703ebec4b79db9dab5757f917e08bddb3ab25 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_ITERATION_IDL
 #define _HOMARD_ITERATION_IDL
@@ -30,19 +39,27 @@ module HOMARD
 
   interface HOMARD_Iteration : Engines::EngineComponent
   {
-    void     SetName(in string NomIter)                    raises (SALOME::SALOME_Exception);
+// Generalites
+    void     SetName(in string Name)                       raises (SALOME::SALOME_Exception);
     string   GetName()                                     raises (SALOME::SALOME_Exception);
 
-    HOMARD_Iteration NextIteration(in string NomIter)      raises (SALOME::SALOME_Exception);
+    long     Delete()                                      raises (SALOME::SALOME_Exception);
 
-    void     SetEtat(in boolean State)                     raises (SALOME::SALOME_Exception);
-    boolean  GetEtat()                                     raises (SALOME::SALOME_Exception);
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+
+// Caracteristiques
+    void     SetDirName(in string NomDir)                  raises (SALOME::SALOME_Exception);
+    string   GetDirName()                                  raises (SALOME::SALOME_Exception);
 
     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     SetMeshName(in string NomMesh)                raises (SALOME::SALOME_Exception);
     string   GetMeshName()                                 raises (SALOME::SALOME_Exception);
+
     void     SetMeshFile(in string MeshFile)               raises (SALOME::SALOME_Exception);
     string   GetMeshFile()                                 raises (SALOME::SALOME_Exception);
 
@@ -53,31 +70,29 @@ module HOMARD
     long     GetTimeStep()                                 raises (SALOME::SALOME_Exception);
     long     GetRank()                                     raises (SALOME::SALOME_Exception);
 
+    void     SetMessFile(in string MessFile)               raises (SALOME::SALOME_Exception);
+    string   GetMessFile()                                 raises (SALOME::SALOME_Exception);
+
+    long     Compute(in long etatMenage)                   raises (SALOME::SALOME_Exception);
+
+// Liens avec les autres iterations
+    HOMARD_Iteration NextIteration(in string NomIter)      raises (SALOME::SALOME_Exception);
+
+    void     LinkNextIteration(in string NomIter)          raises (SALOME::SALOME_Exception);
+    void     UnLinkNextIteration(in string NomIter)        raises (SALOME::SALOME_Exception);
+    listeIterFilles GetIterations()                        raises (SALOME::SALOME_Exception);
+
     void     SetIterParentName(in string NomIterParent)    raises (SALOME::SALOME_Exception);
     string   GetIterParentName()                           raises (SALOME::SALOME_Exception);
     HOMARD_Iteration GetIterParent()                       raises (SALOME::SALOME_Exception);
 
-    void     AddIteration(in string NomIter)               raises (SALOME::SALOME_Exception);
+// Liens avec les autres structures
+    void     SetCaseName(in string NomCas)                 raises (SALOME::SALOME_Exception);
+    string   GetCaseName()                                 raises (SALOME::SALOME_Exception);
 
     void     AssociateHypo(in string NomHypo)              raises (SALOME::SALOME_Exception);
-
     void     SetHypoName(in string NomHypo)                raises (SALOME::SALOME_Exception);
     string   GetHypoName()                                 raises (SALOME::SALOME_Exception);
-
-    void     SetCaseName(in string NomCas)                 raises (SALOME::SALOME_Exception);
-    string   GetCaseName()                                 raises (SALOME::SALOME_Exception);
-
-    void     SetDirName(in string NomDir)                  raises (SALOME::SALOME_Exception);
-    string   GetDirName()                                  raises (SALOME::SALOME_Exception);
-
-    listeIterFilles GetIterations()                        raises (SALOME::SALOME_Exception);
-
-    void     SetMessFile(in string MessFile)               raises (SALOME::SALOME_Exception);
-    string   GetMessFile()                                 raises (SALOME::SALOME_Exception);
-
-    long     Compute(in long etatMenage)                   raises (SALOME::SALOME_Exception);
-
-    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
   };
 };
 #endif
index b40cc9458afcbb423adbe9577d681087fb82828c..cec49d5b00df74836d99c740066b3f9c41c6ce60 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_Zone_IDL
 #define _HOMARD_Zone_IDL
@@ -31,18 +40,21 @@ module HOMARD
 
   interface HOMARD_Zone : Engines::EngineComponent
   {
+// Generalites
+    void     SetName(in string Name)                       raises (SALOME::SALOME_Exception);
+    string   GetName()                                     raises (SALOME::SALOME_Exception);
 
-    void     SetName (in string Name)                      raises (SALOME::SALOME_Exception);
-    string   GetName ()                                    raises (SALOME::SALOME_Exception);
+    long     Delete()                                      raises (SALOME::SALOME_Exception);
+
+    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
 
+// Caracteristiques
     void     SetType (in long Type)                        raises (SALOME::SALOME_Exception);
     long     GetType()                                     raises (SALOME::SALOME_Exception);
 
     void     SetBox    (in double Xmini, in double Xmaxi, in double Ymini,
                         in double Ymaxi, in double Zmini, in double Zmaxi)
                                                            raises (SALOME::SALOME_Exception);
-    void     SetSphere (in double Xcentre, in double Ycentre, in double Zcentre, in double rayon)
-                                                           raises (SALOME::SALOME_Exception);
     void     SetCylinder (in double Xcentre, in double Ycentre, in double Zcentre,
                           in double Xaxis, in double Yaxis, in double Zaxis,
                           in double Rayon, in double Haut)
@@ -51,16 +63,19 @@ module HOMARD
                       in double Xaxis, in double Yaxis, in double Zaxis,
                       in double Rayon, in double Haut, in double Rayonint )
                                                            raises (SALOME::SALOME_Exception);
+    void     SetSphere (in double Xcentre, in double Ycentre, in double Zcentre, in double rayon)
+                                                           raises (SALOME::SALOME_Exception);
+
     double_array GetCoords()                               raises (SALOME::SALOME_Exception);
+
     void     SetLimit (in double Xincr, in double Yincr, in double Zincr)
                                                            raises (SALOME::SALOME_Exception);
     double_array GetLimit()                                raises (SALOME::SALOME_Exception);
 
+// Liens avec les autres structures
     void     AddHypo(in string NomHypo)                    raises (SALOME::SALOME_Exception);
-    void     SupprHypo(in string NomHypo)                  raises (SALOME::SALOME_Exception);
     listeHypo GetHypo()                                    raises (SALOME::SALOME_Exception);
-
-    string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
+    void     SupprHypo(in string NomHypo)                  raises (SALOME::SALOME_Exception);
 
   };
 };
index f6e520d4e1577619b21e1f375e4fc7a73b4bf1fd..b23eab58d920720d584f5bcfc80ac68a9857df1d 100644 (file)
@@ -60,8 +60,8 @@ libSalomeIDLHOMARD_la_LDFLAGS = -no-undefined -version-info=0:0:0
 libSalomeIDLHOMARD_la_LIBADD  =                        \
        $(KERNEL_LDFLAGS) -lSalomeIDLKernel     \
        @CORBA_LIBS@
-#        $(VISU_LDFLAGS) -lSalomeIDLVisu        
-#        $(MED_LDFLAGS) -lSalomeIDLMed           
+#        $(VISU_LDFLAGS) -lSalomeIDLVisu
+#        $(MED_LDFLAGS) -lSalomeIDLMed
 
 # These variables defines the building process of CORBA files
 OMNIORB_IDL         = @OMNIORB_IDL@
index dd73aff4e5c0332a4101510b35e373e3289a31dc..2aa347ed47d6d11248872fa48faa74a63b319ba2 100644 (file)
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>BounName</inParameter-name>
+                                <inParameter-name>BoundaryName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>BounName</inParameter-name>
+                                <inParameter-name>BoundaryName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>BounName</inParameter-name>
+                                <inParameter-name>BoundaryName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>BounName</inParameter-name>
+                                <inParameter-name>BoundaryName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <DataStream-list></DataStream-list>
                     </component-service>
                     <component-service>
-                        <service-name>GetZone</service-name>
+                        <service-name>GetHypothesis</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <service-version>1.1</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>ZoneName</inParameter-name>
+                                <inParameter-name>HypoName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <outParameter-list>
                             <outParameter>
                                 <outParameter-name>return</outParameter-name>
-                                <outParameter-type>HOMARD_Zone</outParameter-type>
+                                <outParameter-type>HOMARD_Hypothesis</outParameter-type>
                                 <outParameter-comment>unknown</outParameter-comment>
                             </outParameter>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
                     <component-service>
-                        <service-name>GetHypothesis</service-name>
+                        <service-name>GetIteration</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <service-version>1.1</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>HypoName</inParameter-name>
+                                <inParameter-name>IterName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <outParameter-list>
                             <outParameter>
                                 <outParameter-name>return</outParameter-name>
-                                <outParameter-type>HOMARD_Hypothesis</outParameter-type>
+                                <outParameter-type>HOMARD_Iteration</outParameter-type>
                                 <outParameter-comment>unknown</outParameter-comment>
                             </outParameter>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
                     <component-service>
-                        <service-name>GetIteration</service-name>
+                        <service-name>GetZone</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
                         <service-version>1.1</service-version>
                         <service-comment>unknown</service-comment>
                         <service-by-default>0</service-by-default>
                         <inParameter-list>
                             <inParameter>
-                                <inParameter-name>IterName</inParameter-name>
+                                <inParameter-name>ZoneName</inParameter-name>
                                 <inParameter-type>string</inParameter-type>
                                 <inParameter-comment>unknown</inParameter-comment>
                             </inParameter>
                         <outParameter-list>
                             <outParameter>
                                 <outParameter-name>return</outParameter-name>
-                                <outParameter-type>HOMARD_Iteration</outParameter-type>
+                                <outParameter-type>HOMARD_Zone</outParameter-type>
                                 <outParameter-comment>unknown</outParameter-comment>
                             </outParameter>
                         </outParameter-list>
                         </outParameter-list>
                         <DataStream-list></DataStream-list>
                     </component-service>
+                    <component-service>
+                        <service-name>LastIteration</service-name>
+                        <service-author>HOMARD team - EDF RD</service-author>
+                        <service-version>1.1</service-version>
+                        <service-comment>unknown</service-comment>
+                        <service-by-default>0</service-by-default>
+                        <inParameter-list>
+                            <inParameter>
+                                <inParameter-name>CaseName</inParameter-name>
+                                <inParameter-type>string</inParameter-type>
+                                <inParameter-comment>unknown</inParameter-comment>
+                            </inParameter>
+                        </inParameter-list>
+                        <outParameter-list>
+                            <outParameter>
+                                <outParameter-name>return</outParameter-name>
+                                <outParameter-type>HOMARD_Iteration</outParameter-type>
+                                <outParameter-comment>unknown</outParameter-comment>
+                            </outParameter>
+                        </outParameter-list>
+                        <DataStream-list></DataStream-list>
+                    </component-service>
                     <component-service>
                         <service-name>SetCurrentStudy</service-name>
                         <service-author>HOMARD team - EDF RD</service-author>
index 596d3699789d488f41c18a506e07fdcbc4925bd2..f73659de2787723053716f5a9737387bf0e8b0ab 100644 (file)
 //  File   : HOMARD_Boundary.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #include "HOMARD_Boundary.hxx"
 #include "utilities.h"
@@ -45,19 +54,20 @@ HOMARD_Boundary::~HOMARD_Boundary()
 {
   MESSAGE("~HOMARD_Boundary");
 }
-
+//=============================================================================
+//=============================================================================
+// Generalites
+//=============================================================================
 //=============================================================================
 void HOMARD_Boundary::SetName( const char* Name )
 {
   _Name = std::string( Name );
 }
-
 //=============================================================================
 std::string HOMARD_Boundary::GetName() const
 {
   return _Name;
 }
-
 //=============================================================================
 std::string HOMARD_Boundary::GetDumpPython() const
 {
@@ -92,30 +102,20 @@ std::string HOMARD_Boundary::GetDumpPython() const
 
   return aScript.str();
 }
-
-
+//=============================================================================
+//=============================================================================
+// Caracteristiques
+//=============================================================================
 //=============================================================================
 void HOMARD_Boundary::SetType( int Type )
 {
   _Type = Type;
 }
-
 //=============================================================================
 int HOMARD_Boundary::GetType() const
 {
   return _Type;
 }
-
-//=============================================================================
-void HOMARD_Boundary::SetMeshFile( const char* MeshFile )
-{
-  _MeshFile = std::string( MeshFile );
-}
-//=============================================================================
-std::string HOMARD_Boundary::GetMeshFile() const
-{
-  return _MeshFile;
-}
 //=============================================================================
 void HOMARD_Boundary::SetMeshName( const char* MeshName )
 {
@@ -126,10 +126,15 @@ std::string HOMARD_Boundary::GetMeshName() const
 {
   return _MeshName;
 }
-//======================================================================
-void HOMARD_Boundary::SetLimit( double X0, double X1, double X2 )
+//=============================================================================
+void HOMARD_Boundary::SetMeshFile( const char* MeshFile )
 {
-  _Xincr = X0; _Yincr = X1; _Zincr = X2;
+  _MeshFile = std::string( MeshFile );
+}
+//=============================================================================
+std::string HOMARD_Boundary::GetMeshFile() const
+{
+  return _MeshFile;
 }
 //=======================================================================================
 void HOMARD_Boundary::SetCylinder( double X0, double X1, double X2,
@@ -140,24 +145,12 @@ void HOMARD_Boundary::SetCylinder( double X0, double X1, double X2,
   _Yaxe = X4; _Zaxe = X5;
   _rayon = X6;
 }
-
 //======================================================================
 void HOMARD_Boundary::SetSphere( double X0, double X1, double X2, double X3 )
 {
   _Xcentre = X0; _Ycentre = X1; _Zcentre = X2;
   _rayon = X3;
 }
-
-//=======================================================================================
-std::vector<double> HOMARD_Boundary::GetLimit() const
-{
-  std::vector<double> mesLimit;
-  mesLimit.push_back( _Xincr );
-  mesLimit.push_back( _Yincr );
-  mesLimit.push_back( _Zincr );
-  return mesLimit;
-}
-
 //=======================================================================================
 std::vector<double> HOMARD_Boundary::GetCoords() const
 {
@@ -190,22 +183,24 @@ std::vector<double> HOMARD_Boundary::GetCoords() const
   }
   return mesCoor;
 }
-//=============================================================================
-/*!
- */
-//=============================================================================
-void HOMARD_Boundary::SetCaseCreation( const char* NomCasCreation )
+//======================================================================
+void HOMARD_Boundary::SetLimit( double X0, double X1, double X2 )
 {
-  _NomCasCreation = std::string( NomCasCreation );
+  _Xincr = X0; _Yincr = X1; _Zincr = X2;
+}
+//=======================================================================================
+std::vector<double> HOMARD_Boundary::GetLimit() const
+{
+  std::vector<double> mesLimit;
+  mesLimit.push_back( _Xincr );
+  mesLimit.push_back( _Yincr );
+  mesLimit.push_back( _Zincr );
+  return mesLimit;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-const std::list<std::string>& HOMARD_Boundary::GetGroups() const
+void HOMARD_Boundary::AddGroup( const char* Group)
 {
-  return _ListGroupSelected;
+  _ListGroupSelected.push_back(Group);
 }
 //=============================================================================
 void HOMARD_Boundary::SetGroups( const std::list<std::string>& ListGroup )
@@ -216,14 +211,19 @@ void HOMARD_Boundary::SetGroups( const std::list<std::string>& ListGroup )
     _ListGroupSelected.push_back((*it++));
 }
 //=============================================================================
-void HOMARD_Boundary::AddGroup( const char* Group)
+const std::list<std::string>& HOMARD_Boundary::GetGroups() const
 {
-  _ListGroupSelected.push_back(Group);
+  return _ListGroupSelected;
 }
-
 //=============================================================================
-/*!
-*/
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
+//=============================================================================
+void HOMARD_Boundary::SetCaseCreation( const char* NomCasCreation )
+{
+  _NomCasCreation = std::string( NomCasCreation );
+}
 //=============================================================================
 std::string HOMARD_Boundary::GetCaseCreation() const
 {
index f92456e78dd2eb3c923613ada6b40493f1f55743..5cf972aae1237921d6d7f292e1145cfb4bf8dda1 100644 (file)
 //  File   : HOMARD_Boundary.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #ifndef _HOMARD_Boundary_HXX_
 #define _HOMARD_Boundary_HXX_
@@ -35,34 +44,39 @@ public:
   HOMARD_Boundary();
   ~HOMARD_Boundary();
 
+// Generalites
   void                          SetName( const char* Name );
   std::string                   GetName() const;
-  std::string                   GetDumpPython() const;
 
-  void                          SetLimit( double X0, double X1, double X2 );
-  std::vector<double>           GetLimit() const;
+  std::string                   GetDumpPython() const;
 
-  void                          SetMeshFile( const char* MeshFile );
-  std::string                   GetMeshFile() const;
+// Caracteristiques
+  void                          SetType( int Type );
+  int                           GetType() const;
 
   void                          SetMeshName( const char* MeshName );
   std::string                   GetMeshName() const;
 
+  void                          SetMeshFile( const char* MeshFile );
+  std::string                   GetMeshFile() const;
+
   void                          SetCylinder( double X0, double X1, double X2, double X3,
                                              double X4, double X5, double X6 );
   void                          SetSphere( double X0, double X1, double X2, double X3 );
-  std::vector<double>           GetCoords() const;
 
-  void                          SetType( int Type );
-  int                           GetType() const;
+  std::vector<double>           GetCoords() const;
 
-  std::string                   GetCaseCreation() const;
-  void                          SetCaseCreation( const char* NomCasCreation );
+  void                          SetLimit( double X0, double X1, double X2 );
+  std::vector<double>           GetLimit() const;
 
   void                          AddGroup( const char* LeGroupe);
   void                          SetGroups(const std::list<std::string>& ListGroup );
   const std::list<std::string>& GetGroups() const;
 
+// Liens avec les autres structures
+  std::string                   GetCaseCreation() const;
+  void                          SetCaseCreation( const char* NomCasCreation );
+
 private:
   std::string                   _Name;
   std::string                   _NomCasCreation;
index 916b1b0a6b162fdca8adb76da756cbd8d2fa1987..a7ebbf4f1ec6602fb5754d8f3f438befb63b25d7 100644 (file)
 //  File   : HOMARD_Cas.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #include "HOMARD_Cas.hxx"
 #include "utilities.h"
@@ -47,49 +56,22 @@ HOMARD_Cas::~HOMARD_Cas()
 {
   MESSAGE("~HOMARD_Cas");
 }
-
-//=============================================================================
-void HOMARD_Cas::SetDirName( const char* NomDir )
 //=============================================================================
-{
-     MESSAGE("SetDirName, NomDir :  "<<NomDir);
-     if (chdir(NomDir) == 0)
-     {
-       _NomDir = std::string( NomDir );
-     }
-    else
-    {
-       // GERALD -- QMESSAGE BOX
-       // std::cerr << "Pb pour entrer dans le repertoire :  "<<NomDir << std::endl;
-       _NomDir = "/tmp";
-    };
-}
-
 //=============================================================================
-std::string HOMARD_Cas::GetDirName() const
+// Generalites
 //=============================================================================
-{
-  return _NomDir;
-}
-
 //=============================================================================
 void HOMARD_Cas::SetName( const char* Name )
-//=============================================================================
 {
   _Name = std::string( Name );
 }
-
 //=============================================================================
 std::string HOMARD_Cas::GetName() const
-//=============================================================================
 {
   return _Name;
 }
-
-
 //=============================================================================
 std::string HOMARD_Cas::GetDumpPython() const
-//=============================================================================
 {
   std::ostringstream aScript;
   aScript << "\t" <<_Name << ".SetDirName(\"";
@@ -115,69 +97,57 @@ std::string HOMARD_Cas::GetDumpPython() const
   return aScript.str();
 }
 //=============================================================================
-void HOMARD_Cas::AddIteration( const char* NomIteration )
 //=============================================================================
-{
-  _ListIter.push_back( std::string( NomIteration ) );
-}
-
+// Caracteristiques
 //=============================================================================
-const std::list<std::string>& HOMARD_Cas::GetIterations() const
 //=============================================================================
+void HOMARD_Cas::SetDirName( const char* NomDir )
 {
-  return _ListIter;
+     MESSAGE("SetDirName, NomDir :  "<<NomDir);
+     if (chdir(NomDir) == 0)
+     {
+       _NomDir = std::string( NomDir );
+     }
+    else
+    {
+       // GERALD -- QMESSAGE BOX
+       // std::cerr << "Pb pour entrer dans le repertoire :  "<<NomDir << std::endl;
+       _NomDir = "/tmp";
+    };
 }
-
-//=============================================================================
-void HOMARD_Cas::SupprIterations()
 //=============================================================================
+std::string HOMARD_Cas::GetDirName() const
 {
-  _ListIter.clear();
+  return _NomDir;
 }
-
-//=============================================================================
-std::string HOMARD_Cas::GetIter0Name() const
 //=============================================================================
+int HOMARD_Cas::GetNumber()
 {
-// Par construction de la liste, l'iteration a ete mise en tete.
-  return (*(_ListIter.begin()));
+  return _ListIter.size();
 }
-
 //=============================================================================
 void HOMARD_Cas::SetConfType( int Conftype )
-//=============================================================================
 {
   _ConfType = Conftype;
 }
 //=============================================================================
 const int HOMARD_Cas::GetConfType() const
-//=============================================================================
 {
   return _ConfType;
 }
-//=============================================================================
-int HOMARD_Cas::GetNumber()
-//=============================================================================
-
-{
-  return _ListIter.size();
-}
 //
 // La boite englobante
 //
 //=============================================================================
 void HOMARD_Cas::SetBoundingBox( const std::vector<double>& extremas )
-//=============================================================================
 {
   _Boite.clear();
   _Boite.resize( extremas.size() );
   for ( int i = 0; i < extremas.size(); i++ )
     _Boite[i] = extremas[i];
 }
-
 //=============================================================================
 const std::vector<double>& HOMARD_Cas::GetBoundingBox() const
-//=============================================================================
 {
   return _Boite;
 }
@@ -185,20 +155,12 @@ const std::vector<double>& HOMARD_Cas::GetBoundingBox() const
 // Les groupes
 //
 //=============================================================================
-const std::list<std::string>& HOMARD_Cas::GetGroups() const
-//=============================================================================
-{
-  return _ListGroup;
-}
-//=============================================================================
-void HOMARD_Cas::SupprGroups()
-//=============================================================================
+void HOMARD_Cas::AddGroup( const char* Group )
 {
-  _ListGroup.clear();
+  _ListGroup.push_back(Group);
 }
 //=============================================================================
 void HOMARD_Cas::SetGroups( const std::list<std::string>& ListGroup )
-//=============================================================================
 {
   _ListGroup.clear();
   std::list<std::string>::const_iterator it = ListGroup.begin();
@@ -208,19 +170,18 @@ void HOMARD_Cas::SetGroups( const std::list<std::string>& ListGroup )
   }
 }
 //=============================================================================
-void HOMARD_Cas::AddGroup( const char* Group )
+const std::list<std::string>& HOMARD_Cas::GetGroups() const
 {
-  _ListGroup.push_back(Group);
+  return _ListGroup;
 }
-//
-// Les frontieres
-//
-//=============================================================================
-const std::list<std::string>& HOMARD_Cas::GetBoundaryGroup() const
 //=============================================================================
+void HOMARD_Cas::SupprGroups()
 {
-  return _ListBoundaryGroup;
+  _ListGroup.clear();
 }
+//
+// Les frontieres
+//
 //=============================================================================
 void HOMARD_Cas::AddBoundaryGroup( const char* Boundary, const char* Group )
 {
@@ -228,20 +189,49 @@ void HOMARD_Cas::AddBoundaryGroup( const char* Boundary, const char* Group )
   _ListBoundaryGroup.push_back( Group    );
 }
 //=============================================================================
-void HOMARD_Cas::SupprBoundaryGroup()
+const std::list<std::string>& HOMARD_Cas::GetBoundaryGroup() const
+{
+  return _ListBoundaryGroup;
+}
 //=============================================================================
+void HOMARD_Cas::SupprBoundaryGroup()
 {
   _ListBoundaryGroup.clear();
 }
 //=============================================================================
 void HOMARD_Cas::SetPyram( int Pyram )
-//=============================================================================
 {
   _Pyram = Pyram;
 }
 //=============================================================================
 const int HOMARD_Cas::GetPyram() const
-//=============================================================================
 {
   return _Pyram;
 }
+//=============================================================================
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
+//=============================================================================
+std::string HOMARD_Cas::GetIter0Name() const
+{
+// Par construction de la liste, l'iteration a ete mise en tete.
+  return (*(_ListIter.begin()));
+}
+//=============================================================================
+void HOMARD_Cas::AddIteration( const char* NomIteration )
+{
+  _ListIter.push_back( std::string( NomIteration ) );
+}
+//=============================================================================
+const std::list<std::string>& HOMARD_Cas::GetIterations() const
+{
+  return _ListIter;
+}
+//=============================================================================
+void HOMARD_Cas::SupprIterations()
+{
+  _ListIter.clear();
+}
+
+
index 8c00114deae43f1046b7316268e2036a7476383e..66ba421dfe616aa894af7f00eb93cd0f88447b95 100644 (file)
 //  File   : HOMARD_Cas.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #ifndef _HOMARD_CAS_HXX_
 #define _HOMARD_CAS_HXX_
@@ -35,34 +44,29 @@ public:
   HOMARD_Cas();
   ~HOMARD_Cas();
 
+// Generalites
   void                          SetName( const char* Name );
   std::string                   GetName() const;
 
+  std::string                   GetDumpPython() const;
+
+// Caracteristiques
   void                          SetDirName( const char* NomDir );
   std::string                   GetDirName() const;
 
-  void                          SetConfType( int ConfType );
-  const int                     GetConfType() const;
   int                           GetNumber();
 
-  void                          AddIteration( const char* NomIteration );
-  const std::list<std::string>& GetIterations() const;
-  void                          SupprIterations();
-
-  std::string                   GetIter0Name() const;
-  std::string                   GetDumpPython() const;
+  void                          SetConfType( int ConfType );
+  const int                     GetConfType() const;
 
   void                          SetBoundingBox( const std::vector<double>& extremas );
   const std::vector<double>&    GetBoundingBox() const;
 
-  void                          SetGroups( const std::list<std::string>& ListGroup );
-
   void                          AddGroup( const char* Group);
+  void                          SetGroups( const std::list<std::string>& ListGroup );
   const std::list<std::string>& GetGroups() const;
   void                          SupprGroups();
 
-//   void                          SetBoundary( const std::list<std::string>& ListBoundary );
-
   void                          AddBoundaryGroup( const char* Boundary, const char* Group );
   const std::list<std::string>& GetBoundaryGroup() const;
   void                          SupprBoundaryGroup();
@@ -70,6 +74,13 @@ public:
   void                          SetPyram( int Pyram );
   const int                     GetPyram() const;
 
+// Liens avec les autres structures
+  std::string                   GetIter0Name() const;
+
+  void                          AddIteration( const char* NomIteration );
+  const std::list<std::string>& GetIterations() const;
+  void                          SupprIterations();
+
 private:
   std::string                   _Name;
   std::string                   _NomDir;
index 8a262942d417bd7e95b0743ac6f0e49fe4fa3c44..4bcc8146a4770a8de46947529452b75192bb60d2 100644 (file)
@@ -202,7 +202,7 @@ namespace HOMARD
     os << separator() << hypothesis.GetUnRefThrType();
     os << separator() << hypothesis.GetThreshC();
     os << separator() << hypothesis.GetUseField();
-    os << separator() << hypothesis.GetUseCompI();
+    os << separator() << hypothesis.GetUseComp();
     os << separator() << hypothesis.GetTypeFieldInterp();
 
     std::list<std::string> ListString = hypothesis.GetIterations();
@@ -458,7 +458,7 @@ namespace HOMARD
     for ( int i = 0; i < size; i++ ) {
       chunk = getNextChunk( stream, start, ok );
       if ( !ok ) return false;
-      iteration.AddIteration( chunk.c_str() );
+      iteration.LinkNextIteration( chunk.c_str() );
     }
     //
     chunk = getNextChunk( stream, start, ok );
@@ -546,7 +546,7 @@ namespace HOMARD
     for ( int i = 0; i < size; i++ ) {
       chunk = getNextChunk( stream, start, ok );
       if ( !ok ) return false;
-      hypothesis.AddIteration( chunk.c_str() );
+      hypothesis.LinkIteration( chunk.c_str() );
     }
 
     chunk = getNextChunk( stream, start, ok );
index da2782160ca4c4caa7b64dc893be93778f3e757e..0d274141b30854771c41a3024a30fe0a0af7747d 100644 (file)
 //  File   : HOMARD_Hypothesis.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #include "HOMARD_Hypothesis.hxx"
 #include "utilities.h"
@@ -49,36 +58,15 @@ HOMARD_Hypothesis::~HOMARD_Hypothesis()
 {
   MESSAGE("~HOMARD_Hypothesis");
 }
-
-//=============================================================================
-/*!
- */
-//=============================================================================
-void HOMARD_Hypothesis::SetCaseCreation( const char* NomCasCreation )
-{
-  _NomCasCreation = std::string( NomCasCreation );
-}
-
 //=============================================================================
-/*!
-*/
 //=============================================================================
-std::string HOMARD_Hypothesis::GetCaseCreation() const
-{
-  return _NomCasCreation;
-}
+// Generalites
 //=============================================================================
-/*!
-*/
 //=============================================================================
 void HOMARD_Hypothesis::SetName( const char* Name )
 {
   _Name = std::string( Name );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 std::string HOMARD_Hypothesis::GetName() const
 {
@@ -161,30 +149,21 @@ std::string HOMARD_Hypothesis::GetDumpPython() const
 
   return aScript.str();
 }
-
-
 //=============================================================================
-/*!
-*/
+//=============================================================================
+// Caracteristiques
+//=============================================================================
 //=============================================================================
 void HOMARD_Hypothesis::SetAdapType( int TypeAdap )
 {
   ASSERT (!((TypeAdap < -1) or (TypeAdap > 1)));
   _TypeAdap = TypeAdap;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 int HOMARD_Hypothesis::GetAdapType() const
 {
   return _TypeAdap;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 void HOMARD_Hypothesis::SetRefinTypeDera( int TypeRaff, int TypeDera )
 {
@@ -193,28 +172,16 @@ void HOMARD_Hypothesis::SetRefinTypeDera( int TypeRaff, int TypeDera )
   ASSERT(! ((TypeDera < 0) or (TypeDera > 1)));
   _TypeDera = TypeDera;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 int HOMARD_Hypothesis::GetRefinType() const
 {
   return _TypeRaff;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 int HOMARD_Hypothesis::GetUnRefType() const
 {
   return _TypeDera;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 void HOMARD_Hypothesis::SetField( const char* FieldName )
 {
@@ -222,19 +189,20 @@ void HOMARD_Hypothesis::SetField( const char* FieldName )
   MESSAGE( "SetField : FieldName = " << FieldName );
 }
 //=============================================================================
-void HOMARD_Hypothesis::SetRefinThr( int TypeThR, double ThreshR )
+std::string HOMARD_Hypothesis::GetFieldName() const
 {
-  MESSAGE( "SetRefinThr : TypeThR = " << TypeThR << ", ThreshR = " << ThreshR );
-  ASSERT(!(( TypeThR < 0) or (TypeThR > 3 )));
-  _TypeThR = TypeThR;
-  _ThreshR = ThreshR;
+  return _Field;
 }
 //=============================================================================
-void HOMARD_Hypothesis::SetUnRefThr( int TypeThC, double ThreshC )
+void HOMARD_Hypothesis::SetUseField( int UsField )
 {
-  ASSERT(!((TypeThC < 0) or (TypeThC > 3)));
-  _TypeThC = TypeThC;
-  _ThreshC = ThreshC;
+  ASSERT(!((UsField < 0) or (UsField > 1 )));
+  _UsField = UsField;
+}
+//=============================================================================
+int HOMARD_Hypothesis::GetUseField() const
+{
+  return _UsField;
 }
 //=============================================================================
 void HOMARD_Hypothesis::SetUseComp( int UsCmpI )
@@ -243,19 +211,33 @@ void HOMARD_Hypothesis::SetUseComp( int UsCmpI )
   _UsCmpI = UsCmpI;
 }
 //=============================================================================
-void HOMARD_Hypothesis::SetUseField( int UsField )
+int HOMARD_Hypothesis::GetUseComp() const
 {
-  ASSERT(!((UsField < 0) or (UsField > 1 )));
-  _UsField = UsField;
+  return _UsCmpI;
 }
-
 //=============================================================================
-/*!
-*/
+void HOMARD_Hypothesis::AddComp( const char* NomComposant )
+{
+  _ListComposant.push_back( std::string( NomComposant ) );
+}
 //=============================================================================
-std::string HOMARD_Hypothesis::GetFieldName() const
+void HOMARD_Hypothesis::SupprComp()
 {
-  return _Field;
+  MESSAGE ("SupprComp") ;
+  _ListComposant.clear();
+}
+//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetListComp() const
+{
+  return _ListComposant;
+}
+//=============================================================================
+void HOMARD_Hypothesis::SetRefinThr( int TypeThR, double ThreshR )
+{
+  MESSAGE( "SetRefinThr : TypeThR = " << TypeThR << ", ThreshR = " << ThreshR );
+  ASSERT(!(( TypeThR < 0) or (TypeThR > 4 )));
+  _TypeThR = TypeThR;
+  _ThreshR = ThreshR;
 }
 //=============================================================================
 int HOMARD_Hypothesis::GetRefinThrType() const
@@ -268,101 +250,74 @@ double HOMARD_Hypothesis::GetThreshR() const
   return _ThreshR;
 }
 //=============================================================================
+void HOMARD_Hypothesis::SetUnRefThr( int TypeThC, double ThreshC )
+{
+  ASSERT(!((TypeThC < 0) or (TypeThC > 4)));
+  _TypeThC = TypeThC;
+  _ThreshC = ThreshC;
+}
+//=============================================================================
 int HOMARD_Hypothesis::GetUnRefThrType() const
 {
   return _TypeThC;
 }
-
 //=============================================================================
 double HOMARD_Hypothesis::GetThreshC() const
 {
   return _ThreshC;
 }
 //=============================================================================
-int HOMARD_Hypothesis::GetUseField() const
-{
-  return _UsField;
-}
+void HOMARD_Hypothesis::SetNivMax( int NivMax )
 //=============================================================================
-int HOMARD_Hypothesis::GetUseCompI() const
 {
-  return _UsCmpI;
+  _NivMax = NivMax;
 }
 //=============================================================================
-/*!
-*/
+const int HOMARD_Hypothesis::GetNivMax() const
 //=============================================================================
-void HOMARD_Hypothesis::AddIteration( const char* NomIteration )
 {
-  _ListIter.push_back( std::string( NomIteration ) );
+  return _NivMax;
 }
 //=============================================================================
-void HOMARD_Hypothesis::SupprIterations()
-{
-  _ListIter.clear();
-}
+void HOMARD_Hypothesis::SetDiamMin( double DiamMin )
 //=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetIterations() const
 {
-  return _ListIter;
+  _DiamMin = DiamMin;
 }
 //=============================================================================
-/*!
-*/
+const double HOMARD_Hypothesis::GetDiamMin() const
 //=============================================================================
-void HOMARD_Hypothesis::AddZone( const char* NomZone, int TypeUse )
 {
-  _ListZone.push_back( std::string( NomZone ) );
-  std::stringstream saux1 ;
-  saux1 << TypeUse ;
-  std::string saux2 = saux1.str() ;
-  _ListZone.push_back( saux2 );
+  return _DiamMin;
 }
 //=============================================================================
-void HOMARD_Hypothesis::SupprZone( const char* NomZone )
-{
-  std::list<std::string>::iterator it = find( _ListZone.begin(), _ListZone.end(), NomZone );
-  if ( it != _ListZone.end() )
-  {
-    _ListZone.erase( it );
-  }
-}
+void HOMARD_Hypothesis::SetAdapInit( int AdapInit )
 //=============================================================================
-void HOMARD_Hypothesis::SupprZones()
 {
-  _ListZone.clear();
+  _AdapInit = AdapInit;
 }
 //=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetZones() const
+const int HOMARD_Hypothesis::GetAdapInit() const
+//=============================================================================
 {
-  return _ListZone;
+  return _AdapInit;
 }
 //=============================================================================
-/*!
-*/
+void HOMARD_Hypothesis::SetLevelOutput( int LevelOutput )
 //=============================================================================
-void HOMARD_Hypothesis::AddComp( const char* NomComposant )
 {
-  _ListComposant.push_back( std::string( NomComposant ) );
+  _LevelOutput = LevelOutput;
 }
 //=============================================================================
-void HOMARD_Hypothesis::SupprComp()
-{
-  std::cerr << "HOMARD_Hypothesis::SupprComp" << std::endl;
-  _ListComposant.clear();
-}
+const int HOMARD_Hypothesis::GetLevelOutput() const
 //=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetListComp() const
 {
-  return _ListComposant;
+  return _LevelOutput;
 }
 //=============================================================================
-/*!
-*/
-//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetGroups() const
+void HOMARD_Hypothesis::AddGroup( const char* Group)
 {
-  return _ListGroupSelected;
+  _ListGroupSelected.push_back(Group);
 }
 //=============================================================================
 void HOMARD_Hypothesis::SetGroups( const std::list<std::string>& ListGroup )
@@ -373,30 +328,21 @@ void HOMARD_Hypothesis::SetGroups( const std::list<std::string>& ListGroup )
     _ListGroupSelected.push_back((*it++));
 }
 //=============================================================================
-void HOMARD_Hypothesis::AddGroup( const char* Group)
+const std::list<std::string>& HOMARD_Hypothesis::GetGroups() const
 {
-  _ListGroupSelected.push_back(Group);
+  return _ListGroupSelected;
 }
 //=============================================================================
-/*!
-*/
-//=============================================================================
 void HOMARD_Hypothesis::SetTypeFieldInterp( int TypeFieldInterp )
 {
   ASSERT (!((TypeFieldInterp < -1) or (TypeFieldInterp > 2)));
   _TypeFieldInterp = TypeFieldInterp;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 int HOMARD_Hypothesis::GetTypeFieldInterp() const
 {
   return _TypeFieldInterp;
 }
-/*!
-*/
 //=============================================================================
 void HOMARD_Hypothesis::AddFieldInterp( const char* FieldInterp )
 {
@@ -405,7 +351,7 @@ void HOMARD_Hypothesis::AddFieldInterp( const char* FieldInterp )
 //=============================================================================
 void HOMARD_Hypothesis::SupprFieldInterp()
 {
-  std::cerr << "HOMARD_Hypothesis::SupprFieldInterpp" << std::endl;
+  MESSAGE ("SupprFieldInterp") ;
   _ListFieldInterp.clear();
 }
 //=============================================================================
@@ -414,50 +360,71 @@ const std::list<std::string>& HOMARD_Hypothesis::GetListFieldInterp() const
   return _ListFieldInterp;
 }
 //=============================================================================
-void HOMARD_Hypothesis::SetNivMax( int NivMax )
 //=============================================================================
-{
-  _NivMax = NivMax;
-}
+// Liens avec les autres structures
 //=============================================================================
-const int HOMARD_Hypothesis::GetNivMax() const
 //=============================================================================
+void HOMARD_Hypothesis::SetCaseCreation( const char* NomCasCreation )
 {
-  return _NivMax;
+  _NomCasCreation = std::string( NomCasCreation );
 }
 //=============================================================================
-void HOMARD_Hypothesis::SetAdapInit( int AdapInit )
-//=============================================================================
+std::string HOMARD_Hypothesis::GetCaseCreation() const
 {
-  _AdapInit = AdapInit;
+  return _NomCasCreation;
 }
 //=============================================================================
-const int HOMARD_Hypothesis::GetAdapInit() const
-//=============================================================================
+void HOMARD_Hypothesis::LinkIteration( const char* NomIteration )
 {
-  return _AdapInit;
+  _ListIter.push_back( std::string( NomIteration ) );
 }
 //=============================================================================
-void HOMARD_Hypothesis::SetDiamMin( double DiamMin )
-//=============================================================================
+void HOMARD_Hypothesis::UnLinkIteration( const char* NomIteration )
 {
-  _DiamMin = DiamMin;
+  std::list<std::string>::iterator it = find( _ListIter.begin(), _ListIter.end(), NomIteration ) ;
+  if ( it != _ListIter.end() )
+  {
+    MESSAGE ("Dans UnLinkIteration pour " << NomIteration) ;
+    _ListIter.erase( it ) ;
+  }
 }
 //=============================================================================
-const double HOMARD_Hypothesis::GetDiamMin() const
+void HOMARD_Hypothesis::UnLinkIterations()
+{
+  _ListIter.clear();
+}
 //=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetIterations() const
 {
-  return _DiamMin;
+  return _ListIter;
 }
 //=============================================================================
-void HOMARD_Hypothesis::SetLevelOutput( int LevelOutput )
+void HOMARD_Hypothesis::AddZone( const char* NomZone, int TypeUse )
+{
+  MESSAGE ("Dans AddZone pour " << NomZone) ;
+  _ListZone.push_back( std::string( NomZone ) );
+  std::stringstream saux1 ;
+  saux1 << TypeUse ;
+  std::string saux2 = saux1.str() ;
+  _ListZone.push_back( saux2 );
+}
 //=============================================================================
+void HOMARD_Hypothesis::SupprZone( const char* NomZone )
 {
-  _LevelOutput = LevelOutput;
+  MESSAGE ("Dans SupprZone pour " << NomZone) ;
+  std::list<std::string>::iterator it = find( _ListZone.begin(), _ListZone.end(), NomZone );
+  if ( it != _ListZone.end() )
+  {
+    _ListZone.erase( it );
+  }
 }
 //=============================================================================
-const int HOMARD_Hypothesis::GetLevelOutput() const
+void HOMARD_Hypothesis::SupprZones()
+{
+  _ListZone.clear();
+}
 //=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetZones() const
 {
-  return _LevelOutput;
+  return _ListZone;
 }
index fef6a2d423ef1471b0d06867c9074a6a47a5d0dd..4fa6fdac34e880190dc0e259be25845626cf84e0 100644 (file)
 //  File   : HOMARD_Hypothesis.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #ifndef _HOMARD_HYPOTHESIS_HXX_
 #define _HOMARD_HYPOTHESIS_HXX_
@@ -34,44 +43,48 @@ public:
   HOMARD_Hypothesis();
   ~HOMARD_Hypothesis();
 
+// Generalites
   void                          SetName( const char* Name );
   std::string                   GetName() const;
-  void                          SetCaseCreation( const char* NomCasCreation );
-  std::string                   GetCaseCreation() const;
+
   std::string                   GetDumpPython() const;
 
+// Caracteristiques
   void                          SetAdapType( int TypeAdap );
   int                           GetAdapType() const;
-
   void                          SetRefinTypeDera( int TypeRaff, int TypeDera );
   int                           GetRefinType() const;
   int                           GetUnRefType() const;
 
   void                          SetField( const char* FieldName );
-  void                          SetRefinThr( int TypeThR, double ThreshR );
-  void                          SetUnRefThr( int TypeThC, double ThreshC );
-  void                          SetUseComp( int UsCmpI );
-  void                          SetUseField( int UsField );
   std::string                   GetFieldName() const;
-  int                           GetRefinThrType()   const;
-  double                        GetThreshR()   const;
-  int                           GetUnRefThrType()   const;
-  double                        GetThreshC()   const;
+  void                          SetUseField( int UsField );
   int                           GetUseField()    const;
-  int                           GetUseCompI()    const;
 
+  void                          SetUseComp( int UsCmpI );
+  int                           GetUseComp()    const;
   void                          AddComp( const char* NomComposant );
   void                          SupprComp();
   const std::list<std::string>& GetListComp() const;
 
-  void                          AddIteration( const char* NomIter );
-  void                          SupprIterations();
-  const std::list<std::string>& GetIterations() const;
+  void                          SetRefinThr( int TypeThR, double ThreshR );
+  int                           GetRefinThrType()   const;
+  double                        GetThreshR()   const;
+  void                          SetUnRefThr( int TypeThC, double ThreshC );
+  int                           GetUnRefThrType()   const;
+  double                        GetThreshC()   const;
 
-  void                          AddZone( const char* NomZone, int TypeUse );
-  void                          SupprZone( const char* NomZone );
-  void                          SupprZones();
-  const std::list<std::string>& GetZones() const;
+  void                          SetNivMax( int NivMax );
+  const int                     GetNivMax() const;
+
+  void                          SetDiamMin( double DiamMin );
+  const double                  GetDiamMin() const;
+
+  void                          SetAdapInit( int AdapInit );
+  const int                     GetAdapInit() const;
+
+  void                          SetLevelOutput( int LevelOutput );
+  const int                     GetLevelOutput() const;
 
   void                          AddGroup( const char* LeGroupe);
   void                          SetGroups(const std::list<std::string>& ListGroup );
@@ -83,15 +96,19 @@ public:
   void                          SupprFieldInterp();
   const std::list<std::string>& GetListFieldInterp() const;
 
-  void                          SetNivMax( int NivMax );
-  const int                     GetNivMax() const;
-  void                          SetDiamMin( double DiamMin );
-  const double                  GetDiamMin() const;
-  void                          SetAdapInit( int AdapInit );
-  const int                     GetAdapInit() const;
-  void                          SetLevelOutput( int LevelOutput );
-  const int                     GetLevelOutput() const;
+// Liens avec les autres structures
+  void                          SetCaseCreation( const char* NomCasCreation );
+  std::string                   GetCaseCreation() const;
 
+  void                          LinkIteration( const char* NomIter );
+  void                          UnLinkIteration( const char* NomIter );
+  void                          UnLinkIterations();
+  const std::list<std::string>& GetIterations() const;
+
+  void                          AddZone( const char* NomZone, int TypeUse );
+  void                          SupprZone( const char* NomZone );
+  void                          SupprZones();
+  const std::list<std::string>& GetZones() const;
 
 private:
   std::string                   _Name;
index 2633b4b151394a68c80dd71f1e2cd731f6a5c8b6..c65ad8237711790efbd52cf2174486a2555eb992 100644 (file)
 //  File   : HOMARD_Iteration.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #include "HOMARD_Iteration.hxx"
 #include "utilities.h"
@@ -51,28 +60,20 @@ HOMARD_Iteration::~HOMARD_Iteration()
 {
   MESSAGE("~HOMARD_Iteration");
 }
-
 //=============================================================================
-/*!
-*/
+//=============================================================================
+// Generalites
+//=============================================================================
 //=============================================================================
 void HOMARD_Iteration::SetName( const char* Name )
 {
   _Name = std::string( Name );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 std::string HOMARD_Iteration::GetName() const
 {
   return _Name;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 std::string HOMARD_Iteration::GetDumpPython() const
 {
@@ -118,221 +119,155 @@ std::string HOMARD_Iteration::GetDumpPython() const
   return aScript.str();
 }
 //=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetEtat( bool etat )
-{
-  _Etat = etat;
-}
-
+// Caracteristiques
 //=============================================================================
-/*!
-*/
 //=============================================================================
-bool HOMARD_Iteration::GetEtat() const
+void HOMARD_Iteration::SetDirName( const char* NomDir )
 {
-  return _Etat;
+  _NomDir = std::string( NomDir );
 }
-
 //=============================================================================
-/*!
-*/
+std::string HOMARD_Iteration::GetDirName() const
+{
+   return _NomDir;
+}
 //=============================================================================
 void HOMARD_Iteration::SetNumber( int NumIter )
 {
   _NumIter = NumIter;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 int HOMARD_Iteration::GetNumber() const
 {
   return _NumIter;
 }
-
 //=============================================================================
-/*!
-*/
+void HOMARD_Iteration::SetEtat( bool etat )
+{
+  _Etat = etat;
+}
+//=============================================================================
+bool HOMARD_Iteration::GetEtat() const
+{
+  return _Etat;
+}
 //=============================================================================
 void HOMARD_Iteration::SetMeshName( const char* NomMesh )
 {
   _NomMesh = std::string( NomMesh );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 std::string HOMARD_Iteration::GetMeshName() const
 {
   return _NomMesh;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetIterParentName( const char* IterParent )
+void HOMARD_Iteration::SetMeshFile( const char* MeshFile )
 {
-  _IterParent = IterParent;
+  _MeshFile = std::string( MeshFile );
 }
-
 //=============================================================================
-/*!
-*/
-//=============================================================================
-std::string HOMARD_Iteration::GetIterParentName() const
+std::string HOMARD_Iteration::GetMeshFile() const
 {
-  return _IterParent;
+  return _MeshFile;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::AddIteration( const char* NomIteration )
+void HOMARD_Iteration::SetFieldFile( const char* FieldFile )
 {
-  _mesIterFilles.push_back( std::string( NomIteration ) );
+  _FieldFile = std::string( FieldFile );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-const std::list<std::string>& HOMARD_Iteration::GetIterations() const
+std::string HOMARD_Iteration::GetFieldFile() const
 {
-  return _mesIterFilles;
+  return _FieldFile;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SupprIterations()
+void HOMARD_Iteration::SetTimeStepRank( int TimeStep, int Rank )
 {
-  _mesIterFilles.clear();
+  _TimeStep = TimeStep;
+  _Rank = Rank;
 }
-
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetHypoName( const char* NomHypo )
+int HOMARD_Iteration::GetTimeStep() const
 {
-  _NomHypo = std::string( NomHypo );
+  return _TimeStep;
 }
-
 //=============================================================================
-/*!
-*/
-//=============================================================================
-std::string HOMARD_Iteration::GetHypoName() const
+int HOMARD_Iteration::GetRank() const
 {
-  return _NomHypo;
+  return _Rank;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetMeshFile( const char* MeshFile )
+void HOMARD_Iteration::SetMessFile( const char* MessFile )
 {
-  _MeshFile = std::string( MeshFile );
+  _MessFile = std::string( MessFile );
 }
-
 //=============================================================================
-/*!
-*/
-//=============================================================================
-std::string HOMARD_Iteration::GetMeshFile() const
+std::string HOMARD_Iteration::GetMessFile() const
 {
-  return _MeshFile;
+  return _MessFile;
 }
-
 //=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetFieldFile( const char* FieldFile )
+// Liens avec les autres iterations
+//=============================================================================
+//=============================================================================
+void HOMARD_Iteration::LinkNextIteration( const char* NomIteration )
 {
-  _FieldFile = std::string( FieldFile );
+  _mesIterFilles.push_back( std::string( NomIteration ) );
 }
 //=============================================================================
-std::string HOMARD_Iteration::GetFieldFile() const
+void HOMARD_Iteration::UnLinkNextIteration( const char* NomIteration )
 {
-  return _FieldFile;
+  std::list<std::string>::iterator it = find( _mesIterFilles.begin(), _mesIterFilles.end(), NomIteration ) ;
+  if ( it != _mesIterFilles.end() )
+  {
+    MESSAGE ("Dans UnLinkNextIteration pour " << NomIteration) ;
+    _mesIterFilles.erase( it ) ;
+  }
 }
-
 //=============================================================================
-/*!
-*/
-//=============================================================================
-void HOMARD_Iteration::SetTimeStepRank( int TimeStep, int Rank )
+void HOMARD_Iteration::UnLinkNextIterations()
 {
-  _TimeStep = TimeStep;
-  _Rank = Rank;
+  _mesIterFilles.clear();
 }
 //=============================================================================
-int HOMARD_Iteration::GetTimeStep() const
+const std::list<std::string>& HOMARD_Iteration::GetIterations() const
 {
-  return _TimeStep;
+  return _mesIterFilles;
 }
 //=============================================================================
-int HOMARD_Iteration::GetRank() const
+void HOMARD_Iteration::SetIterParentName( const char* IterParent )
 {
-  return _Rank;
+  _IterParent = IterParent;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetCaseName( const char* NomCas )
+std::string HOMARD_Iteration::GetIterParentName() const
 {
-  _NomCas = std::string( NomCas );
+  return _IterParent;
 }
-
 //=============================================================================
-/*!
-*/
 //=============================================================================
-std::string HOMARD_Iteration::GetCaseName() const
-{
-  return _NomCas;
-}
+// Liens avec les autres structures
 //=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetDirName( const char* NomDir )
+void HOMARD_Iteration::SetCaseName( const char* NomCas )
 {
-  _NomDir = std::string( NomDir );
+  _NomCas = std::string( NomCas );
 }
 //=============================================================================
-/*!
-*/
-//=============================================================================
-std::string HOMARD_Iteration::GetDirName() const
+std::string HOMARD_Iteration::GetCaseName() const
 {
-   return _NomDir;
+  return _NomCas;
 }
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetMessFile( const char* MessFile )
+void HOMARD_Iteration::SetHypoName( const char* NomHypo )
 {
-  _MessFile = std::string( MessFile );
+  _NomHypo = std::string( NomHypo );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-std::string HOMARD_Iteration::GetMessFile() const
+std::string HOMARD_Iteration::GetHypoName() const
 {
-  return _MessFile;
+  return _NomHypo;
 }
index a8521263a8bcaacbd41a078ea1452888d9d5bc39..78d1b2706163b6cb223d2c1405642f452f6865c9 100644 (file)
 //  File   : HOMARD_Iteration.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #ifndef _HOMARD_ITER_HXX_
 #define _HOMARD_ITER_HXX_
@@ -34,46 +43,52 @@ public:
   HOMARD_Iteration();
   ~HOMARD_Iteration();
 
+// Generalites
   void                          SetName( const char* Name );
   std::string                   GetName() const;
+
   std::string                   GetDumpPython() const;
 
-  void                          SetEtat( bool etat );
-  bool                          GetEtat() const;
+// Caracteristiques
+  void                          SetDirName( const char* NomDir );
+  std::string                   GetDirName() const;
 
   void                          SetNumber( int NumIter );
   int                           GetNumber() const;
 
-  void                          SetMeshFile( const char* MeshFile );
-  std::string                   GetMeshFile() const;
+  void                          SetEtat( bool etat );
+  bool                          GetEtat() const;
 
   void                          SetMeshName( const char* NomMesh );
   std::string                   GetMeshName() const;
 
+  void                          SetMeshFile( const char* MeshFile );
+  std::string                   GetMeshFile() const;
+
   void                          SetFieldFile( const char* FieldFile );
   std::string                   GetFieldFile() const;
   void                          SetTimeStepRank( int TimeStep, int Rank );
   int                           GetTimeStep() const;
   int                           GetRank() const;
 
-  void                          SetIterParentName( const char* iterParent );
-  std::string                   GetIterParentName() const;
+  void                          SetMessFile( const char* MessFile );
+  std::string                   GetMessFile() const;
 
-  void                          AddIteration( const char* iter );
+// Liens avec les autres iterations
+  void                          LinkNextIteration( const char* NomIteration );
+  void                          UnLinkNextIteration( const char* NomIteration );
+  void                          UnLinkNextIterations();
   const std::list<std::string>& GetIterations() const;
-  void                          SupprIterations();
 
-  void                          SetHypoName( const char* NomHypo );
-  std::string                   GetHypoName() const;
+  void                          SetIterParentName( const char* iterParent );
+  std::string                   GetIterParentName() const;
 
+// Liens avec les autres structures
   void                          SetCaseName( const char* NomCas );
   std::string                   GetCaseName() const;
 
-  void                          SetDirName( const char* NomDir );
-  std::string                   GetDirName() const;
-
-  void                          SetMessFile( const char* MessFile );
-  std::string                   GetMessFile() const;
+  void                          SetHypoName( const char* NomHypo );
+  std::string                   GetHypoName() const;
 
 private:
   std::string                   _Name;
index 6e8473be29e934754ef2d3357e0c9dff974798af..742d594caead9b99df718e3239f883f654714fe4 100644 (file)
 //  File   : HOMARD_Zone.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #include "HOMARD_Zone.hxx"
 #include "utilities.h"
@@ -45,19 +54,20 @@ HOMARD_Zone::~HOMARD_Zone()
 {
   MESSAGE("~HOMARD_Zone") ;
 }
-
+//=============================================================================
+//=============================================================================
+// Generalites
+//=============================================================================
 //=============================================================================
 void HOMARD_Zone::SetName( const char* Name )
 {
-  _Name = std::string( Name ) ;
+  _Name = std::string( Name );
 }
-
 //=============================================================================
 std::string HOMARD_Zone::GetName() const
 {
   return _Name;
 }
-
 //=============================================================================
 std::string HOMARD_Zone::GetDumpPython() const
 {
@@ -137,24 +147,20 @@ std::string HOMARD_Zone::GetDumpPython() const
 
   return aScript.str() ;
 }
-
+//=============================================================================
+//=============================================================================
+// Caracteristiques
+//=============================================================================
 //=============================================================================
 void HOMARD_Zone::SetType( int Type )
 {
   _Type = Type;
 }
-
 //=============================================================================
 int HOMARD_Zone::GetType() const
 {
   return _Type;
 }
-
-//======================================================================
-void HOMARD_Zone::SetLimit( double X0, double X1, double X2 )
-{
-  _Xincr = X0; _Yincr = X1; _Zincr = X2;
-}
 //=======================================================================================
 void HOMARD_Zone::SetBox( double X0, double X1, double X2, double X3, double X4, double X5 )
 {
@@ -162,16 +168,6 @@ void HOMARD_Zone::SetBox( double X0, double X1, double X2, double X3, double X4,
   _Ymin = X2; _Ymax = X3;
   _Zmin = X4; _Zmax = X5;
 }
-
-//======================================================================
-void HOMARD_Zone::SetSphere( double X0, double X1, double X2, double X3 )
-{
-  _Xcentre = X0;
-  _Ycentre = X1;
-  _Zcentre = X2;
-  _Rayon = X3;
-}
-
 //=======================================================================================
 void HOMARD_Zone::SetCylinder( double X0, double X1, double X2,
                                double X3, double X4, double X5, double X6, double X7 )
@@ -199,17 +195,14 @@ void HOMARD_Zone::SetPipe( double X0, double X1, double X2,
   _Haut = X7;
   _Rayonint = X8;
 }
-
-//=======================================================================================
-std::vector<double> HOMARD_Zone::GetLimit() const
+//======================================================================
+void HOMARD_Zone::SetSphere( double X0, double X1, double X2, double X3 )
 {
-  std::vector<double> mesLimit;
-  mesLimit.push_back( _Xincr ) ;
-  mesLimit.push_back( _Yincr ) ;
-  mesLimit.push_back( _Zincr ) ;
-  return mesLimit;
+  _Xcentre = X0;
+  _Ycentre = X1;
+  _Zcentre = X2;
+  _Rayon = X3;
 }
-
 //=======================================================================================
 std::vector<double> HOMARD_Zone::GetCoords() const
 {
@@ -286,13 +279,34 @@ std::vector<double> HOMARD_Zone::GetCoords() const
   }
   return mesCoor;
 }
-
+//======================================================================
+void HOMARD_Zone::SetLimit( double X0, double X1, double X2 )
+{
+  _Xincr = X0; _Yincr = X1; _Zincr = X2;
+}
+//=======================================================================================
+std::vector<double> HOMARD_Zone::GetLimit() const
+{
+  std::vector<double> mesLimit;
+  mesLimit.push_back( _Xincr ) ;
+  mesLimit.push_back( _Yincr ) ;
+  mesLimit.push_back( _Zincr ) ;
+  return mesLimit;
+}
+//=============================================================================
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
 //=============================================================================
 void HOMARD_Zone::AddHypo( const char* NomHypo )
 {
   _ListHypo.push_back( std::string( NomHypo ) ) ;
 }
-
+//=============================================================================
+const std::list<std::string>& HOMARD_Zone::GetHypo() const
+{
+  return _ListHypo;
+}
 //=============================================================================
 void HOMARD_Zone::SupprHypo( const char* NomHypo )
 {
@@ -303,13 +317,6 @@ void HOMARD_Zone::SupprHypo( const char* NomHypo )
     _ListHypo.erase( it ) ;
   }
 }
-
-//=============================================================================
-const std::list<std::string>& HOMARD_Zone::GetHypo() const
-{
-  return _ListHypo;
-}
-
 //=============================================================================
 void HOMARD_Zone::SupprHypos()
 {
index d38492c9d4ffc2b8660ffec5fdb377d54212c19d..68c0f2ca347e1fea885b409f3c56a6c87914e0c3 100644 (file)
 //  File   : HOMARD_Zone.hxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #ifndef _HOMARD_Zone_HXX_
 #define _HOMARD_Zone_HXX_
@@ -35,30 +44,36 @@ public:
   HOMARD_Zone();
   ~HOMARD_Zone();
 
+// Generalites
   void                          SetName( const char* Name );
   std::string                   GetName() const;
+
   std::string                   GetDumpPython() const;
 
+// Caracteristiques
+  void                          SetType( int Type );
+  int                           GetType() const;
+
   void                          SetBox( double X0, double X1, double X2,
                                         double X3, double X4, double X5 );
-  std::vector<double>           GetCoords() const;
-
-  void                          SetSphere( double X0, double X1, double X2, double X3 );
 
   void                          SetCylinder( double X0, double X1, double X2, double X3,
                                              double X4, double X5, double X6, double X7 );
+
   void                          SetPipe( double X0, double X1, double X2, double X3,
                                          double X4, double X5, double X6, double X7, double X8 );
 
+  void                          SetSphere( double X0, double X1, double X2, double X3 );
+
+  std::vector<double>           GetCoords() const;
+
   void                          SetLimit( double X0, double X1, double X2 );
   std::vector<double>           GetLimit() const;
 
-  void                          SetType( int Type );
-  int                           GetType() const;
-
+// Liens avec les autres structures
   void                          AddHypo( const char* NomHypo );
-  void                          SupprHypo( const char* NomHypo );
   const std::list<std::string>& GetHypo() const;
+  void                          SupprHypo( const char* NomHypo );
   void                          SupprHypos();
 
 private:
index 55d14f9455281844d550337d9f2c676d0b05df1b..763965412d303391cbc9728037144d7e64b693d2 100644 (file)
@@ -535,6 +535,8 @@ void HomardDriver::TexteField( const std::string FieldName, const std::string Fi
   { saux = "HRe" ; }
   if ( TypeThR == 3 )
   { saux = "HPE" ; }
+  if ( TypeThR == 4 )
+  { saux = "HMS" ; }
   if ( saux != " " )
   {
     std::stringstream saux1 ;
@@ -550,6 +552,8 @@ void HomardDriver::TexteField( const std::string FieldName, const std::string Fi
   { saux = "BRe" ; }
   if ( TypeThC == 3 )
   { saux = "BPE" ; }
+  if ( TypeThC == 4 )
+  { saux = "BMS" ; }
   if ( saux != " " )
   {
     std::stringstream saux1 ;
index 6c28306b21c504656e94164d9e7e7eadf3431616..b3daf3969c39a51176c2811a0a39746a19750137 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'CreateHypothesis.ui'
 **
-** Created: Wed Nov 14 11:07:43 2012
+** Created: Mon Jan 14 14:54:59 2013
 **      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -75,6 +75,8 @@ public:
     QDoubleSpinBox *SpinBox_RRel;
     QRadioButton *RBRAbs;
     QDoubleSpinBox *SpinBox_RAbs;
+    QRadioButton *RBRMuSigma;
+    QDoubleSpinBox *SpinBox_RMuSigma;
     QRadioButton *RBRNo;
     QGroupBox *GBCoarseningThresholds;
     QGridLayout *gridLayout4;
@@ -84,6 +86,8 @@ public:
     QDoubleSpinBox *SpinBox_CRel;
     QRadioButton *RBCAbs;
     QDoubleSpinBox *SpinBox_CAbs;
+    QRadioButton *RBCMuSigma;
+    QDoubleSpinBox *SpinBox_CMuSigma;
     QRadioButton *RBCNo;
     QGroupBox *GBAreaManagement;
     QGridLayout *gridLayout_4;
@@ -395,10 +399,25 @@ public:
 
         gridLayout3->addWidget(SpinBox_RAbs, 2, 1, 1, 1);
 
+        RBRMuSigma = new QRadioButton(GBRefinementThresholds);
+        RBRMuSigma->setObjectName(QString::fromUtf8("RBRMuSigma"));
+
+        gridLayout3->addWidget(RBRMuSigma, 3, 0, 1, 1);
+
+        SpinBox_RMuSigma = new QDoubleSpinBox(GBRefinementThresholds);
+        SpinBox_RMuSigma->setObjectName(QString::fromUtf8("SpinBox_RMuSigma"));
+        SpinBox_RMuSigma->setEnabled(false);
+        SpinBox_RMuSigma->setDecimals(8);
+        SpinBox_RMuSigma->setMinimum(0);
+        SpinBox_RMuSigma->setMaximum(1e+12);
+        SpinBox_RMuSigma->setSingleStep(0.1);
+
+        gridLayout3->addWidget(SpinBox_RMuSigma, 3, 1, 1, 1);
+
         RBRNo = new QRadioButton(GBRefinementThresholds);
         RBRNo->setObjectName(QString::fromUtf8("RBRNo"));
 
-        gridLayout3->addWidget(RBRNo, 3, 0, 1, 1);
+        gridLayout3->addWidget(RBRNo, 4, 0, 1, 1);
 
 
         hboxLayout4->addWidget(GBRefinementThresholds);
@@ -458,11 +477,26 @@ public:
 
         gridLayout4->addWidget(SpinBox_CAbs, 2, 1, 1, 1);
 
+        RBCMuSigma = new QRadioButton(GBCoarseningThresholds);
+        RBCMuSigma->setObjectName(QString::fromUtf8("RBCMuSigma"));
+
+        gridLayout4->addWidget(RBCMuSigma, 3, 0, 1, 1);
+
+        SpinBox_CMuSigma = new QDoubleSpinBox(GBCoarseningThresholds);
+        SpinBox_CMuSigma->setObjectName(QString::fromUtf8("SpinBox_CMuSigma"));
+        SpinBox_CMuSigma->setEnabled(false);
+        SpinBox_CMuSigma->setDecimals(8);
+        SpinBox_CMuSigma->setMinimum(0);
+        SpinBox_CMuSigma->setMaximum(1e+12);
+        SpinBox_CMuSigma->setSingleStep(0.1);
+
+        gridLayout4->addWidget(SpinBox_CMuSigma, 3, 1, 1, 1);
+
         RBCNo = new QRadioButton(GBCoarseningThresholds);
         RBCNo->setObjectName(QString::fromUtf8("RBCNo"));
         RBCNo->setChecked(true);
 
-        gridLayout4->addWidget(RBCNo, 3, 0, 1, 1);
+        gridLayout4->addWidget(RBCNo, 4, 0, 1, 1);
 
 
         hboxLayout4->addWidget(GBCoarseningThresholds);
@@ -748,6 +782,7 @@ public:
         RBRRel->setText(QApplication::translate("CreateHypothesis", "Relative", 0, QApplication::UnicodeUTF8));
         SpinBox_RRel->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8));
         RBRAbs->setText(QApplication::translate("CreateHypothesis", "Absolute", 0, QApplication::UnicodeUTF8));
+        RBRMuSigma->setText(QApplication::translate("CreateHypothesis", "Mean + n*(std deviation)", 0, QApplication::UnicodeUTF8));
         RBRNo->setText(QApplication::translate("CreateHypothesis", "No refinement", 0, QApplication::UnicodeUTF8));
         GBCoarseningThresholds->setTitle(QApplication::translate("CreateHypothesis", "Coarsening threshold", 0, QApplication::UnicodeUTF8));
         RBCPE->setText(QApplication::translate("CreateHypothesis", "Percentage of meshes", 0, QApplication::UnicodeUTF8));
@@ -755,6 +790,7 @@ public:
         RBCRel->setText(QApplication::translate("CreateHypothesis", "Relative", 0, QApplication::UnicodeUTF8));
         SpinBox_CRel->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8));
         RBCAbs->setText(QApplication::translate("CreateHypothesis", "Absolute", 0, QApplication::UnicodeUTF8));
+        RBCMuSigma->setText(QApplication::translate("CreateHypothesis", "Mean - n*(std deviation)", 0, QApplication::UnicodeUTF8));
         RBCNo->setText(QApplication::translate("CreateHypothesis", "No coarsening", 0, QApplication::UnicodeUTF8));
         GBAreaManagement->setTitle(QApplication::translate("CreateHypothesis", "Zone management", 0, QApplication::UnicodeUTF8));
         QTableWidgetItem *___qtablewidgetitem2 = TWZone->horizontalHeaderItem(0);
index 2c4d96b6b26f5036256e0ce8d1d43990725621d4..177c5074bc4ec1eebbeea0eabe4cead5a19a70e5 100644 (file)
             </widget>
            </item>
            <item row="3" column="0">
+            <widget class="QRadioButton" name="RBRMuSigma">
+             <property name="text">
+              <string>Mean + n*(std deviation)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="1">
+            <widget class="QDoubleSpinBox" name="SpinBox_RMuSigma">
+             <property name="enabled">
+              <bool>false</bool>
+             </property>
+             <property name="decimals">
+              <number>8</number>
+             </property>
+             <property name="minimum">
+              <double>0.000000000000000</double>
+             </property>
+             <property name="maximum">
+              <double>1000000000000.000000000000000</double>
+             </property>
+             <property name="singleStep">
+              <double>0.100000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="0">
             <widget class="QRadioButton" name="RBRNo">
              <property name="text">
               <string>No refinement</string>
             </widget>
            </item>
            <item row="3" column="0">
+            <widget class="QRadioButton" name="RBCMuSigma">
+             <property name="text">
+              <string>Mean - n*(std deviation)</string>
+             </property>
+            </widget>
+           </item>
+           <item row="3" column="1">
+            <widget class="QDoubleSpinBox" name="SpinBox_CMuSigma">
+             <property name="enabled">
+              <bool>false</bool>
+             </property>
+             <property name="decimals">
+              <number>8</number>
+             </property>
+             <property name="minimum">
+              <double>0.000000000000000</double>
+             </property>
+             <property name="maximum">
+              <double>1000000000000.000000000000000</double>
+             </property>
+             <property name="singleStep">
+              <double>0.100000000000000</double>
+             </property>
+            </widget>
+           </item>
+           <item row="4" column="0">
             <widget class="QRadioButton" name="RBCNo">
              <property name="text">
               <string>No coarsening</string>
index aa243a99089aa49f560b1f7e714b8534041a2e09..9b8d9b111b259defb415b5facb9289e8e1125243 100644 (file)
@@ -126,7 +126,7 @@ void HOMARDGUI::initialize( CAM_Application* app )
 //================================================
 void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle  )
 {
-//   MESSAGE("HOMARDGUI::createHOMARDAction");
+//   MESSAGE("createHOMARDAction");
   QIcon icon;
   QWidget* parent = application()->desktop();
   SUIT_ResourceMgr* resMgr = application()->resourceMgr();
@@ -155,12 +155,11 @@ void HOMARDGUI::createActions(){
   createHOMARDAction( 1101, "NEW_CASE",       "cas_calcule.png"  );
   createHOMARDAction( 1102, "NEW_ITERATION",  "iter_next.png"    );
   createHOMARDAction( 1111, "COMPUTE",        "mesh_compute.png" );
-  createHOMARDAction( 1120, "EDIT_CASE",      "whatis.png"       );
-  createHOMARDAction( 1121, "EDIT_ITERATION", "whatis.png"       );
-  createHOMARDAction( 1122, "EDIT_HYPO",      "whatis.png"       );
-  createHOMARDAction( 1123, "EDIT_ZONE",      "whatis.png"       );
-  createHOMARDAction( 1124, "EDIT_BOUNDARY",  "whatis.png"       );
-  createHOMARDAction( 1130, "EDIT_MESS_FILE", "texte.png"        );
+//
+  createHOMARDAction( 1201, "EDIT",           "whatis.png"       );
+  createHOMARDAction( 1211, "DELETE",         "delete.png"       );
+//
+  createHOMARDAction( 1301, "EDIT_MESS_FILE", "texte.png"        );
 //
 }
 
@@ -182,26 +181,30 @@ void HOMARDGUI::createPreferences(){
 //                Verifier l'avant dernier nombre passe en parametre
 //================================================
 void HOMARDGUI::createMenus(){
-  MESSAGE("HOMARDGUI::createMenus")
-  int HOMARD_Id  = createMenu( tr( "HOMARD" ),  -1,  5, 10 );
+  MESSAGE("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( 1111, HOMARD_Id, -1 ); //COMPUTE
+//
+  HOMARD_Id  = createMenu( tr( "HOM_MEN_MODIFICATION" ),  -1,  5, 10 );
+  createMenu( 1201, HOMARD_Id, -1 ); //Edit
+  createMenu( 1211, HOMARD_Id, -1 ); //Delete
+//
+  HOMARD_Id  = createMenu( tr( "HOM_MEN_INFORMATION" ),  -1,  5, 10 );
+  createMenu( 1301, HOMARD_Id, -1 ); //EditAsciiFile pour le fichier listeStd ou bilan
   createMenu( separator(), HOMARD_Id,-1);
-  createMenu( 1120, HOMARD_Id, -1 ); //Edit_Case
-  createMenu( 1121, HOMARD_Id, -1 ); //Edit_Iteration
-  createMenu( 1122, HOMARD_Id, -1 ); //Edit Hypo
-  createMenu( 1123, HOMARD_Id, -1 ); //Edit_Zone
-  createMenu( 1124, HOMARD_Id, -1 ); //Edit_Boundary
+  createMenu( 1201, HOMARD_Id, -1 ); //Edit
   createMenu( separator(), HOMARD_Id,-1);
-  createMenu( 1130, HOMARD_Id, -1 ); //EditAsciiFile pour le fichier listeStd ou bilan
+//   createMenu( 1201, HOMARD_Id, -1 ); //Edit
 }
 
 //================================================
 void HOMARDGUI::OnGUIEvent()
 //================================================
 {
-  MESSAGE("HOMARDGUI::OnGUIEvent()")
+  MESSAGE("OnGUIEvent()")
   setOrb();
   const QObject* obj = sender();
   if ( !obj || !obj->inherits( "QAction" ) )
@@ -210,7 +213,7 @@ void HOMARDGUI::OnGUIEvent()
   bool ret;
   if ( id != -1 )
       ret = OnGUIEvent( id );
-  MESSAGE("************** End of HOMARDGUI::OnGUIEvent()");
+  MESSAGE("************** End of OnGUIEvent()");
 }
 
 //=======================================================================
@@ -218,7 +221,7 @@ void HOMARDGUI::OnGUIEvent()
 //=======================================================================
 bool HOMARDGUI::OnGUIEvent (int theCommandID)
 {
-  MESSAGE("HOMARDGUI::OnGUIEvent(int)");
+  MESSAGE("OnGUIEvent(int)");
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( application() );
   if ( !app ) return false;
 
@@ -286,72 +289,134 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       break;
     }
 
-    case 1120: // Edition d un cas
+    case 1201: // Edition d'un objet
     {
-      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
+      MESSAGE("command " << theCommandID << " activated");
+      QString nomObjet = HOMARD_QT_COMMUN::SelectionArbreEtude(QString(""), 1);
+      if (nomObjet == QString("")) break;
       _PTR(SObject) obj = chercheMonObjet();
-      if ((obj) and (HOMARD_UTILS::isCase(obj)))
+      if (obj)
       {
+        // Edition d'un cas
+        if (HOMARD_UTILS::isCase(obj))
+        {
           MonEditCase *aDlg = new MonEditCase(parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName ) ;
           aDlg->show();
-      }
-    }
-
-    case 1121: // Edition d une iteration
-    {
-      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
-      _PTR(SObject) obj = chercheMonObjet();
-      if ((obj) and (HOMARD_UTILS::isIter(obj)))
-      {
+        }
+        // Edition d'une iteration
+        else if (HOMARD_UTILS::isIter(obj))
+        {
           MonEditIteration *aDlg = new MonEditIteration(parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
           aDlg->show();
-      }
-    }
-
-    case 1122: // Edition d une hypothese
-    {
-      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
-      _PTR(SObject) obj = chercheMonObjet();
-      if ((obj) and (HOMARD_UTILS::isHypo(obj)))
-      {
+        }
+        // Edition d'une hypothese
+        else if (HOMARD_UTILS::isHypo(obj))
+        {
           MonEditHypothesis *aDlg = new MonEditHypothesis(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen),  _ObjectName, QString(""), QString("")) ;
           aDlg->show();
-      }
-    }
-
-    case 1123: // Edition d une zone
-    {
-      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
-      _PTR(SObject) obj = chercheMonObjet();
-      if ((obj) and (HOMARD_UTILS::isZone(obj)))
-      {
+        }
+        // Edition d'une zone
+        else if (HOMARD_UTILS::isZone(obj))
+        {
           MonEditZone *aDlg = new MonEditZone(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
           aDlg->show();
+        }
+        // Edition d'une frontiere discrete
+        else if (HOMARD_UTILS::isBoundaryDi(obj))
+        {
+            MESSAGE(".. Lancement de MonEditBoundaryDi" );
+            MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+            aDlg->show();
+        }
+        // Edition d'une frontiere analytique
+        else if (HOMARD_UTILS::isBoundaryAn(obj))
+        {
+            MESSAGE(".. Lancement de MonEditBoundaryAn" );
+            MonEditBoundaryAn *aDlg = new MonEditBoundaryAn(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+            aDlg->show();
+        }
       }
+      break;
     }
 
-    case 1124: // Edition d une frontiere
+    case 1211: // Suppression d'un objet
     {
-      MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
+      MESSAGE("command " << theCommandID << " activated");
+      QString nomObjet = HOMARD_QT_COMMUN::SelectionArbreEtude(QString(""), 1);
+      if (nomObjet == QString("")) break;
       _PTR(SObject) obj = chercheMonObjet();
-      if ((obj))
+      if (obj)
       {
-          if (HOMARD_UTILS::isBoundaryDi(obj))
+        // Suppression d'un cas
+        if (HOMARD_UTILS::isCase(obj))
+        {
+          try
+          { homardGen->DeleteCase(_ObjectName.toStdString().c_str()); }
+          catch( SALOME::SALOME_Exception& S_ex )
+          {
+            QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                      QString(CORBA::string_dup(S_ex.details.text)) );
+            getApp()->updateObjectBrowser();
+            return false;
+          }
+        }
+        // Suppression d'une iteration
+        else if (HOMARD_UTILS::isIter(obj))
+        {
+          try
+          { homardGen->DeleteIteration(_ObjectName.toStdString().c_str()); }
+          catch( SALOME::SALOME_Exception& S_ex )
+          {
+            QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                      QString(CORBA::string_dup(S_ex.details.text)) );
+            getApp()->updateObjectBrowser();
+            return false;
+          }
+        }
+        // Suppression d'une hypothese
+        else if (HOMARD_UTILS::isHypo(obj))
+        {
+          try
+          { homardGen->DeleteHypo(_ObjectName.toStdString().c_str()); }
+          catch( SALOME::SALOME_Exception& S_ex )
           {
-              MESSAGE(".. Lancement de MonEditBoundaryDi" );
-              MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
-              aDlg->show();
+            QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                      QString(CORBA::string_dup(S_ex.details.text)) );
+            getApp()->updateObjectBrowser();
+            return false;
           }
-          if (HOMARD_UTILS::isBoundaryAn(obj))
+        }
+        // Suppression d'une zone
+        else if (HOMARD_UTILS::isZone(obj))
+        {
+          try
+          { homardGen->DeleteZone(_ObjectName.toStdString().c_str()); }
+          catch( SALOME::SALOME_Exception& S_ex )
           {
-              MESSAGE(".. Lancement de MonEditBoundaryAn" );
-              MonEditBoundaryAn *aDlg = new MonEditBoundaryAn(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
-              aDlg->show();
+            QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                      QString(CORBA::string_dup(S_ex.details.text)) );
+            getApp()->updateObjectBrowser();
+            return false;
           }
+        }
+        // Suppression d'une frontiere
+        else if ( HOMARD_UTILS::isBoundaryDi(obj) or HOMARD_UTILS::isBoundaryAn(obj) )
+        {
+          try
+          { homardGen->DeleteBoundary(_ObjectName.toStdString().c_str()); }
+          catch( SALOME::SALOME_Exception& S_ex )
+          {
+            QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                      QString(CORBA::string_dup(S_ex.details.text)) );
+            getApp()->updateObjectBrowser();
+            return false;
+          }
+        }
       }
+      break;
     }
 
-    case 1130: // Edition du fichier mess
+    case 1301: // Affichage du fichier mess
     {
       MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
       _PTR(SObject) obj = chercheMonObjet();
@@ -360,7 +425,9 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
           MonEditFile *aDlg = new MonEditFile( 0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName ) ;
           aDlg->show();
       }
+      break;
      }
+
   }
   getApp()->updateObjectBrowser();
   return true;
@@ -457,53 +524,69 @@ _PTR(SObject) HOMARDGUI::chercheMonObjet()
 void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& title )
 //=============================================================================
 {
-  MESSAGE("Debut de HOMARDGUI::contextMenuPopup");
+  MESSAGE("Debut de contextMenuPopup");
   _PTR(SObject) obj = chercheMonObjet();
   if ( obj )
   {
     title = QString( obj->GetName().c_str() );
     _ObjectName = title;
     SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+//
+    QPixmap pix ;
+    bool DeleteObject = false ;
+    bool EditObject = false ;
 //
     if ( HOMARD_UTILS::isBoundaryAn(obj) )
     {
-      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
-      menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_BOUNDARY").toLatin1().data()), this,SLOT(EditBoDi()));
+      EditObject = true ;
+      DeleteObject = true ;
     }
     else if ( HOMARD_UTILS::isBoundaryDi(obj) )
     {
-      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
-      menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_BOUNDARY").toLatin1().data()), this,SLOT(EditBoDi()));
+      EditObject = true ;
+      DeleteObject = true ;
     }
     else if ( HOMARD_UTILS::isZone(obj) )
     {
-      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
-      menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_ZONE").toLatin1().data()), this,SLOT(EditZone()));
+      EditObject = true ;
+      DeleteObject = true ;
     }
     else if ( HOMARD_UTILS::isHypo(obj) )
     {
-      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
-      menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_HYPO").toLatin1().data()), this,SLOT(EditHypo()));
+      EditObject = true ;
+      DeleteObject = true ;
     }
     else if ( HOMARD_UTILS::isIter(obj) )
     {
-      QPixmap pix = resMgr->loadPixmap( "HOMARD", "iter_next.png" );
+      pix = resMgr->loadPixmap( "HOMARD", "iter_next.png" );
       menu->addAction(QIcon(pix), tr(QString("HOM_MEN_NEW_ITERATION").toLatin1().data()), this,SLOT(NextIter()));
-      QPixmap pix1 = resMgr->loadPixmap( "HOMARD", "whatis.png" );
-      menu->addAction(QIcon(pix1), tr(QString("HOM_MEN_EDIT_ITERATION").toLatin1().data()), this,SLOT(EditIter()));
       QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "mesh_compute.png" );
       menu->addAction(QIcon(pix2), tr(QString("HOM_MEN_COMPUTE").toLatin1().data()), this,SLOT(LanceCalcul()));
+      EditObject = true ;
+      DeleteObject = true ;
     }
     else if ( HOMARD_UTILS::isCase(obj) )
     {
-      QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
-      menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_CASE").toLatin1().data()), this,SLOT(EditCase()));
+      EditObject = true ;
+      DeleteObject = true ;
     }
     else if ( HOMARD_UTILS::isFileMess(obj) or HOMARD_UTILS::isFileSummary(obj) )
     {
-      QPixmap pix = resMgr->loadPixmap( "HOMARD", "texte.png" );
+      pix = resMgr->loadPixmap( "HOMARD", "texte.png" );
       menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_MESS_FILE").toLatin1().data()), this,SLOT(EditAsciiFile()));
     }
+//  Ajout d'un menu d'edition pour les objets qui le proposent
+    if ( EditObject )
+    {
+      pix = resMgr->loadPixmap( "HOMARD", "whatis.png" );
+      menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT").toLatin1().data()), this,SLOT(Edit()));
+    }
+//  Ajout d'un menu de destruction pour les objets qui le proposent
+    if ( DeleteObject )
+    {
+      pix = resMgr->loadPixmap( "HOMARD", "delete.png" );
+      menu->addAction(QIcon(pix), tr(QString("HOM_MEN_DELETE").toLatin1().data()), this,SLOT(Delete()));
+    }
   }
 }
 
@@ -517,35 +600,21 @@ void HOMARDGUI::LanceCalcul()
   this->OnGUIEvent(1111);
 }
 
-void HOMARDGUI::EditCase()
+void HOMARDGUI::Edit()
 {
-  this->OnGUIEvent(1120);
+  this->OnGUIEvent(1201);
 }
 
-void HOMARDGUI::EditIter()
+void HOMARDGUI::Delete()
 {
-  this->OnGUIEvent(1121);
-}
-
-void HOMARDGUI::EditHypo()
-{
-  this->OnGUIEvent(1122);
-}
-
-void HOMARDGUI::EditZone()
-{
-  this->OnGUIEvent(1123);
-}
-
-void HOMARDGUI::EditBoDi()
-{
-  this->OnGUIEvent(1124);
+  this->OnGUIEvent(1211);
 }
 
 void HOMARDGUI::EditAsciiFile()
 {
-  this->OnGUIEvent(1130);
+  this->OnGUIEvent(1301);
 }
+
 //
 //=============================================================================
 // Export the module
index 6db12449d7d9074ff05acad1fdb8257177293ef9..610571f8b31422877850368630e2f716702a6950 100644 (file)
@@ -17,7 +17,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  HOMARDGUI : HOMARD component GUI implemetation 
+//  HOMARDGUI : HOMARD component GUI implemetation
 //
 
 #ifndef _HOMARDGUI_H_
@@ -36,7 +36,7 @@
 
 class SalomeApp_Application;
 
-class HOMARDGUI: public SalomeApp_Module 
+class HOMARDGUI: public SalomeApp_Module
 {
   Q_OBJECT
 
@@ -61,14 +61,11 @@ public slots:
 
 private slots:
     void OnGUIEvent();
-    void EditBoDi();
-    void EditZone();
-    void EditHypo();
-    void EditIter();
-    void EditCase();
     void EditAsciiFile();
     void LanceCalcul();
     void NextIter();
+    void Edit();
+    void Delete();
     void XmGraceFichier();
 
 public:
index ab5b65389bb95abf2f3ed9e13d87ee01f548087e..d740bb40bc3be8abf5d516c2f162ab0fd55babbd 100644 (file)
@@ -7,6 +7,14 @@
         <source>HOM_MEN_HOMARD</source>
         <translation>HOMARD</translation>
     </message>
+    <message>
+        <source>HOM_MEN_MODIFICATION</source>
+        <translation>Modification</translation>
+    </message>
+    <message>
+        <source>HOM_MEN_INFORMATION</source>
+        <translation>Information</translation>
+    </message>
     <message>
         <source>HOM_MEN_NEW_CASE</source>
         <translation>New case</translation>
         <translation>Compute</translation>
     </message>
     <message>
-        <source>HOM_MEN_EDIT_CASE</source>
-        <translation>Edit the case</translation>
-    </message>
-    <message>
-        <source>HOM_MEN_EDIT_ITERATION</source>
-        <translation>Edit the iteration</translation>
+        <source>HOM_MEN_EDIT</source>
+        <translation>Edit</translation>
     </message>
     <message>
-        <source>HOM_MEN_EDIT_HYPO</source>
-        <translation>Edit the hypothesis</translation>
-    </message>
-    <message>
-        <source>HOM_MEN_EDIT_ZONE</source>
-        <translation>Edit the zone</translation>
-    </message>
-    <message>
-        <source>HOM_MEN_EDIT_BOUNDARY</source>
-        <translation>Edit the boundary</translation>
+        <source>HOM_MEN_DELETE</source>
+        <translation>Delete</translation>
     </message>
     <message>
         <source>HOM_MEN_EDIT_MESS_FILE</source>
         <translation>Compute</translation>
     </message>
     <message>
-        <source>HOM_TOP_EDIT_CASE</source>
-        <translation>Edit the case</translation>
-    </message>
-    <message>
-        <source>HOM_TOP_EDIT_ITERATION</source>
-        <translation>Edit the iteration</translation>
-    </message>
-    <message>
-        <source>HOM_TOP_EDIT_HYPO</source>
-        <translation>Edit the hypothesis</translation>
+        <source>HOM_TOP_EDIT</source>
+        <translation>Edit</translation>
     </message>
     <message>
-        <source>HOM_TOP_EDIT_ZONE</source>
-        <translation>Edit the zone</translation>
-    </message>
-    <message>
-        <source>HOM_TOP_EDIT_BOUNDARY</source>
-        <translation>Edit the boundary</translation>
+        <source>HOM_TOP_DELETE</source>
+        <translation>Delete</translation>
     </message>
     <message>
         <source>HOM_TOP_EDIT_MESS_FILE</source>
         <translation>Compute</translation>
     </message>
     <message>
-        <source>HOM_STB_EDIT_CASE</source>
-        <translation>Edit the case</translation>
-    </message>
-    <message>
-        <source>HOM_STB_EDIT_ITERATION</source>
-        <translation>Edit the iteration</translation>
-    </message>
-    <message>
-        <source>HOM_STB_EDIT_HYPO</source>
-        <translation>Edit the hypothesis</translation>
-    </message>
-    <message>
-        <source>HOM_STB_EDIT_ZONE</source>
-        <translation>Edit the zone</translation>
+        <source>HOM_STB_EDIT</source>
+        <translation>Edit</translation>
     </message>
     <message>
-        <source>HOM_STB_EDIT_BOUNDARY</source>
-        <translation>Edit the boundary</translation>
+        <source>HOM_STB_DELETE</source>
+        <translation>Delete</translation>
     </message>
     <message>
         <source>HOM_STB_EDIT_MESS_FILE</source>
index 6f791274f9675416574b84bbaad10db74fab4514..a4cb3ae1195af545a282158fb09b0ad69da2fd0f 100644 (file)
@@ -7,6 +7,14 @@
         <source>HOM_MEN_HOMARD</source>
         <translation>HOMARD</translation>
     </message>
+    <message>
+        <source>HOM_MEN_MODIFICATION</source>
+        <translation>Modification</translation>
+    </message>
+    <message>
+        <source>HOM_MEN_INFORMATION</source>
+        <translation>Information</translation>
+    </message>
     <message>
         <source>HOM_MEN_NEW_CASE</source>
         <translation>Nouveau cas</translation>
         <translation>Calculer</translation>
     </message>
     <message>
-        <source>HOM_MEN_EDIT_CASE</source>
-        <translation>Editer le cas</translation>
-    </message>
-    <message>
-        <source>HOM_MEN_EDIT_ITERATION</source>
-        <translation>Editer l&apos;itération</translation>
-    </message>
-    <message>
-        <source>HOM_MEN_EDIT_HYPO</source>
-        <translation>Editer l&apos;hypothèse</translation>
-    </message>
-    <message>
-        <source>HOM_MEN_EDIT_ZONE</source>
-        <translation>Editer la zone</translation>
+        <source>HOM_MEN_EDIT</source>
+        <translation>Editer</translation>
     </message>
     <message>
-        <source>HOM_MEN_EDIT_BOUNDARY</source>
-        <translation>Editer la frontière</translation>
+        <source>HOM_MEN_DELETE</source>
+        <translation>Supprimer</translation>
     </message>
     <message>
         <source>HOM_MEN_EDIT_MESS_FILE</source>
         <translation>Calculer</translation>
     </message>
     <message>
-        <source>HOM_TOP_EDIT_CASE</source>
-        <translation>Editer le cas</translation>
-    </message>
-    <message>
-        <source>HOM_TOP_EDIT_ITERATION</source>
-        <translation>Editer l&apos;itération</translation>
-    </message>
-    <message>
-        <source>HOM_TOP_EDIT_HYPO</source>
-        <translation>Editer l&apos;hypothèse</translation>
-    </message>
-    <message>
-        <source>HOM_TOP_EDIT_ZONE</source>
-        <translation>Editer la zone</translation>
+        <source>HOM_TOP_EDIT</source>
+        <translation>Editer</translation>
     </message>
     <message>
-        <source>HOM_TOP_EDIT_BOUNDARY</source>
-        <translation>Editer la frontière</translation>
+        <source>HOM_TOP_DELETE</source>
+        <translation>Supprimer</translation>
     </message>
     <message>
         <source>HOM_TOP_EDIT_MESS_FILE</source>
         <translation>Calculer</translation>
     </message>
     <message>
-        <source>HOM_STB_EDIT_CASE</source>
-        <translation>Editer le cas</translation>
-    </message>
-    <message>
-        <source>HOM_STB_EDIT_ITERATION</source>
-        <translation>Editer l&apos;itération</translation>
-    </message>
-    <message>
-        <source>HOM_STB_EDIT_HYPO</source>
-        <translation>Editer l&apos;hypothèse</translation>
-    </message>
-    <message>
-        <source>HOM_STB_EDIT_ZONE</source>
-        <translation>Editer la zone</translation>
+        <source>HOM_STB_EDIT</source>
+        <translation>Editer</translation>
     </message>
     <message>
-        <source>HOM_STB_EDIT_BOUNDARY</source>
-        <translation>Editer la frontière</translation>
+        <source>HOM_STB_DELETE</source>
+        <translation>Supprimer</translation>
     </message>
     <message>
         <source>HOM_STB_EDIT_MESS_FILE</source>
         <source>Percentage of meshes</source>
         <translation>Pourcentage de mailles</translation>
     </message>
+    <message>
+        <source>Mean + n*(std deviation)</source>
+        <translation>Moyenne + n*(ecart-type)</translation>
+    </message>
     <message>
         <source>No refinement</source>
         <translation>Sans raffinement</translation>
     </message>
+    <message>
+        <source>Mean - n*(std deviation)</source>
+        <translation>Moyenne - n*(ecart-type)</translation>
+    </message>
     <message>
         <source>No coarsening</source>
         <translation>Sans déraffinement</translation>
index 1858afed932773fe21c2637e82914ef1303c2ff3..f0168645159df62baff89fd0a32fedab3084f0ba 100644 (file)
@@ -41,21 +41,27 @@ extern "C"
 
 
 // ============================================================================
-QString HOMARD_QT_COMMUN::SelectionArbreEtude(QString commentaire, int grave )
+QString HOMARD_QT_COMMUN::SelectionArbreEtude(QString commentaire, int option )
 // ============================================================================
-// Regarde si l'objet selectionne correspond a un objet de tyoe
-// commentaire. si c'est le cas, retourne le nom de  cet objet,
-// sinon retourne une QString("")
-// Si grave = 0, ce n'est pas grave de ne rien trouver et pas de message
-// Si grave = 1, ce n'est pas grave de ne rien trouver mais on emet un message
+// Retourne l'objet selectionne dans l'arbre d'etudes
+// commentaire :
+// . si le commentaire est une chaine vide, on ne tient pas compte du type de l'objet
+//   et on retourne le nom de cet objet
+// . sinon :
+//   . si l'objet est du type defini par commentaitr, retourne le nom de cet objet
+//   . sinon on retourne une QString("")
+// option :
+// . Si option = 0, ce n'est pas grave de ne rien trouver ; aucun message n'est emis
+// . Si option = 1, ce n'est pas grave de ne rien trouver mais on emet un message
 {
+  MESSAGE("SelectionArbreEtude : commentaire = " << commentaire.toStdString().c_str() << " et option = " << option);
   int nbSel = HOMARD_UTILS::IObjectCount() ;
   if ( nbSel == 0 )
   {
-    if ( grave == 1 )
+    if ( option == 1 )
     {
       QMessageBox::warning( 0, QObject::tr("HOM_WARNING"),
-                                QObject::tr("HOM_SELECT_OBJECT_1") );
+                               QObject::tr("HOM_SELECT_OBJECT_1") );
     }
     return QString("");
   }
@@ -74,14 +80,19 @@ QString HOMARD_QT_COMMUN::SelectionArbreEtude(QString commentaire, int grave )
     _PTR(GenericAttribute) anAttr;
     if (aSO->FindAttribute(anAttr, "AttributeComment") )
     {
-      _PTR(AttributeComment) attributComment = anAttr;
-      QString aComment= QString(attributComment->Value().data());
-      int iteration = aComment.lastIndexOf(commentaire);
-      if ( iteration !=0  )
+      if ( commentaire != "" )
       {
-        QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
-                                  QObject::tr("HOM_SELECT_OBJECT_3").arg(commentaire) );
-        return QString("");
+        _PTR(AttributeComment) attributComment = anAttr;
+        QString aComment= QString(attributComment->Value().data());
+        MESSAGE("... aComment = " << aComment.toStdString().c_str());
+        int iaux = aComment.lastIndexOf(commentaire);
+        MESSAGE("... iaux = " << iaux);
+        if ( iaux !=0  )
+        {
+          QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                    QObject::tr("HOM_SELECT_OBJECT_3").arg(commentaire) );
+          return QString("");
+        }
       }
       if (aSO->FindAttribute(anAttr, "AttributeName") )
       {
@@ -139,7 +150,7 @@ QString HOMARD_QT_COMMUN::PushNomFichier(bool avertir)
 // 2) retourne le nom du fichier asocie a l objet
 //    selectionne dans l arbre d etude
 {
-  MESSAGE("HOMARD_QT_COMMUN::PushNomFichier");
+  MESSAGE("PushNomFichier");
   QString aFile=QString::null;
   int nbSel = HOMARD_UTILS::IObjectCount() ;
   if ( nbSel == 0 )
@@ -276,7 +287,7 @@ std::list<QString> HOMARD_QT_COMMUN::GetListeChamps(QString aFile)
 {
 // Il faut voir si plusieurs maillages
 
-  MESSAGE("HOMARD_QT_COMMUN::GetListeChamps");
+  MESSAGE("GetListeChamps");
   std::list<QString> ListeChamp;
 
   char *comp, *unit;
@@ -373,7 +384,7 @@ std::list<QString> HOMARD_QT_COMMUN::GetListeComposants(QString aFile, QString a
       MEDfileClose(medIdt);
       return ListeComposants;
     }
-    
+
     if ( QString(nomcha) != aChamp ) {
       free(comp);
       free(unit);
index fb3238f44f4ce096c1961b17c8f5133ec5efe3cc..57fa3090b85f5a8a4580ad59a240bdccbcf63255 100644 (file)
@@ -268,7 +268,7 @@ bool MonCreateBoundaryAn:: CreateOrUpdateBoundaryAn()
         break;
       }
     }
-    _parent->addBoundaryAn(_aName);
+    _parent->AddBoundaryAn(_aName);
   }
 // Mise en place des attributs
   aBoundaryAn->SetLimit(_Xincr, _Yincr, _Zincr);
index d969f2100e0abfeeaaf8728edf220b781c40c89d..08d9799a8abdcfbad2b29f0dd9868439fa78533c 100644 (file)
@@ -109,7 +109,7 @@ bool MonCreateBoundaryDi::PushOnApply()
    {
      _aBoundaryName=aBoundaryName;
      _aBoundary=_myHomardGen->CreateBoundaryDi(CORBA::string_dup(_aBoundaryName.toStdString().c_str()), aMeshName.toStdString().c_str(), aMeshFile.toStdString().c_str());
-     _parent->addBoundaryDi(_aBoundaryName);
+     _parent->AddBoundaryDi(_aBoundaryName);
      _aBoundary->SetCaseCreation(_aCaseName.toStdString().c_str());
    }
    catch( SALOME::SALOME_Exception& S_ex )
index eb6f1504509b1b955c3bed507236eec0968b2189..1d9fafc5e6fa01ae33d6b625953f928f11749d8b 100644 (file)
@@ -124,7 +124,7 @@ void MonCreateCase::InitBoundarys()
     myBoundary = _myHomardGen->GetBoundary(mesBoundarys[i]);
     int type_obj = myBoundary->GetType() ;
     if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
-    else               { addBoundaryAn(QString(mesBoundarys[i])); }
+    else               { AddBoundaryAn(QString(mesBoundarys[i])); }
   }
 // Ajustement
   TWBoundary->resizeColumnsToContents();
@@ -395,7 +395,7 @@ void MonCreateCase::SetBoundaryD()
   adjustSize();
 }
 // ------------------------------------------------------------------------
-void MonCreateCase::addBoundaryDi(QString newBoundary)
+void MonCreateCase::AddBoundaryDi(QString newBoundary)
 // ------------------------------------------------------------------------
 {
   CBBoundaryDi->insertItem(0,newBoundary);
@@ -443,10 +443,10 @@ void MonCreateCase::SetBoundaryA()
 //   MESSAGE("Fin de SetBoundaryA ");
 }
 // ------------------------------------------------------------------------
-void MonCreateCase::addBoundaryAn(QString newBoundary)
+void MonCreateCase::AddBoundaryAn(QString newBoundary)
 // ------------------------------------------------------------------------
 {
-  MESSAGE("Debut de addBoundaryAn ");
+  MESSAGE("Debut de AddBoundaryAn ");
 // Ajout d'une nouvelle colonne
   int nbcol = TWBoundary->columnCount();
 //   MESSAGE("nbcol " <<  nbcol);
@@ -468,7 +468,7 @@ void MonCreateCase::addBoundaryAn(QString newBoundary)
   }
   TWBoundary->resizeColumnToContents(nbcol-1);
 //   TWBoundary->resizeRowsToContents();
-//   MESSAGE("Fin de addBoundaryAn ");
+//   MESSAGE("Fin de AddBoundaryAn ");
 }
 // ------------------------------------------------------------------------
 void MonCreateCase::PushBoundaryAnNew()
index 34c66065e759c20c0e05aa14a12dad04dc6e142e..a1bd41890f79bfc5e90e1eff01af30e014db6f9c 100644 (file)
@@ -38,8 +38,8 @@ public:
     MonCreateCase( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen);
     ~MonCreateCase();
 
-    void addBoundaryAn(QString newBoundary);
-    void addBoundaryDi(QString newBoundary);
+    void AddBoundaryAn(QString newBoundary);
+    void AddBoundaryDi(QString newBoundary);
 
 protected :
     QString _aCaseName;
index ec15ee04c87a608b0e95151e75f05c82cb9c6ed6..6f0dc14b24894020f24a567401b4919d11402b94 100644 (file)
@@ -94,10 +94,12 @@ void MonCreateHypothesis::InitConnect()
     connect( CBFieldName,  SIGNAL(activated(int)), this, SLOT( SetFieldName()));
     connect( RBRPE,        SIGNAL(clicked()), this, SLOT(SetRPE()));
     connect( RBRRel,       SIGNAL(clicked()), this, SLOT(SetRRel()));
+    connect( RBRMuSigma,   SIGNAL(clicked()), this, SLOT(SetRMS()));
     connect( RBRAbs,       SIGNAL(clicked()), this, SLOT(SetRAbs()));
     connect( RBRNo,        SIGNAL(clicked()), this, SLOT(SetRNo()));
     connect( RBCPE,        SIGNAL(clicked()), this, SLOT(SetCPE()));
     connect( RBCRel,       SIGNAL(clicked()), this, SLOT(SetCRel()));
+    connect( RBCMuSigma,   SIGNAL(clicked()), this, SLOT(SetCMS()));
     connect( RBCAbs,       SIGNAL(clicked()), this, SLOT(SetCAbs()));
     connect( RBCNo,        SIGNAL(clicked()), this, SLOT(SetCNo()));
     connect( RBL2,         SIGNAL(clicked()), this, SLOT(SetUCL2()));
@@ -541,6 +543,7 @@ void MonCreateHypothesis::SetRPE()
   SpinBox_RPE->setEnabled(true);
   SpinBox_RRel->setEnabled(false);
   SpinBox_RAbs->setEnabled(false);
+  SpinBox_RMuSigma->setEnabled(false);
 }
 // ------------------------------------------------------------------------
 void MonCreateHypothesis::SetRRel()
@@ -552,6 +555,7 @@ void MonCreateHypothesis::SetRRel()
   SpinBox_RPE->setEnabled(false);
   SpinBox_RRel->setEnabled(true);
   SpinBox_RAbs->setEnabled(false);
+  SpinBox_RMuSigma->setEnabled(false);
 }
 // ------------------------------------------------------------------------
 void MonCreateHypothesis::SetRAbs()
@@ -563,6 +567,19 @@ void MonCreateHypothesis::SetRAbs()
   SpinBox_RPE->setEnabled(false);
   SpinBox_RRel->setEnabled(false);
   SpinBox_RAbs->setEnabled(true);
+  SpinBox_RMuSigma->setEnabled(false);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetRMS()
+// ------------------------------------------------------------------------
+{
+  _aTypeRaff = 1 ;
+  _TypeThR = 4 ;
+  RBRMuSigma->setChecked(true);
+  SpinBox_RPE->setEnabled(false);
+  SpinBox_RRel->setEnabled(false);
+  SpinBox_RAbs->setEnabled(false);
+  SpinBox_RMuSigma->setEnabled(true);
 }
 // ------------------------------------------------------------------------
 void MonCreateHypothesis::SetRNo()
@@ -574,6 +591,7 @@ void MonCreateHypothesis::SetRNo()
   SpinBox_RPE->setEnabled(false);
   SpinBox_RRel->setEnabled(false);
   SpinBox_RAbs->setEnabled(false);
+  SpinBox_RMuSigma->setEnabled(false);
 }
 // ------------------------------------------------------------------------
 void MonCreateHypothesis::SetCPE()
@@ -585,6 +603,7 @@ void MonCreateHypothesis::SetCPE()
   SpinBox_CPE->setEnabled(true);
   SpinBox_CRel->setEnabled(false);
   SpinBox_CAbs->setEnabled(false);
+  SpinBox_CMuSigma->setEnabled(false);
 }
 // ------------------------------------------------------------------------
 void MonCreateHypothesis::SetCRel()
@@ -596,6 +615,7 @@ void MonCreateHypothesis::SetCRel()
   SpinBox_CPE->setEnabled(false);
   SpinBox_CRel->setEnabled(true);
   SpinBox_CAbs->setEnabled(false);
+  SpinBox_CMuSigma->setEnabled(false);
 }
 // ------------------------------------------------------------------------
 void MonCreateHypothesis::SetCAbs()
@@ -607,6 +627,19 @@ void MonCreateHypothesis::SetCAbs()
   SpinBox_CPE->setEnabled(false);
   SpinBox_CRel->setEnabled(false);
   SpinBox_CAbs->setEnabled(true);
+  SpinBox_CMuSigma->setEnabled(false);
+}
+// ------------------------------------------------------------------------
+void MonCreateHypothesis::SetCMS()
+// ------------------------------------------------------------------------
+{
+  _aTypeDera = 1 ;
+  _TypeThC = 4 ;
+  RBCMuSigma->setChecked(true);
+  SpinBox_CPE->setEnabled(false);
+  SpinBox_CRel->setEnabled(false);
+  SpinBox_CAbs->setEnabled(false);
+  SpinBox_CMuSigma->setEnabled(true);
 }
 // ------------------------------------------------------------------------
 void MonCreateHypothesis::SetCNo()
@@ -618,6 +651,7 @@ void MonCreateHypothesis::SetCNo()
   SpinBox_CPE->setEnabled(false);
   SpinBox_CRel->setEnabled(false);
   SpinBox_CAbs->setEnabled(false);
+  SpinBox_CMuSigma->setEnabled(false);
 }
 // ------------------------------------------------------------------------
 void MonCreateHypothesis::SetUCL2()
@@ -717,11 +751,13 @@ void MonCreateHypothesis::AssocieComposants()
   if ( _TypeThR == 1 ) { _ThreshR = SpinBox_RAbs->value();}
   if ( _TypeThR == 2 ) { _ThreshR = SpinBox_RRel->value();}
   if ( _TypeThR == 3 ) { _ThreshR = SpinBox_RPE->value(); }
+  if ( _TypeThR == 4 ) { _ThreshR = SpinBox_RMuSigma->value(); }
 
   _ThreshC = 0;
   if ( _TypeThC == 1 ) { _ThreshC = SpinBox_CAbs->value();}
   if ( _TypeThC == 2 ) { _ThreshC = SpinBox_CRel->value();}
   if ( _TypeThC == 3 ) { _ThreshC = SpinBox_CPE->value(); }
+  if ( _TypeThC == 4 ) { _ThreshC = SpinBox_CMuSigma->value(); }
 
   _aFieldName=CBFieldName->currentText();
   _aHypothesis->SetField(CORBA::string_dup(_aFieldName.toStdString().c_str()) ) ;
index 0680a69c03475a1301d15e1bbba755426ccfd89d..5adbc021b32311529f87bd8d39be0cf5601602d5 100644 (file)
@@ -106,10 +106,12 @@ public slots:
     virtual void SetRPE();
     virtual void SetRAbs();
     virtual void SetRRel();
+    virtual void SetRMS();
     virtual void SetRNo();
     virtual void SetCPE();
     virtual void SetCAbs();
     virtual void SetCRel();
+    virtual void SetCMS();
     virtual void SetCNo();
     virtual void SetUCL2();
     virtual void SetUCInf();
index dddba45df8f9d966925a1805dc6feae91d8eca9a..93161c549b7b6db1d249f007e938e3c068e43fd5 100644 (file)
@@ -150,7 +150,7 @@ void MonEditCase::InitValEdit()
         {
           ListeFron.append(NomFron);
           ok = ListeFron.size() ;
-          addBoundaryAn(NomFron);
+          AddBoundaryAn(NomFron);
         }
 //          on coche la case correspondant au couple (frontiere,groupe) en cours d'examen
         TWBoundary->item( 0, ok )->setCheckState( Qt::Checked );
index 0192379f8744632adba5dfb1116d756938468ba9..fe0c1fa2159f403af85307112ee73c98a3aa802b 100644 (file)
@@ -285,6 +285,7 @@ void MonEditHypothesis::InitAdaptChamps()
   RBRAbs->setEnabled(false) ;
   RBRRel->setEnabled(false) ;
   RBRPE->setEnabled(false) ;
+  RBRMuSigma->setEnabled(false) ;
   RBRNo->setEnabled(false) ;
   if (_aTypeRaff== 0 )
   {
@@ -296,12 +297,14 @@ void MonEditHypothesis::InitAdaptChamps()
     if ( _TypeThR == 1 ) { SpinBox_RAbs->setValue(_ThreshR); SetRAbs(); RBRAbs->setEnabled(true);}
     if ( _TypeThR == 2 ) { SpinBox_RRel->setValue(_ThreshR); SetRRel(); RBRRel->setEnabled(true);}
     if ( _TypeThR == 3 ) { SpinBox_RPE->setValue(_ThreshR);  SetRPE();  RBRPE->setEnabled(true);}
+    if ( _TypeThR == 4 ) { SpinBox_RMuSigma->setValue(_ThreshR);  SetRMS();  RBRMuSigma->setEnabled(true);}
   }
 
   // Les seuils de deraffinement
   RBCAbs->setEnabled(false) ;
   RBCRel->setEnabled(false) ;
   RBCPE->setEnabled(false) ;
+  RBCMuSigma->setEnabled(false) ;
   RBCNo->setEnabled(false) ;
   if (_aTypeDera== 0 )
   {
@@ -313,6 +316,7 @@ void MonEditHypothesis::InitAdaptChamps()
     if ( _TypeThC == 1 ) { SpinBox_CAbs->setValue(_ThreshC); SetCAbs(); RBCAbs->setEnabled(true);}
     if ( _TypeThC == 2 ) { SpinBox_CRel->setValue(_ThreshC); SetCRel(); RBCRel->setEnabled(true);}
     if ( _TypeThC == 3 ) { SpinBox_CPE->setValue(_ThreshC);  SetCPE(); RBCPE->setEnabled(true);}
+    if ( _TypeThC == 4 ) { SpinBox_CMuSigma->setValue(_ThreshC);  SetCMS();  RBCMuSigma->setEnabled(true);}
   }
   // Le choix de la prise en compte des composantes
   if ( TWCMP->rowCount() == 1 )
@@ -405,6 +409,7 @@ bool MonEditHypothesis::PushOnApply()
       if (_TypeThR == 1) { _ThreshR = SpinBox_RAbs->value(); }
       if (_TypeThR == 2) { _ThreshR = SpinBox_RRel->value(); }
       if (_TypeThR == 3) { _ThreshR = SpinBox_RPE->value();  }
+      if (_TypeThR == 4) { _ThreshR = SpinBox_RMuSigma->value();  }
       _aHypothesis->SetRefinThr(_TypeThR, _ThreshR) ;
     }
     if (_aTypeDera!= 0 )
@@ -412,6 +417,7 @@ bool MonEditHypothesis::PushOnApply()
       if (_TypeThC == 1) { _ThreshC = SpinBox_CAbs->value() ; }
       if (_TypeThC == 2) { _ThreshC = SpinBox_CRel->value() ; }
       if (_TypeThC == 3) { _ThreshC = SpinBox_CPE->value() ; }
+      if (_TypeThC == 4) { _ThreshC = SpinBox_CMuSigma->value() ; }
       _aHypothesis->SetUnRefThr(_TypeThC, _ThreshC) ;
     }
 
index e57b7e79074f07d8aa069884ef055af1a92b72ba..d10e2adeea2a637ca99626d4c7427943b520973e 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 #include "HOMARD_Boundary_i.hxx"
 #include "HOMARD_Gen_i.hxx"
 #include "HOMARD_Boundary.hxx"
@@ -58,75 +66,88 @@ HOMARD_Boundary_i::HOMARD_Boundary_i( CORBA::ORB_ptr orb,
 HOMARD_Boundary_i::~HOMARD_Boundary_i()
 {
 }
-
 //=============================================================================
-/*!
- */
+//=============================================================================
+// Generalites
+//=============================================================================
 //=============================================================================
 void HOMARD_Boundary_i::SetName( const char* Name )
 {
   ASSERT( myHomardBoundary );
   myHomardBoundary->SetName( Name );
 }
-
 //=============================================================================
 char* HOMARD_Boundary_i::GetName()
 {
   ASSERT( myHomardBoundary );
   return CORBA::string_dup( myHomardBoundary->GetName().c_str() );
 }
-
+//=============================================================================
+CORBA::Long  HOMARD_Boundary_i::Delete()
+{
+  ASSERT( myHomardBoundary );
+  char* BoundaryName = GetName() ;
+  MESSAGE ( "Delete : destruction de la frontiere " << BoundaryName );
+  return _gen_i->DeleteBoundary(BoundaryName) ;
+}
 //=============================================================================
 char* HOMARD_Boundary_i::GetDumpPython()
 {
   ASSERT( myHomardBoundary );
   return CORBA::string_dup( myHomardBoundary->GetDumpPython().c_str() );
 }
+//=============================================================================
+std::string HOMARD_Boundary_i::Dump() const
+{
+  return HOMARD::Dump( *myHomardBoundary );
+}
 
-
+//=============================================================================
+bool HOMARD_Boundary_i::Restore( const std::string& stream )
+{
+  return HOMARD::Restore( *myHomardBoundary, stream );
+}
+//=============================================================================
+//=============================================================================
+// Caracteristiques
+//=============================================================================
 //=============================================================================
 void HOMARD_Boundary_i::SetType( CORBA::Long Type )
 {
   ASSERT( myHomardBoundary );
   myHomardBoundary->SetType( Type );
 }
-
 //=============================================================================
 CORBA::Long HOMARD_Boundary_i::GetType()
 {
   ASSERT( myHomardBoundary );
   return  CORBA::Long( myHomardBoundary->GetType() );
 }
-
 //=============================================================================
-void HOMARD_Boundary_i::SetMeshFile( const char* MeshFile )
+void HOMARD_Boundary_i::SetMeshName( const char* MeshName )
 {
   ASSERT( myHomardBoundary );
-  myHomardBoundary->SetMeshFile( MeshFile );
-  _gen_i->PublishResultInSmesh(MeshFile, 0);
+  myHomardBoundary->SetMeshName( MeshName );
 }
 //=============================================================================
-char* HOMARD_Boundary_i::GetMeshFile()
+char* HOMARD_Boundary_i::GetMeshName()
 {
   ASSERT( myHomardBoundary );
-  return CORBA::string_dup( myHomardBoundary->GetMeshFile().c_str() );
+  return CORBA::string_dup( myHomardBoundary->GetMeshName().c_str() );
 }
-
 //=============================================================================
-void HOMARD_Boundary_i::SetMeshName( const char* MeshName )
+void HOMARD_Boundary_i::SetMeshFile( const char* MeshFile )
 {
   ASSERT( myHomardBoundary );
-  myHomardBoundary->SetMeshName( MeshName );
+  myHomardBoundary->SetMeshFile( MeshFile );
+  _gen_i->PublishResultInSmesh(MeshFile, 0);
 }
-
 //=============================================================================
-char* HOMARD_Boundary_i::GetMeshName()
+char* HOMARD_Boundary_i::GetMeshFile()
 {
   ASSERT( myHomardBoundary );
-  return CORBA::string_dup( myHomardBoundary->GetMeshName().c_str() );
+  return CORBA::string_dup( myHomardBoundary->GetMeshFile().c_str() );
 }
-
-
 //=============================================================================
 void HOMARD_Boundary_i::SetCylinder( double X0, double X1, double X2, double X3, double X4, double X5, double X6 )
 {
@@ -139,7 +160,6 @@ void HOMARD_Boundary_i::SetSphere( double Xcentre, double Ycentre, double ZCentr
   ASSERT( myHomardBoundary );
   myHomardBoundary->SetSphere( Xcentre, Ycentre, ZCentre, rayon );
 }
-
 //=============================================================================
 HOMARD::double_array* HOMARD_Boundary_i::GetCoords()
 {
@@ -153,14 +173,12 @@ HOMARD::double_array* HOMARD_Boundary_i::GetCoords()
     aResult[i++] = (*it);
   return aResult._retn();
 }
-
 //=============================================================================
 void HOMARD_Boundary_i::SetLimit( double Xincr, double Yincr, double Zincr )
 {
   ASSERT( myHomardBoundary );
   myHomardBoundary->SetLimit( Xincr, Yincr, Zincr );
 }
-
 //=============================================================================
 HOMARD::double_array* HOMARD_Boundary_i::GetLimit()
 {
@@ -175,22 +193,6 @@ HOMARD::double_array* HOMARD_Boundary_i::GetLimit()
   return aResult._retn();
 }
 //=============================================================================
-/*!
- */
-//=============================================================================
-void HOMARD_Boundary_i::SetCaseCreation( const char* NomCaseCreation )
-{
-  ASSERT( myHomardBoundary );
-  myHomardBoundary->SetCaseCreation( NomCaseCreation );
-}
-
-//=============================================================================
-char* HOMARD_Boundary_i::GetCaseCreation()
-{
-  ASSERT( myHomardBoundary );
-  return CORBA::string_dup( myHomardBoundary->GetCaseCreation().c_str() );
-}
-//=============================================================================
 void HOMARD_Boundary_i::AddGroup( const char* Group)
 {
   ASSERT( myHomardBoundary );
@@ -222,17 +224,22 @@ HOMARD::ListGroupType*  HOMARD_Boundary_i::GetGroups()
   }
   return aResult._retn();
 }
-
-
-
 //=============================================================================
-std::string HOMARD_Boundary_i::Dump() const
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
+//=============================================================================
+void HOMARD_Boundary_i::SetCaseCreation( const char* NomCaseCreation )
 {
-  return HOMARD::Dump( *myHomardBoundary );
+  ASSERT( myHomardBoundary );
+  myHomardBoundary->SetCaseCreation( NomCaseCreation );
 }
-
 //=============================================================================
-bool HOMARD_Boundary_i::Restore( const std::string& stream )
+char* HOMARD_Boundary_i::GetCaseCreation()
 {
-  return HOMARD::Restore( *myHomardBoundary, stream );
+  ASSERT( myHomardBoundary );
+  return CORBA::string_dup( myHomardBoundary->GetCaseCreation().c_str() );
 }
+
+
+
index 6c6caf81333a14bb6d8045cab7aec855076a8327..4752c866a811bae56a8214660a65dfeeff8ad304 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_Boundary_I_HXX_
 #define _HOMARD_Boundary_I_HXX_
@@ -43,41 +52,46 @@ public:
 
   virtual ~HOMARD_Boundary_i();
 
+// Generalites
   void                   SetName( const char* Name );
   char*                  GetName();
+
+  CORBA::Long            Delete();
+
   char*                  GetDumpPython();
 
-  void                   SetType( CORBA::Long Type );
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
 
+// Caracteristiques
+  void                   SetType( CORBA::Long Type );
   CORBA::Long            GetType();
 
-  void                   SetMeshFile( const char* MeshFile );
-  char*                  GetMeshFile();
-
   void                   SetMeshName( const char* MeshName );
   char*                  GetMeshName();
 
+  void                   SetMeshFile( const char* MeshFile );
+  char*                  GetMeshFile();
+
   void                   SetCylinder( double Xcentre, double Ycentre, double ZCentre,
                                       double Xaxe, double Yaxe, double Zaxe,
                                       double rayon );
   void                   SetSphere( double Xcentre, double Ycentre, double ZCentre,
                                     double rayon );
+
   HOMARD::double_array*  GetCoords();
 
-  HOMARD::double_array*  GetLimit();
   void                   SetLimit( double Xincr, double Yincr, double Zincr);
+  HOMARD::double_array*  GetLimit();
 
+  void                   AddGroup( const char* Group);
+  void                   SetGroups(const HOMARD::ListGroupType& ListGroup);
+  HOMARD::ListGroupType* GetGroups();
 
-  std::string            Dump() const;
-  bool                   Restore( const std::string& stream );
-
+// Liens avec les autres structures
   void                   SetCaseCreation( const char* NomCaseCreation );
   char*                  GetCaseCreation();
 
-  void                    AddGroup( const char* Group);
-  void                    SetGroups(const HOMARD::ListGroupType& ListGroup);
-  HOMARD::ListGroupType*  GetGroups();
-
 
 private:
   ::HOMARD_Boundary*     myHomardBoundary;
index d95893f9f1881fc62fa89bf69d2e711af0c02725..8e456ec36919fc497a87ba4a5e79c8ff896ea23f 100755 (executable)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #include "HOMARD_Cas_i.hxx"
 #include "HOMARD_Gen_i.hxx"
@@ -59,108 +68,93 @@ HOMARD_Cas_i::HOMARD_Cas_i( CORBA::ORB_ptr orb,
 HOMARD_Cas_i::~HOMARD_Cas_i()
 {
 }
-
 //=============================================================================
-/*!
- */
 //=============================================================================
-void HOMARD_Cas_i::SetDirName( const char* NomDir )
-{
-  ASSERT( myHomardCas );
-  myHomardCas->SetDirName( NomDir );
-}
-
+// Generalites
 //=============================================================================
-/*!
- */
 //=============================================================================
 void HOMARD_Cas_i::SetName( const char* Name )
 {
   ASSERT( myHomardCas );
   myHomardCas->SetName( Name );
 }
-
-//=============================================================================
-/*!
- */
 //=============================================================================
 char* HOMARD_Cas_i::GetName()
 {
   ASSERT( myHomardCas );
   return CORBA::string_dup( myHomardCas->GetName().c_str() );
 }
-
 //=============================================================================
-/*!
- */
+CORBA::Long  HOMARD_Cas_i::Delete()
+{
+  ASSERT( myHomardCas );
+  char* CaseName = GetName() ;
+  MESSAGE ( "Delete : destruction du cas " << CaseName );
+  return _gen_i->DeleteCase(CaseName) ;
+}
 //=============================================================================
 char* HOMARD_Cas_i::GetDumpPython()
 {
   ASSERT( myHomardCas );
   return CORBA::string_dup( myHomardCas->GetDumpPython().c_str() );
 }
-
 //=============================================================================
-char* HOMARD_Cas_i::GetDirName()
+std::string HOMARD_Cas_i::Dump() const
 {
-  ASSERT( myHomardCas );
-  return CORBA::string_dup( myHomardCas->GetDirName().c_str() );
+  return HOMARD::Dump( *myHomardCas );
 }
-
 //=============================================================================
-void HOMARD_Cas_i::SetConfType( CORBA::Long ConfType )
+bool HOMARD_Cas_i::Restore( const std::string& stream )
 {
-  ASSERT( myHomardCas );
-  myHomardCas->SetConfType( ConfType );
+  return HOMARD::Restore( *myHomardCas, stream );
 }
 //=============================================================================
-CORBA::Long HOMARD_Cas_i::GetNumber()
+//=============================================================================
+// Caracteristiques
+//=============================================================================
+//=============================================================================
+void HOMARD_Cas_i::SetDirName( const char* NomDir )
 {
   ASSERT( myHomardCas );
-  return myHomardCas->GetNumber();
+  myHomardCas->SetDirName( NomDir );
 }
-
 //=============================================================================
-CORBA::Long HOMARD_Cas_i::GetConfType()
+char* HOMARD_Cas_i::GetDirName()
 {
   ASSERT( myHomardCas );
-  return myHomardCas->GetConfType();
+  return CORBA::string_dup( myHomardCas->GetDirName().c_str() );
 }
-
 //=============================================================================
-char* HOMARD_Cas_i::GetIter0Name()
+CORBA::Long HOMARD_Cas_i::GetNumber()
 {
   ASSERT( myHomardCas );
-  return CORBA::string_dup( myHomardCas->GetIter0Name().c_str() );
+  return myHomardCas->GetNumber();
 }
 //=============================================================================
-HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::GetIter0()
+void HOMARD_Cas_i::SetConfType( CORBA::Long ConfType )
 {
-// Nom de l'iteration parent
-  char* Iter0Name = GetIter0Name() ;
-  MESSAGE ( "GetIter0 : Iter0Name      = " << Iter0Name );
-// On passe par la methode sur l'objet HOMARD
-// Il serait plus elegant de tout faire ici, mais il est complexe de passer tout le contexte
-  return _gen_i->GetIteration(Iter0Name) ;
+  ASSERT( myHomardCas );
+  myHomardCas->SetConfType( ConfType );
 }
-
 //=============================================================================
-HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::NextIteration( const char* IterName )
+CORBA::Long HOMARD_Cas_i::GetConfType()
 {
-// Nom de l'iteration parent
-  char* NomIterParent = GetIter0Name() ;
-  MESSAGE ( "NextIteration : IterName      = " << IterName );
-  MESSAGE ( "NextIteration : NomIterParent = " << NomIterParent );
-// On passe par la methode sur l'objet HOMARD
-// Il serait plus elegant de tout faire ici, mais il est complexe de passer tout le contexte
-  return _gen_i->CreateIteration(IterName, NomIterParent) ;
+  ASSERT( myHomardCas );
+  return myHomardCas->GetConfType();
 }
-
 //=============================================================================
-void HOMARD_Cas_i::AddIteration( const char* NomIteration )
+void HOMARD_Cas_i::SetBoundingBox( const HOMARD::extrema& LesExtrema )
 {
   ASSERT( myHomardCas );
-  myHomardCas->AddIteration( NomIteration );
+  std::vector<double> VExtrema;
+  ASSERT( LesExtrema.length() == 10 );
+  VExtrema.resize( LesExtrema.length() );
+  for ( int i = 0; i < LesExtrema.length(); i++ )
+  {
+    VExtrema[i] = LesExtrema[i];
+  }
+
+  myHomardCas->SetBoundingBox( VExtrema );
 }
 //=============================================================================
 HOMARD::extrema* HOMARD_Cas_i::GetBoundingBox()
@@ -177,20 +171,6 @@ HOMARD::extrema* HOMARD_Cas_i::GetBoundingBox()
   return aResult._retn();
 }
 //=============================================================================
-void HOMARD_Cas_i::SetBoundingBox( const HOMARD::extrema& LesExtrema )
-{
-  ASSERT( myHomardCas );
-  std::vector<double> VExtrema;
-  ASSERT( LesExtrema.length() == 10 );
-  VExtrema.resize( LesExtrema.length() );
-  for ( int i = 0; i < LesExtrema.length(); i++ )
-  {
-    VExtrema[i] = LesExtrema[i];
-  }
-
-  myHomardCas->SetBoundingBox( VExtrema );
-}
-//=============================================================================
 void HOMARD_Cas_i::AddGroup( const char* Group)
 {
   ASSERT( myHomardCas );
@@ -223,31 +203,47 @@ HOMARD::ListGroupType* HOMARD_Cas_i::GetGroups()
   }
   return aResult._retn();
 }
-
 //=============================================================================
-void HOMARD_Cas_i::AddBoundaryGroup( const char* Boundary, const char* Group)
+void HOMARD_Cas_i::AddBoundaryGroup( const char* BoundaryName, const char* Group)
 {
-  MESSAGE ("AddBoundaryGroup");
+  MESSAGE ("AddBoundaryGroup : BoundaryName = "<< BoundaryName << ", Group = " << Group );
   ASSERT( myHomardCas );
-  myHomardCas->AddBoundaryGroup( Boundary, Group );
+  // La frontiere est-elle deja enregistree pour ce cas ?
+  const std::list<std::string>& ListBoundaryGroup = myHomardCas->GetBoundaryGroup();
+  std::list<std::string>::const_iterator it;
+  int existe = 0;
+  for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+  {
+    if ( *it == BoundaryName )
+    { existe = 1 ; }
+    it++ ;
+  }
+  // Enregistrement de la frontiere dans la reference du cas
+  myHomardCas->AddBoundaryGroup( BoundaryName, Group );
+  // Pour une nouvelle frontiere, publication dans l'arbre d'etudes sous le cas
+  if ( existe == 0 )
+  {
+    char* CaseName = GetName() ;
+    MESSAGE ( "AddBoundaryGroup : insertion de la frontiere dans l'arbre de " << CaseName );
+    _gen_i->PublishBoundaryUnderCase(CaseName, BoundaryName) ;
+  }
 }
 //=============================================================================
 HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup()
 {
   MESSAGE ("GetBoundaryGroup");
   ASSERT(myHomardCas );
-  const std::list<std::string>& ListString = myHomardCas->GetBoundaryGroup();
+  const std::list<std::string>& ListBoundaryGroup = myHomardCas->GetBoundaryGroup();
   HOMARD::ListBoundaryGroupType_var aResult = new HOMARD::ListBoundaryGroupType();
-  aResult->length( ListString.size() );
+  aResult->length( ListBoundaryGroup.size() );
   std::list<std::string>::const_iterator it;
   int i = 0;
-  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
   {
     aResult[i++] = CORBA::string_dup( (*it).c_str() );
   }
   return aResult._retn();
 }
-
 //=============================================================================
 void HOMARD_Cas_i::SetPyram( CORBA::Long Pyram )
 {
@@ -263,13 +259,64 @@ CORBA::Long HOMARD_Cas_i::GetPyram()
   return myHomardCas->GetPyram();
 }
 //=============================================================================
-std::string HOMARD_Cas_i::Dump() const
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
+//=============================================================================
+char* HOMARD_Cas_i::GetIter0Name()
 {
-  return HOMARD::Dump( *myHomardCas );
+  ASSERT( myHomardCas );
+  return CORBA::string_dup( myHomardCas->GetIter0Name().c_str() );
 }
-
 //=============================================================================
-bool HOMARD_Cas_i::Restore( const std::string& stream )
+HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::GetIter0()
 {
-  return HOMARD::Restore( *myHomardCas, stream );
+// Nom de l'iteration parent
+  char* Iter0Name = GetIter0Name() ;
+  MESSAGE ( "GetIter0 : Iter0Name      = " << Iter0Name );
+  return _gen_i->GetIteration(Iter0Name) ;
+}
+//=============================================================================
+HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::NextIteration( const char* IterName )
+{
+// Nom de l'iteration parent
+  char* NomIterParent = GetIter0Name() ;
+  MESSAGE ( "NextIteration : IterName      = " << IterName );
+  MESSAGE ( "NextIteration : NomIterParent = " << NomIterParent );
+  return _gen_i->CreateIteration(IterName, NomIterParent) ;
+}
+//=============================================================================
+HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::LastIteration( )
+{
+  HOMARD::HOMARD_Iteration_ptr Iter ;
+  HOMARD::listeIterFilles_var ListeIterFilles ;
+  char* IterName ;
+// Iteration initiale du cas
+  IterName = GetIter0Name() ;
+// On va explorer la descendance de cette iteration initiale
+// jusqu'a trouver celle qui n'a pas de filles
+  int nbiterfilles = 1 ;
+  while ( nbiterfilles == 1 )
+  {
+// L'iteration associee
+//     MESSAGE ( ".. IterName = " << IterName );
+    Iter = _gen_i->GetIteration(IterName) ;
+// Les filles de cette iteration
+    ListeIterFilles = Iter->GetIterations() ;
+    nbiterfilles = ListeIterFilles->length() ;
+//     MESSAGE ( ".. nbiterfilles = " << nbiterfilles );
+// S'il y a au moins 2 filles, arret : on ne sait pas faire
+    ASSERT( nbiterfilles <= 1 ) ;
+// S'il y a une fille unique, on recupere le nom de la fille et on recommence
+    if ( nbiterfilles == 1 )
+    { IterName = ListeIterFilles[0] ; }
+  }
+//
+  return Iter ;
+}
+//=============================================================================
+void HOMARD_Cas_i::AddIteration( const char* NomIteration )
+{
+  ASSERT( myHomardCas );
+  myHomardCas->AddIteration( NomIteration );
 }
index 8e37f6e4a7fd60866b4a59365fb869901b69e887..740e2eef6b2fb8e87c48ecaaa59ebf001caee35c 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_CAS_I_HXX_
 #define _HOMARD_CAS_I_HXX_
@@ -43,40 +52,48 @@ public:
 
   virtual ~HOMARD_Cas_i();
 
-  void                   SetDirName( const char* NomDir );
-  char*                  GetDirName();
-
+// Generalites
   void                   SetName( const char* Name );
   char*                  GetName();
 
-  void                   SetConfType( CORBA::Long ConfType );
-  CORBA::Long            GetConfType();
+  CORBA::Long            Delete();
 
-  char*                  GetIter0Name();
-  HOMARD::HOMARD_Iteration_ptr GetIter0() ;
+  char*                  GetDumpPython();
 
-  HOMARD::HOMARD_Iteration_ptr  NextIteration( const char* Name) ;
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
 
-  void                   AddIteration( const char* NomIteration );
+// Caracteristiques
+  void                   SetDirName( const char* NomDir );
+  char*                  GetDirName();
+
+  CORBA::Long            GetNumber();
+
+  void                   SetConfType( CORBA::Long ConfType );
+  CORBA::Long            GetConfType();
 
-  HOMARD::extrema*       GetBoundingBox();
   void                   SetBoundingBox( const HOMARD::extrema& LesExtremes );
+  HOMARD::extrema*       GetBoundingBox();
 
-  HOMARD::ListGroupType* GetGroups();
   void                   AddGroup( const char* Group);
   void                   SetGroups(const HOMARD::ListGroupType& ListGroup);
+  HOMARD::ListGroupType* GetGroups();
 
-  HOMARD::ListBoundaryGroupType*  GetBoundaryGroup();
   void                   AddBoundaryGroup( const char* Boundary, const char* Group);
+  HOMARD::ListBoundaryGroupType*  GetBoundaryGroup();
 
   void                   SetPyram( CORBA::Long Pyram );
   CORBA::Long            GetPyram();
 
-  std::string            Dump() const;
-  bool                   Restore( const std::string& stream );
+// Liens avec les autres structures
+  char*                  GetIter0Name();
+  HOMARD::HOMARD_Iteration_ptr GetIter0() ;
 
-  char *                GetDumpPython();
-  CORBA::Long            GetNumber();
+  HOMARD::HOMARD_Iteration_ptr  NextIteration( const char* Name ) ;
+
+  HOMARD::HOMARD_Iteration_ptr  LastIteration() ;
+
+  void                   AddIteration( const char* NomIteration );
 
 private:
   ::HOMARD_Cas*          myHomardCas;
index df0e1679d024fa36d9745c152077a12b0074d86c..9b53284b9ce92c10fd90fc950dced2ba0595124b 100755 (executable)
 #include <vector>
 #include <stdio.h>
 
-
 using  namespace std;
 
-//=======================================================================
-//function : RemoveTabulation
-//purpose  :
-//=======================================================================
+//=============================================================================
+//functions
+//=============================================================================
 std::string RemoveTabulation( std::string theScript )
 {
   std::string::size_type aPos = 0;
@@ -69,7 +67,6 @@ std::string RemoveTabulation( std::string theScript )
   }
   return theScript;
 }
-
 //=============================================================================
 /*!
  *  standard constructor
@@ -91,7 +88,6 @@ Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
   ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting());
   _NS->init_orb(_orb);
 }
-
 //=================================
 /*!
  *  standard destructor
@@ -101,9 +97,9 @@ HOMARD_Gen_i::~HOMARD_Gen_i()
 {
 }
 //=============================================================================
-/*!
- *  Ajoute le composant homard dans l etude si necessaire
- */
+//=============================================================================
+// Utilitaires pour l'étude
+//=============================================================================
 //=============================================================================
 void HOMARD_Gen_i::addInStudy(SALOMEDS::Study_ptr theStudy)
 {
@@ -142,12 +138,6 @@ void HOMARD_Gen_i::addInStudy(SALOMEDS::Study_ptr theStudy)
     myBuilder->CommitCommand();
   }
 }
-
-//=============================================================================
-/*!
- *
- *  Set current study
- */
 //=============================================================================
 void HOMARD_Gen_i::SetCurrentStudy(SALOMEDS::Study_ptr theStudy)
 {
@@ -155,7 +145,6 @@ void HOMARD_Gen_i::SetCurrentStudy(SALOMEDS::Study_ptr theStudy)
   myCurrentStudy = SALOMEDS::Study::_duplicate(theStudy);
   this->addInStudy(myCurrentStudy);
 }
-
 //=============================================================================
 SALOMEDS::Study_ptr HOMARD_Gen_i::GetCurrentStudy()
 //=============================================================================
@@ -163,66 +152,24 @@ SALOMEDS::Study_ptr HOMARD_Gen_i::GetCurrentStudy()
   MESSAGE("GetCurrentStudy: study Id = " << GetCurrentStudyID());
   return SALOMEDS::Study::_duplicate(myCurrentStudy);
 }
-
 //=============================================================================
 CORBA::Long HOMARD_Gen_i::GetCurrentStudyID()
 //=============================================================================
 {
   return myCurrentStudy->_is_nil() ? -1 : myCurrentStudy->StudyId();
 }
-
 //=============================================================================
-void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, const char* labelIter)
-{
-  MESSAGE( "AssociateCaseIter : " << nomCas << " ," << nomIter << ","  << labelIter );
-  IsValidStudy () ;
-
-  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 ;
-  };
-
-  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 Case ";
-      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 ;
-  };
-
-  aStudyBuilder->NewCommand();
-  SALOMEDS::SObject_var newStudyIter = aStudyBuilder->NewObject(aCasSO);
-  PublishInStudyAttr(aStudyBuilder, newStudyIter, nomIter , labelIter,
-                     "iter_non_calculee.png", _orb->object_to_string(myIteration)) ;
-  aStudyBuilder->CommitCommand();
-
-  myCase->AddIteration(nomIter);
-  myIteration->SetCaseName(nomCas);
-}
+//=============================================================================
 
-//=====================================================================================
+//=============================================================================
+//=============================================================================
+// Utilitaires pour l'iteration
+//=============================================================================
+//=============================================================================
 void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Boolean EtatCalcul)
 //=====================================================================================
 {
-  MESSAGE( "SetEtatIter : nomIter  = " << nomIter << " etat " << EtatCalcul );
+  MESSAGE( "SetEtatIter : affectation de l etat " << EtatCalcul << " a l iteration " << nomIter );
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
   if (CORBA::is_nil(myIteration))
   {
@@ -237,14 +184,6 @@ void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Boolean EtatCal
 
   SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
   SALOMEDS::SObject_var aIterSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
-  if (CORBA::is_nil(myIteration))
-  {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid Iteration ";
-      throw SALOME::SALOME_Exception(es);
-      return ;
-  };
 
   int number = myIteration->GetNumber() ;
   const char* icone ;
@@ -259,38 +198,310 @@ void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Boolean EtatCal
   aStudyBuilder->CommitCommand();
 
 }
-//=====================================================================================
-void HOMARD_Gen_i::InvalideBoundary(const char* BoundaryName)
-//=====================================================================================
+//=============================================================================
+//=============================================================================
+//
+//=============================================================================
+//=============================================================================
+// Destruction des structures identifiees par leurs noms
+//=============================================================================
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::DeleteBoundary(const char* BoundaryName)
 {
-  MESSAGE( "InvalideBoundary : BoundaryName    = " << BoundaryName  );
+  MESSAGE ( "DeleteBoundary : BoundaryName = " << BoundaryName );
   HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName];
   if (CORBA::is_nil(myBoundary))
   {
+//     const char* message = "Invalid Boundary " ;
+//     SALOMEException(message) ;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid Boundary ";
+    throw SALOME::SALOME_Exception(es);
+    return 1 ;
+  };
+
+// On verifie que la frontiere n'est plus utilisee
+  HOMARD::listeCases* maListe = GetAllCasesName();
+  int numberOfCases = maListe->length();
+  MESSAGE ( ".. Nombre de cas = " << numberOfCases );
+  std::string CaseName ;
+  HOMARD::ListBoundaryGroupType* ListBoundaryGroupType ;
+  int numberOfitems ;
+  HOMARD::HOMARD_Cas_var myCase ;
+  for (int NumeCas = 0; NumeCas< numberOfCases; NumeCas++)
+  {
+    CaseName = std::string((*maListe)[NumeCas]);
+    MESSAGE ( "... Examen du cas = " << CaseName.c_str() );
+    myCase = myContextMap[GetCurrentStudyID()]._mesCas[CaseName];
+    ASSERT(!CORBA::is_nil(myCase));
+    ListBoundaryGroupType = myCase->GetBoundaryGroup();
+    numberOfitems = ListBoundaryGroupType->length();
+    MESSAGE ( "... number of string for Boundary+Group = " << numberOfitems);
+    for (int NumBoundary = 0; NumBoundary< numberOfitems; NumBoundary=NumBoundary+2)
+    {
+      if ( std::string((*ListBoundaryGroupType)[NumBoundary]) == BoundaryName )
+      {
+        SALOME::ExceptionStruct es;
+        es.type = SALOME::BAD_PARAM;
+        es.text = "This boundary is used in a case and cannot be deleted.";
+        throw SALOME::SALOME_Exception(es);
+        return 2 ;
+      };
+    };
+  }
+
+  // comme on a un _var comme pointeur CORBA, on ne se preoccupe pas du delete
+  myContextMap[GetCurrentStudyID()]._mesBoundarys.erase(BoundaryName);
+  SALOMEDS::Study::ListOfSObject_var listSO = myCurrentStudy->FindObjectByName(BoundaryName, ComponentDataType());
+  SALOMEDS::SObject_var aSO =listSO[0];
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  myCurrentStudy->NewBuilder()->RemoveObjectWithChildren(aSO);
+
+  return 0 ;
+}
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::DeleteCase(const char* nomCas)
+{
+  // Pour detruire un cas
+  MESSAGE ( "DeleteCase : nomCas = " << nomCas );
+  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 1;
+  };
+  // On commence par detruire toutes les iterations en partant de l'initiale et y compris elle
+  CORBA::String_var nomIter = myCase->GetIter0Name();
+  CORBA::Long Option = 0 ;
+  if ( DeleteIterationOption(nomIter, Option) != 0 )
+  {
+    return 2;
+  };
+
+  // comme on a un _var comme pointeur CORBA, on ne se preoccupe pas du delete
+  myContextMap[GetCurrentStudyID()]._mesCas.erase(nomCas);
+  SALOMEDS::Study::ListOfSObject_var listSO = myCurrentStudy->FindObjectByName(nomCas, ComponentDataType());
+  SALOMEDS::SObject_var aSO =listSO[0];
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  myCurrentStudy->NewBuilder()->RemoveObjectWithChildren(aSO);
+
+  return 0 ;
+}
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::DeleteHypo(const char* nomHypo)
+{
+  MESSAGE ( "DeleteHypo : nomHypo = " << nomHypo );
+  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
+  if (CORBA::is_nil(myHypo))
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid Hypothesis ";
+    throw SALOME::SALOME_Exception(es);
+    return 1 ;
+  };
+
+// On verifie que l'hypothese n'est plus utilisee
+  HOMARD::listeIters* maListeIter = myHypo->GetIterations();
+  int numberOfIter = maListeIter->length();
+  if ( numberOfIter > 0 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This hypothesis is used and cannot be deleted.";
+    throw SALOME::SALOME_Exception(es);
+    return 2 ;
+  };
+
+  // suppression du lien avec les zones eventuelles
+  HOMARD::listeZonesHypo* maListe = myHypo->GetZones();
+  int numberOfZones = maListe->length();
+  MESSAGE ( ".. Nombre de zones = " << numberOfZones );
+  for (int NumeZone = 0; NumeZone< numberOfZones; NumeZone++)
+  {
+    std::string ZoneName = std::string((*maListe)[NumeZone]);
+    MESSAGE ( ".. suppression du lien avec la zone = " << ZoneName.c_str() );
+    DissociateHypoZone(nomHypo, ZoneName.c_str()) ;
+    NumeZone += 1 ;
+  }
+
+  // comme on a un _var comme pointeur CORBA, on ne se preoccupe pas du delete
+  myContextMap[GetCurrentStudyID()]._mesHypotheses.erase(nomHypo);
+  SALOMEDS::Study::ListOfSObject_var listSO = myCurrentStudy->FindObjectByName(nomHypo, ComponentDataType());
+  SALOMEDS::SObject_var aSO =listSO[0];
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  myCurrentStudy->NewBuilder()->RemoveObjectWithChildren(aSO);
+
+  return 0 ;
+}
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::DeleteIteration(const char* nomIter)
+{
+  // Pour detruire une iteration courante
+  MESSAGE ( "DeleteIteration : nomIter = " << nomIter );
+  CORBA::Long Option = 1 ;
+  return DeleteIterationOption(nomIter, Option);
+}
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::DeleteIterationOption(const char* nomIter, CORBA::Long Option)
+{
+  //  Option = 0 : On autorise la destruction de l'iteration 0
+  //  Option = 1 : On interdit la destruction de l'iteration 0
+  MESSAGE ( "DeleteIterationOption : nomIter = " << nomIter << ", avec option = " << Option );
+  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 1 ;
+  };
+
+  int numero = myIteration->GetNumber();
+  MESSAGE ( "DeleteIterationOption : numero = " << numero );
+  if ( numero == 0 and Option == 1 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This iteration cannot be deleted.";
+    throw SALOME::SALOME_Exception(es);
+    return 2 ;
+  };
+
+  // On detruit recursivement toutes les filles
+  HOMARD::listeIterFilles* maListe = myIteration->GetIterations();
+  int numberOfIter = maListe->length();
+  for (int NumeIter = 0; NumeIter< numberOfIter; NumeIter++)
+  {
+    std::string nomIterFille = std::string((*maListe)[NumeIter]);
+    MESSAGE ( ".. appel recursif de DeleteIterationOption pour nomIter = " << nomIterFille.c_str() );
+    DeleteIterationOption(nomIterFille.c_str(), Option);
+  }
+
+  // On arrive ici pour une iteration sans fille
+  MESSAGE ( "Destruction effective de " << nomIter );
+  // On commence par invalider l'iteration pour faire le menage des dependances
+  // et des publications dans SMESH
+  InvalideIter(nomIter) ;
+
+  // Retrait dans la descendance de l'iteration parent
+  if ( numero > 0 )
+  {
+    const char* nomIterationParent = myIteration->GetIterParentName();
+    MESSAGE ( "Retrait dans la descendance de nomIterationParent " << nomIterationParent );
+    HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterationParent];
+    if (CORBA::is_nil(myIterationParent))
+    {
       SALOME::ExceptionStruct es;
       es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid Boundary ";
+      es.text = "Invalid Iteration ";
       throw SALOME::SALOME_Exception(es);
-      return ;
+      return 3 ;
+    };
+    myIterationParent->UnLinkNextIteration(nomIter);
+  }
+
+  // suppression du lien avec l'hypothese
+  if ( numero > 0 )
+  {
+    const char* nomHypo = myIteration->GetHypoName();
+    HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
+    ASSERT(!CORBA::is_nil(myHypo));
+    myHypo->UnLinkIteration(nomIter);
+  }
+
+  // comme on a un _var comme pointeur CORBA, on ne se preoccupe pas du delete
+  myContextMap[GetCurrentStudyID()]._mesIterations.erase(nomIter);
+  SALOMEDS::Study::ListOfSObject_var listSO = myCurrentStudy->FindObjectByName(nomIter, ComponentDataType());
+  SALOMEDS::SObject_var aSO =listSO[0];
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  myCurrentStudy->NewBuilder()->RemoveObjectWithChildren(aSO);
+  // on peut aussi faire RemoveObject
+//   MESSAGE ( "Au final" );
+//   HOMARD::listeIterations* Liste = GetAllIterationsName() ;
+//   numberOfIter = Liste->length();
+//   for (int NumeIter = 0; NumeIter< numberOfIter; NumeIter++)
+//   {
+//       std::string nomIterFille = std::string((*Liste)[NumeIter]);
+//       MESSAGE ( ".. nomIter = " << nomIterFille.c_str() );
+//   }
+
+  return 0 ;
+}
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::DeleteZone(const char* nomZone)
+{
+  MESSAGE ( "DeleteZone : nomZone = " << nomZone );
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[nomZone];
+  if (CORBA::is_nil(myZone))
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid Zone ";
+    throw SALOME::SALOME_Exception(es);
+    return 1 ;
   };
-  SALOME::ExceptionStruct es;
-  es.type = SALOME::BAD_PARAM;
-  es.text = "No change is allowed in boundary. Ask for evolution.";
-  throw SALOME::SALOME_Exception(es);
-  return ;
-/*  HOMARD::listeHypo* maListe = myBoundary->GetHypo();
+
+// On verifie que la zone n'est plus utilisee
+  HOMARD::listeHypo* maListe = myZone->GetHypo();
   int numberOfHypo = maListe->length();
-  for (int NumeHypo = 0; NumeHypo< numberOfHypo; NumeHypo++)
+  MESSAGE ( ".. Nombre d'hypotheses = " << numberOfHypo );
+  if ( numberOfHypo > 0 )
   {
-      std::string nomHypo = std::string((*maListe)[NumeHypo]);
-      InvalideHypo(nomHypo.c_str());
-  }*/
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This zone is used and cannot be deleted.";
+    throw SALOME::SALOME_Exception(es);
+    return 2 ;
+  };
+//
+  // comme on a un _var comme pointeur CORBA, on ne se preoccupe pas du delete
+  myContextMap[GetCurrentStudyID()]._mesZones.erase(nomZone);
+  SALOMEDS::Study::ListOfSObject_var listSO = myCurrentStudy->FindObjectByName(nomZone, ComponentDataType());
+  SALOMEDS::SObject_var aSO =listSO[0];
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  myCurrentStudy->NewBuilder()->RemoveObjectWithChildren(aSO);
+
+  return 0 ;
 }
-//=====================================================================================
+//=============================================================================
+//=============================================================================
+//
+//=============================================================================
+//=============================================================================
+// Invalidation des structures identifiees par leurs noms
+//=============================================================================
+//=============================================================================
+void HOMARD_Gen_i::InvalideBoundary(const char* BoundaryName)
+{
+  MESSAGE( "InvalideBoundary : BoundaryName = " << BoundaryName  );
+  HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName];
+  if (CORBA::is_nil(myBoundary))
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid Boundary ";
+    throw SALOME::SALOME_Exception(es);
+    return ;
+  }
+  else
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "No change is allowed in a boundary. Ask for evolution.";
+    throw SALOME::SALOME_Exception(es);
+    return ;
+  };
+}
+//=============================================================================
 void HOMARD_Gen_i::InvalideZone(const char* ZoneName)
-//=====================================================================================
 {
-  MESSAGE( "InvalideZone : ZoneName    = " << ZoneName  );
+  MESSAGE( "InvalideZone : ZoneName    = " << ZoneName );
   HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
   if (CORBA::is_nil(myZone))
   {
@@ -302,15 +513,16 @@ void HOMARD_Gen_i::InvalideZone(const char* ZoneName)
   };
   HOMARD::listeHypo* maListe = myZone->GetHypo();
   int numberOfHypo = maListe->length();
+  MESSAGE( ".. numberOfHypo = " << numberOfHypo );
   for (int NumeHypo = 0; NumeHypo< numberOfHypo; NumeHypo++)
   {
       std::string nomHypo = std::string((*maListe)[NumeHypo]);
+      MESSAGE( ".. nomHypo = " << nomHypo );
       InvalideHypo(nomHypo.c_str());
   }
 }
-//=====================================================================================
+//=============================================================================
 void HOMARD_Gen_i::InvalideHypo(const char* nomHypo)
-//=====================================================================================
 {
   MESSAGE( "InvalideHypo : nomHypo    = " << nomHypo  );
   HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
@@ -328,16 +540,14 @@ void HOMARD_Gen_i::InvalideHypo(const char* nomHypo)
   for (int NumeIter = 0; NumeIter< numberOfIter; NumeIter++)
   {
       std::string nomIter = std::string((*maListe)[NumeIter]);
+      MESSAGE( ".. nomIter = " << nomIter );
       InvalideIter(nomIter.c_str());
   }
 }
-//
-//=====================================================================================
+//=============================================================================
 void HOMARD_Gen_i::InvalideIter(const char* nomIter)
-//=====================================================================================
 {
-  MESSAGE("InvalideIter : nomIter    = " << nomIter);
-  SetEtatIter(nomIter,false);
+  MESSAGE("InvalideIter : nomIter = " << nomIter);
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
   if (CORBA::is_nil(myIteration))
   {
@@ -353,9 +563,12 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter)
   for (int NumeIter = 0; NumeIter< numberOfIter; NumeIter++)
   {
       std::string nomIterFille = std::string((*maListe)[NumeIter]);
+      MESSAGE ( ".. appel recursif de InvalideIter pour nomIter = " << nomIterFille.c_str() );
       InvalideIter(nomIterFille.c_str());
   }
 
+  // On arrive ici pour une iteration sans fille
+  MESSAGE ( "Invalidation effective de " << nomIter );
   SALOMEDS::SObject_var aIterSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
   SALOMEDS::ChildIterator_var  aIter = myCurrentStudy->NewChildIterator(aIterSO);
   for (; aIter->More(); aIter->Next())
@@ -369,40 +582,97 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter)
       SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
       aStudyBuilder->RemoveObject(so);
   }
-  const char * nomCas = myIteration->GetCaseName();
-  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 ;
-  };
-  const char* dirParent  = myCase->GetDirName();
-  const char* nomDir     = myIteration->GetDirName();
-  const char* nomFichier = myIteration->GetMeshFile();
-  std::string commande= "rm -rf " + std::string(dirParent) + "/" + std::string(nomDir);
-  commande = commande + ";rm -rf " + std::string(nomFichier);
-  if ((system(commande.c_str())) != 0)
+
+  int number = myIteration->GetNumber();
+  if ( number > 0 )
   {
+    SetEtatIter(nomIter,false);
+    const char * nomCas = myIteration->GetCaseName();
+    HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+    if (CORBA::is_nil(myCase))
+    {
         SALOME::ExceptionStruct es;
         es.type = SALOME::BAD_PARAM;
-        es.text = "Menage du repertoire de calcul impossible" ;
+        es.text = "Invalid Case Context ";
         throw SALOME::SALOME_Exception(es);
         return ;
-  }
-// Suppression du maillage publie dans SMESH
-  const char* MeshName = myIteration->GetMeshName();
-  DeleteResultInSmesh(nomFichier, MeshName) ;
+    };
+    const char* dirParent  = myCase->GetDirName();
+    const char* nomDir     = myIteration->GetDirName();
+    const char* nomFichier = myIteration->GetMeshFile();
+    std::string commande= "rm -rf " + std::string(dirParent) + "/" + std::string(nomDir);
+    commande = commande + ";rm -rf " + std::string(nomFichier);
+    if ((system(commande.c_str())) != 0)
+    {
+          SALOME::ExceptionStruct es;
+          es.type = SALOME::BAD_PARAM;
+          es.text = "Menage du repertoire de calcul impossible" ;
+          throw SALOME::SALOME_Exception(es);
+          return ;
+    }
+  // Suppression du maillage publie dans SMESH
+    const char* MeshName = myIteration->GetMeshName();
+    DeleteResultInSmesh(nomFichier, MeshName) ;
+  };
+
 }
+//=============================================================================
+//=============================================================================
 //
-//=====================================================================================
-void HOMARD_Gen_i::DissociateHypoZone(const char* ZoneName, const char* nomHypothesis)
-{
-  MESSAGE ( "DissociateHypoZone : ZoneName= " << ZoneName << ", nomHypo = " << nomHypothesis);
-  IsValidStudy () ;
-
+//=============================================================================
+//=============================================================================
+// Association de lien entre des structures identifiees par leurs noms
+//=============================================================================
+//=============================================================================
+void HOMARD_Gen_i::AssociateCaseIter(const char* nomCas, const char* nomIter, const char* 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 ;
+  };
+
+  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 ;
+  };
+
+  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 ;
+  };
+
+  aStudyBuilder->NewCommand();
+  SALOMEDS::SObject_var newStudyIter = aStudyBuilder->NewObject(aCasSO);
+  PublishInStudyAttr(aStudyBuilder, newStudyIter, nomIter , labelIter,
+                     "iter_non_calculee.png", _orb->object_to_string(myIteration)) ;
+  aStudyBuilder->CommitCommand();
+
+  myCase->AddIteration(nomIter);
+  myIteration->SetCaseName(nomCas);
+}
+//=====================================================================================
+void HOMARD_Gen_i::AssociateHypoZone(const char* nomHypothesis, const char* ZoneName, CORBA::Long TypeUse)
+{
+  MESSAGE ( "AssociateHypoZone : nomHypo = " << nomHypothesis << ", ZoneName= " << ZoneName << ", TypeUse = " << TypeUse);
+
   HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis];
   ASSERT(!CORBA::is_nil(myHypo));
   SALOMEDS::SObject_var aHypoSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myHypo)));
@@ -413,6 +683,66 @@ void HOMARD_Gen_i::DissociateHypoZone(const char* ZoneName, const char* nomHypot
   SALOMEDS::SObject_var aZoneSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myZone)));
   ASSERT(!CORBA::is_nil(aZoneSO));
 
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+
+  aStudyBuilder->NewCommand();
+
+  SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aHypoSO);
+  aStudyBuilder->Addreference(aSubSO, aZoneSO);
+
+  aStudyBuilder->CommitCommand();
+
+  myZone->AddHypo(nomHypothesis);
+  myHypo->AddZone0(ZoneName, TypeUse);
+};
+//=============================================================================
+void HOMARD_Gen_i::AssociateIterHypo(const char* nomIter, const char* nomHypo)
+{
+  MESSAGE("AssociateIterHypo : nomHypo = " << nomHypo << " nomIter = " << nomIter);
+
+  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
+  ASSERT(!CORBA::is_nil(myHypo));
+  SALOMEDS::SObject_var aHypoSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myHypo)));
+  ASSERT(!CORBA::is_nil(aHypoSO));
+
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
+  ASSERT(!CORBA::is_nil(myIteration));
+  SALOMEDS::SObject_var aIterSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
+  ASSERT(!CORBA::is_nil(aIterSO));
+
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+
+  aStudyBuilder->NewCommand();
+
+  SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aIterSO);
+  aStudyBuilder->Addreference(aSubSO, aHypoSO);
+
+  aStudyBuilder->CommitCommand();
+
+  myIteration->SetHypoName(nomHypo);
+  myHypo->LinkIteration(nomIter);
+};
+//=============================================================================
+//=============================================================================
+//
+//=============================================================================
+//=============================================================================
+// Dissociation de lien entre des structures identifiees par leurs noms
+//=============================================================================
+//=============================================================================
+void HOMARD_Gen_i::DissociateHypoZone(const char* nomHypothesis, const char* ZoneName)
+{
+  MESSAGE ( "DissociateHypoZone : ZoneName= " << ZoneName << ", nomHypo = " << nomHypothesis);
+
+  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis];
+  ASSERT(!CORBA::is_nil(myHypo));
+  SALOMEDS::SObject_var aHypoSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myHypo)));
+  ASSERT(!CORBA::is_nil(aHypoSO));
+
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+  ASSERT(!CORBA::is_nil(myZone));
+  SALOMEDS::SObject_var aZoneSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myZone)));
+  ASSERT(!CORBA::is_nil(aZoneSO));
 
   SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
 
@@ -436,48 +766,218 @@ void HOMARD_Gen_i::DissociateHypoZone(const char* ZoneName, const char* nomHypot
   myZone->SupprHypo(nomHypothesis);
   myHypo->SupprZone(ZoneName);
 };
+//=============================================================================
+//=============================================================================
+//
 
-//===================================================================================
-void HOMARD_Gen_i::AssociateIterHypo(const char* nomIter, const char* nomHypo)
+//=============================================================================
+//=============================================================================
+// Recuperation des listes
+//=============================================================================
+//=============================================================================
+HOMARD::listeCases* HOMARD_Gen_i::GetAllCasesName()
 {
-  MESSAGE("AssociateIterHypo : nomHypo = " << nomHypo << " nomIter = " << nomIter);
+  MESSAGE("GetAllCasesName");
   IsValidStudy () ;
 
-  HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
-  ASSERT(!CORBA::is_nil(myHypo));
-  SALOMEDS::SObject_var aHypoSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myHypo)));
-  ASSERT(!CORBA::is_nil(aHypoSO));
+  HOMARD::listeCases_var ret = new HOMARD::listeCases;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesCas.size());
+  std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it;
+  int i = 0;
+  for (it = myContextMap[GetCurrentStudyID()]._mesCas.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesCas.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
 
-  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
-  ASSERT(!CORBA::is_nil(myIteration));
-  SALOMEDS::SObject_var aIterSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myIteration)));
-  ASSERT(!CORBA::is_nil(aIterSO));
+  return ret._retn();
+}
+//=============================================================================
+HOMARD::listeHypotheses* HOMARD_Gen_i::GetAllHypothesesName()
+{
+  MESSAGE("GetAllHypothesesName");
+  IsValidStudy () ;
 
-  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
+  HOMARD::listeHypotheses_var ret = new HOMARD::listeHypotheses;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesHypotheses.size());
+  std::map<std::string, HOMARD::HOMARD_Hypothesis_var>::const_iterator it;
+  int i = 0;
+  for (it = myContextMap[GetCurrentStudyID()]._mesHypotheses.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesHypotheses.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
 
-  aStudyBuilder->NewCommand();
+  return ret._retn();
+}
+//=============================================================================
+HOMARD::listeZones* HOMARD_Gen_i::GetAllZonesName()
+{
+  MESSAGE("GetAllZonesName");
+  IsValidStudy () ;
 
-  SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aIterSO);
-  aStudyBuilder->Addreference(aSubSO, aHypoSO);
+  HOMARD::listeZones_var ret = new HOMARD::listeZones;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesZones.size());
+  std::map<std::string, HOMARD::HOMARD_Zone_var>::const_iterator it;
+  int i = 0;
+  for (it = myContextMap[GetCurrentStudyID()]._mesZones.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesZones.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
 
-  aStudyBuilder->CommitCommand();
+  return ret._retn();
+}
+//=============================================================================
+HOMARD::listeIterations* HOMARD_Gen_i::GetAllIterationsName()
+{
+  MESSAGE("GetAllIterationsName");
+  IsValidStudy () ;
 
-  myIteration->SetHypoName(nomHypo);
-  myHypo->AddIteration(nomIter);
-};
+  HOMARD::listeIterations_var ret = new HOMARD::listeIterations;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesIterations.size());
+  std::map<std::string, HOMARD::HOMARD_Iteration_var>::const_iterator it;
+  int i = 0;
+  for (it = myContextMap[GetCurrentStudyID()]._mesIterations.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesIterations.end(); it++)
+  {
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
+  }
 
+  return ret._retn();
+}
 //=============================================================================
-CORBA::Boolean HOMARD_Gen_i::VerifieDir(const char* nomDir)
+HOMARD::listeBoundarys* HOMARD_Gen_i::GetAllBoundarysName()
 {
-  std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it;
-  for (it  = myContextMap[GetCurrentStudyID()]._mesCas.begin();
-       it != myContextMap[GetCurrentStudyID()]._mesCas.end(); it++)
+  MESSAGE("GetAllBoundarysName");
+  IsValidStudy () ;
+
+  HOMARD::listeBoundarys_var ret = new HOMARD::listeBoundarys;
+  ret->length(myContextMap[GetCurrentStudyID()]._mesBoundarys.size());
+  std::map<std::string, HOMARD::HOMARD_Boundary_var>::const_iterator it;
+  int i = 0;
+  for (it = myContextMap[GetCurrentStudyID()]._mesBoundarys.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesBoundarys.end(); it++)
   {
-   if (std::string(nomDir) == std::string(it->second->GetDirName())) return false;
+    ret[i++] = CORBA::string_dup((*it).first.c_str());
   }
-  return true;
+
+  return ret._retn();
 }
+//=============================================================================
+//=============================================================================
 
+//=============================================================================
+//=============================================================================
+// Recuperation des structures identifiees par leurs noms
+//=============================================================================
+//=============================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::GetCase(const char* nomCas)
+{
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+  ASSERT(!CORBA::is_nil(myCase));
+  return HOMARD::HOMARD_Cas::_duplicate(myCase);
+}
+//=============================================================================
+HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::GetZone(const char* ZoneName)
+{
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+  ASSERT(!CORBA::is_nil(myZone));
+  return HOMARD::HOMARD_Zone::_duplicate(myZone);
+}
+//=============================================================================
+HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::GetHypothesis(const char* nomHypothesis)
+{
+  HOMARD::HOMARD_Hypothesis_var myHypothesis = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis];
+  ASSERT(!CORBA::is_nil(myHypothesis));
+  return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis);
+}
+//=============================================================================
+HOMARD::HOMARD_Iteration_ptr  HOMARD_Gen_i::GetIteration(const char* NomIterationation)
+{
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[NomIterationation];
+  ASSERT(!CORBA::is_nil(myIteration));
+  return HOMARD::HOMARD_Iteration::_duplicate(myIteration);
+}
+//=============================================================================
+HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::GetBoundary(const char* nomBoundary)
+{
+  HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[nomBoundary];
+  ASSERT(!CORBA::is_nil(myBoundary));
+  return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
+}
+//=============================================================================
+//=============================================================================
+
+//=============================================================================
+//=============================================================================
+// Recuperation des structures par le contexte
+//=============================================================================
+//=============================================================================
+HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::LastIteration(const char* nomCas)
+{
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+  ASSERT(!CORBA::is_nil(myCase));
+//
+  HOMARD::HOMARD_Iteration_var myIteration = myCase->LastIteration();
+  ASSERT(!CORBA::is_nil(myIteration));
+//
+  return HOMARD::HOMARD_Iteration::_duplicate(myIteration);
+}
+//=============================================================================
+//=============================================================================
+
+//=============================================================================
+//=============================================================================
+// Nouvelles structures
+//=============================================================================
+//=============================================================================
+HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::newCase()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Cas_i* aServant = new HOMARD_Cas_i(_orb, engine);
+  HOMARD::HOMARD_Cas_var aCase = HOMARD::HOMARD_Cas::_narrow(aServant->_this());
+  return aCase._retn();
+}
+//=============================================================================
+HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::newHypothesis()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Hypothesis_i* aServant = new HOMARD_Hypothesis_i(_orb, engine);
+  HOMARD::HOMARD_Hypothesis_var aHypo = HOMARD::HOMARD_Hypothesis::_narrow(aServant->_this());
+  return aHypo._retn();
+}
+//=============================================================================
+HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::newIteration()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Iteration_i* aServant = new HOMARD_Iteration_i(_orb, engine);
+  HOMARD::HOMARD_Iteration_var aIter = HOMARD::HOMARD_Iteration::_narrow(aServant->_this());
+  return aIter._retn();
+}
+//=============================================================================
+HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::newBoundary()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Boundary_i* aServant = new HOMARD_Boundary_i(_orb, engine);
+  HOMARD::HOMARD_Boundary_var aBoundary = HOMARD::HOMARD_Boundary::_narrow(aServant->_this());
+  return aBoundary._retn();
+}
+//=============================================================================
+HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::newZone()
+{
+  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
+  HOMARD_Zone_i* aServant = new HOMARD_Zone_i(_orb, engine);
+  HOMARD::HOMARD_Zone_var aZone = HOMARD::HOMARD_Zone::_narrow(aServant->_this());
+  return aZone._retn();
+}
+//=============================================================================
+//=============================================================================
+
+//=============================================================================
+//=============================================================================
+// Creation des structures identifiees par leurs noms
+//=============================================================================
 //=============================================================================
 HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* MeshName, const char* MeshFile)
 {
@@ -486,20 +986,29 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char*
 
   if ((myContextMap[GetCurrentStudyID()]._mesCas).find(nomCas)!=(myContextMap[GetCurrentStudyID()]._mesCas).end())
   {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "This case has already been defined";
-      throw SALOME::SALOME_Exception(es);
-      return 0;
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This case has already been defined";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
   };
 
+  int existe = MEDFileExist ( MeshFile ) ;
+  if ( existe == 0 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "The mesh file does not exist.";
+    throw SALOME::SALOME_Exception(es);
+    return 0;
+  }
+
   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; }
@@ -520,93 +1029,37 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char*
 // 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;
-  std::string nomIter = std::string(MeshName) ;
-  while ((myContextMap[GetCurrentStudyID()]._mesIterations).find(nomIter) != (myContextMap[GetCurrentStudyID()]._mesIterations.end()))
+  std::string NomIteration = std::string(MeshName) ;
+  while ((myContextMap[GetCurrentStudyID()]._mesIterations).find(NomIteration) != (myContextMap[GetCurrentStudyID()]._mesIterations.end()))
   {
      std::ostringstream nom;
      nom << MeshName << monNum;
-     nomIter=nom.str();
+     NomIteration=nom.str();
      monNum = monNum+1;
   }
-  MESSAGE ( "CreateCase : nomIter = " << nomIter );
-
-  HOMARD::HOMARD_Iteration_var anIter = newIteration();
-  myContextMap[GetCurrentStudyID()]._mesIterations[nomIter] = anIter;
-  std::ostringstream DirName;
-  DirName << "I_00";
-
-  anIter->SetDirName(DirName.str().c_str());
-  anIter->SetName(nomIter.c_str());
-  anIter->SetMeshFile(MeshFile);
-  anIter->SetMeshName(MeshName);
-  anIter->SetNumber(0);
+  MESSAGE ( "CreateCase : NomIteration = " << NomIteration );
 
-  AssociateCaseIter (nomCas,nomIter.c_str(),"IterationHomard");
-  SetEtatIter(nomIter.c_str(),true);
-//
-  PublishResultInSmesh(MeshFile, 0);
-
-// Valeurs par defaut des filtrages
-  myCase->SetPyram(0);
-
-  return HOMARD::HOMARD_Cas::_duplicate(myCase);
-}
-
-//=============================================================================
-HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::GetCase(const char* nomCas)
-{
-  IsValidStudy () ;
-  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 0;
-  };
-
-  return HOMARD::HOMARD_Cas::_duplicate(myCase);
-}
-
-//=============================================================================
-HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::GetZone(const char* ZoneName)
-{
-  IsValidStudy () ;
-  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
-  ASSERT(!CORBA::is_nil(myZone));
-  return HOMARD::HOMARD_Zone::_duplicate(myZone);
-}
+  HOMARD::HOMARD_Iteration_var anIter = newIteration();
+  myContextMap[GetCurrentStudyID()]._mesIterations[NomIteration] = anIter;
+  std::ostringstream DirName;
+  DirName << "I_00";
 
-//=============================================================================
-HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::GetHypothesis(const char* nomHypothesis)
-{
-  MESSAGE ( "GetHypothesis : nomHypothesis = " << nomHypothesis );
-  IsValidStudy () ;
-  MESSAGE ( "GetHypothesis : GetCurrentStudyID() = " << GetCurrentStudyID() );
-  HOMARD::HOMARD_Hypothesis_var myHypothesis = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypothesis];
-  ASSERT(!CORBA::is_nil(myHypothesis));
-  return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis);
-}
+  anIter->SetDirName(DirName.str().c_str());
+  anIter->SetName(NomIteration.c_str());
+  anIter->SetMeshFile(MeshFile);
+  anIter->SetMeshName(MeshName);
+  anIter->SetNumber(0);
 
-//=============================================================================
-HOMARD::HOMARD_Iteration_ptr  HOMARD_Gen_i::GetIteration(const char* nomIteration)
-{
-  IsValidStudy () ;
-  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration];
-  ASSERT(!CORBA::is_nil(myIteration));
-  return HOMARD::HOMARD_Iteration::_duplicate(myIteration);
-}
-//=============================================================================
-HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::GetBoundary(const char* nomBoundary)
-{
-  IsValidStudy () ;
+  AssociateCaseIter (nomCas,NomIteration.c_str(),"IterationHomard");
+  SetEtatIter(NomIteration.c_str(),true);
+//
+  PublishResultInSmesh(MeshFile, 0);
 
-  HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[nomBoundary];
-  ASSERT(!CORBA::is_nil(myBoundary));
-  return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
-}
+// Valeurs par defaut des filtrages
+  myCase->SetPyram(0);
 
+  return HOMARD::HOMARD_Cas::_duplicate(myCase);
+}
 //=============================================================================
 HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypothesis)
 {
@@ -637,11 +1090,11 @@ HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypo
   return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis);
 }
 
-//============================================================================================================
-HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIteration, const char* nomIterParent)
-//============================================================================================================
+//=============================================================================
+HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIteration, const char* nomIterParent)
+//=============================================================================
 {
-  MESSAGE ("CreateIteration : nomIteration  = " << nomIteration << "nomIterParent = " << nomIterParent);
+  MESSAGE ("CreateIteration : NomIteration  = " << NomIteration << ", nomIterParent = " << nomIterParent);
   IsValidStudy () ;
 
   HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterParent];
@@ -666,7 +1119,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat
       return 0;
   };
 
-  if ((myContextMap[GetCurrentStudyID()]._mesIterations).find(nomIteration)!=(myContextMap[GetCurrentStudyID()]._mesIterations).end())
+  if ((myContextMap[GetCurrentStudyID()]._mesIterations).find(NomIteration)!=(myContextMap[GetCurrentStudyID()]._mesIterations).end())
   {
       SALOME::ExceptionStruct es;
       es.type = SALOME::BAD_PARAM;
@@ -684,10 +1137,10 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat
       throw SALOME::SALOME_Exception(es);
       return 0;
   };
-  myContextMap[GetCurrentStudyID()]._mesIterations[std::string(nomIteration)] = myIteration;
+  myContextMap[GetCurrentStudyID()]._mesIterations[std::string(NomIteration)] = myIteration;
 // Nom de l'iteration et du maillage
-  myIteration->SetName(nomIteration);
-  myIteration->SetMeshName(nomIteration);
+  myIteration->SetName(NomIteration);
+  myIteration->SetMeshName(NomIteration);
 
   int numero = myIterationParent->GetNumber() + 1;
   myIteration->SetNumber(numero);
@@ -703,9 +1156,9 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat
 
 // 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
-// numero d'iteration dans la sucession : maill.01.med, maill.02.med, etc... C'est le
-// cas le plus frequent.
-// Si on a plusieurs branches, donc des iterations a meme niveau d'adaptation, utiliser
+// numero d'iteration dans la sucession : maill.01.med, maill.02.med, etc... C'est la
+// 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();
@@ -714,15 +1167,13 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* nomIterat
 
 // Association avec le cas
   std::string label = "IterationHomard_" + std::string(nomIterParent);
-  AssociateCaseIter(nomCas, nomIteration, label.c_str());
-// Association avec l'iteration precedente
-  myIterationParent->AddIteration(nomIteration);
+  AssociateCaseIter(nomCas, NomIteration, label.c_str());
+// Lien avec l'iteration precedente
+  myIterationParent->LinkNextIteration(NomIteration);
   myIteration->SetIterParentName(nomIterParent);
 
   return HOMARD::HOMARD_Iteration::_duplicate(myIteration);
 }
-
-
 //=============================================================================
 HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryName, CORBA::Long BoundaryType)
 {
@@ -782,8 +1233,6 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundarySphere(const char* Bound
 
   return HOMARD::HOMARD_Boundary::_duplicate(myBoundary) ;
 }
-
-
 //=============================================================================
 HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZone(const char* ZoneName, CORBA::Long ZoneType)
 {
@@ -956,17 +1405,22 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneNam
 
   return HOMARD::HOMARD_Zone::_duplicate(myZone) ;
 }
+//=============================================================================
+//=============================================================================
 
 
 
 
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMenage)
+//=============================================================================
+// Calcul d'une iteration
+//=============================================================================
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMenage)
 {
-  MESSAGE ( "Compute : calcul de " << nomIteration );
-  IsValidStudy () ;
+  MESSAGE ( "Compute : calcul de " << NomIteration );
 
-  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIteration];
+  HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[NomIteration];
   ASSERT(!CORBA::is_nil(myIteration));
 
 // on ne calcule pas l iteration 0
@@ -993,21 +1447,12 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMena
   HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
   ASSERT(!CORBA::is_nil(myHypo));
 
-
   // A.4. L'iteration parent
   const char* nomIterationParent = myIteration->GetIterParentName();
   HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterationParent];
   ASSERT(!CORBA::is_nil(myIterationParent));
   if ( ! myIterationParent->GetEtat() )
   {
-      /*
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      std::string text = "The iteration cannot be computed because the previous iteration " + std::string(nomIterationParent) + " is not valid.";
-      es.text = CORBA::string_dup(text.c_str());
-      throw SALOME::SALOME_Exception(es);
-      return 0;
-      */
       int codret = Compute(nomIterationParent, etatMenage);
       if (codret != 0)
       {
@@ -1033,16 +1478,16 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMena
 
   // B. Les repertoires
   // B.1. Le repertoire du cas
-  const char* nomDir = myCase->GetDirName();
-  MESSAGE ( ". nomDir = " << nomDir );
+  const char* nomDirCase = myCase->GetDirName();
+  MESSAGE ( ". nomDirCase = " << nomDirCase );
 
   // B.2. Le sous-repertoire de l'iteration a calculer, puis le repertoire complet a creer
   // B.2.1. Le nom du sous-repertoire
-   const char* nomDirIt = myIteration->GetDirName();
+  const char* nomDirIt = myIteration->GetDirName();
 
   // B.2.2. Le nom complet du sous-repertoire
   std::stringstream DirCompute ;
-  DirCompute << nomDir << "/" << nomDirIt;
+  DirCompute << nomDirCase << "/" << nomDirIt;
   MESSAGE (". DirCompute = " << DirCompute.str() );
 
   // B.2.3. Si le sous-repertoire n'existe pas, on le cree
@@ -1110,7 +1555,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMena
   else
   {
     nomDirItPa = myIterationParent->GetDirName();
-    DirComputePa << nomDir << "/" << nomDirItPa;
+    DirComputePa << nomDirCase << "/" << nomDirItPa;
   }
   MESSAGE( ". nomDirItPa = " << nomDirItPa);
   MESSAGE( ". DirComputePa = " << DirComputePa.str() );
@@ -1173,7 +1618,6 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMena
      codret = 0 ;
   };
 
-
   // D.4. Les types de raffinement et de deraffinement
   // Les appels corba sont lourds, il vaut mieux les grouper
   HOMARD::listeTypes* ListTypes = myHypo->GetAdapRefinUnRef();
@@ -1435,12 +1879,12 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMena
     MESSAGE ( "Erreur en executant HOMARD : " << codretexec );
     if (codretexec == 0)
     {
-      SetEtatIter(nomIteration,true);
+      SetEtatIter(NomIteration,true);
     }
     else
     {
       // GERALD -- QMESSAGE BOX
-      SetEtatIter(nomIteration,false);
+      SetEtatIter(NomIteration,false);
     }
   }
 
@@ -1450,7 +1894,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMena
     // H.1. Le fichier des messages, dans tous les cas
     std::stringstream saux1 ;
     saux1 << "Mess " << NumeIter ;
-    PublishFileUnderIteration(nomIteration, MessFile.c_str(), saux1.str().c_str());
+    PublishFileUnderIteration(NomIteration, MessFile.c_str(), saux1.str().c_str());
 
     // H.2. Si tout s'est bien passe :
     if (codretexec == 0)
@@ -1459,11 +1903,11 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMena
       std::stringstream saux2 ;
       saux2 << "Summary " << NumeIter ;
       std::string SummaryFile = DirCompute.str() + "/apad." + siterp1 + ".bilan" ;
-      PublishFileUnderIteration(nomIteration, SummaryFile.c_str(), saux2.str().c_str());
+      PublishFileUnderIteration(NomIteration, SummaryFile.c_str(), saux2.str().c_str());
     // H.2.2. Le fichier de  maillage obtenu
       std::stringstream saux0 ;
       saux0 <<"Iteration " << NumeIter ;
-      PublishFileUnderIteration(nomIteration, MeshFile, saux0.str().c_str());
+      PublishFileUnderIteration(NomIteration, MeshFile, saux0.str().c_str());
       PublishResultInSmesh(MeshFile, 1);
     }
   // H.3 Message d'erreur en cas de probleme
@@ -1487,15 +1931,21 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatMena
     }
   }
 
-  // I. Menage
+  // I. Menage et retour dans le repertoire du cas
   if (codret == 0)
   {
     delete myDriver;
+    chdir(nomDirCase);
   }
-  //
+
   return codretexec ;
 }
+//===========================================================================
 
+//===========================================================================
+//===========================================================================
+// Publications
+//===========================================================================
 //===========================================================================
 SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
                                                    SALOMEDS::SObject_ptr theSObject,
@@ -1560,11 +2010,11 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishCaseInStudy(SALOMEDS::Study_ptr theSt
   SALOMEDS::GenericAttribute_var anAttr;
 
   if (CORBA::is_nil(theObject)) {
-    MESSAGE("HOMARD_Gen_i.cxx::theObject->_is_nil()");
+    MESSAGE("HOMARD_Gen_i::theObject->_is_nil()");
     return aResultSO._retn();
   }
   if (theStudy->_is_nil()) {
-    MESSAGE("HOMARD_Gen_i.cxx::theStudy->_is_nil()");
+    MESSAGE("HOMARD_Gen_i::theStudy->_is_nil()");
     return aResultSO._retn();
   }
 
@@ -1592,18 +2042,18 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishZoneInStudy(SALOMEDS::Study_ptr theSt
 
   if (CORBA::is_nil(theObject))
   {
-    MESSAGE("HOMARD_Gen_i.cxx::theObject->_is_nil()");
+    MESSAGE("PublishZoneInStudy : theObject->_is_nil()");
     return aResultSO._retn();
   }
   if (theStudy->_is_nil())
   {
-    MESSAGE("HOMARD_Gen_i.cxx::theStudy->_is_nil()");
+    MESSAGE("PublishZoneInStudy : theStudy->_is_nil()");
     return aResultSO._retn();
   }
   SALOMEDS::SComponent_var theFatherHomard = theStudy->FindComponent(ComponentDataType());
   if (theFatherHomard->_is_nil())
   {
-    MESSAGE("theFatherHomard->_is_nil()");
+    MESSAGE("PublishZoneInStudy : theFatherHomard->_is_nil()");
     return aResultSO._retn();
   }
 
@@ -1798,100 +2248,31 @@ void HOMARD_Gen_i::PublishInStudyAttr(SALOMEDS::StudyBuilder_var aStudyBuilder,
   }
 };
 
-//=============================================================================
-HOMARD::listeCases* HOMARD_Gen_i::GetAllCasesName()
-{
-  MESSAGE("GetAllCasesName");
-  IsValidStudy () ;
-
-  HOMARD::listeCases_var ret = new HOMARD::listeCases;
-  ret->length(myContextMap[GetCurrentStudyID()]._mesCas.size());
-  std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it;
-  int i = 0;
-  for (it  = myContextMap[GetCurrentStudyID()]._mesCas.begin();
-       it != myContextMap[GetCurrentStudyID()]._mesCas.end(); it++)
-  {
-    ret[i++] = CORBA::string_dup((*it).first.c_str());
-  }
-
-  return ret._retn();
-}
-
-//=============================================================================
-HOMARD::listeHypotheses* HOMARD_Gen_i::GetAllHypothesesName()
-{
-  MESSAGE("GetAllHypothesesName");
-  IsValidStudy () ;
-
-  HOMARD::listeHypotheses_var ret = new HOMARD::listeHypotheses;
-  ret->length(myContextMap[GetCurrentStudyID()]._mesHypotheses.size());
-  std::map<std::string, HOMARD::HOMARD_Hypothesis_var>::const_iterator it;
-  int i = 0;
-  for (it  = myContextMap[GetCurrentStudyID()]._mesHypotheses.begin();
-  it != myContextMap[GetCurrentStudyID()]._mesHypotheses.end(); it++)
-  {
-    ret[i++] = CORBA::string_dup((*it).first.c_str());
-  }
-
-  return ret._retn();
-}
-
-//=============================================================================
-HOMARD::listeZones* HOMARD_Gen_i::GetAllZonesName()
+//=====================================================================================
+void HOMARD_Gen_i::PublishBoundaryUnderCase(const char* CaseName, const char* BoundaryName)
 {
-  MESSAGE("GetAllZonesName");
-  IsValidStudy () ;
-
-  HOMARD::listeZones_var ret = new HOMARD::listeZones;
-  ret->length(myContextMap[GetCurrentStudyID()]._mesZones.size());
-  std::map<std::string, HOMARD::HOMARD_Zone_var>::const_iterator it;
-  int i = 0;
-  for (it  = myContextMap[GetCurrentStudyID()]._mesZones.begin();
-  it != myContextMap[GetCurrentStudyID()]._mesZones.end(); it++)
-  {
-    ret[i++] = CORBA::string_dup((*it).first.c_str());
-  }
+  MESSAGE ( "PublishBoundaryUnderCase : CaseName = " << CaseName << ", BoundaryName= " << BoundaryName );
 
-  return ret._retn();
-}
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[CaseName];
+  ASSERT(!CORBA::is_nil(myCase));
+  SALOMEDS::SObject_var aCaseSO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myCase)));
+  ASSERT(!CORBA::is_nil(aCaseSO));
 
-//=============================================================================
-HOMARD::listeIterations* HOMARD_Gen_i::GetAllIterationsName()
-{
-  MESSAGE("GetAllIterationsName");
-  IsValidStudy () ;
+  HOMARD::HOMARD_Boundary_var myBoundary = myContextMap[GetCurrentStudyID()]._mesBoundarys[BoundaryName];
+  ASSERT(!CORBA::is_nil(myBoundary));
+  SALOMEDS::SObject_var aBoundarySO = SALOMEDS::SObject::_narrow(myCurrentStudy->FindObjectIOR(_orb->object_to_string(myBoundary)));
+  ASSERT(!CORBA::is_nil(aBoundarySO));
 
-  HOMARD::listeIterations_var ret = new HOMARD::listeIterations;
-  ret->length(myContextMap[GetCurrentStudyID()]._mesIterations.size());
-  std::map<std::string, HOMARD::HOMARD_Iteration_var>::const_iterator it;
-  int i = 0;
-  for (it  = myContextMap[GetCurrentStudyID()]._mesIterations.begin();
-  it != myContextMap[GetCurrentStudyID()]._mesIterations.end(); it++)
-  {
-    ret[i++] = CORBA::string_dup((*it).first.c_str());
-  }
+  SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();
 
-  return ret._retn();
-}
-//=============================================================================
-HOMARD::listeBoundarys* HOMARD_Gen_i::GetAllBoundarysName()
-{
-  MESSAGE("GetAllBoundarysName");
-  IsValidStudy () ;
+  aStudyBuilder->NewCommand();
 
-  HOMARD::listeBoundarys_var ret = new HOMARD::listeBoundarys;
-  ret->length(myContextMap[GetCurrentStudyID()]._mesBoundarys.size());
-  std::map<std::string, HOMARD::HOMARD_Boundary_var>::const_iterator it;
-  int i = 0;
-  for (it  = myContextMap[GetCurrentStudyID()]._mesBoundarys.begin();
-  it != myContextMap[GetCurrentStudyID()]._mesBoundarys.end(); it++)
-  {
-    ret[i++] = CORBA::string_dup((*it).first.c_str());
-  }
+  SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aCaseSO);
+  aStudyBuilder->Addreference(aSubSO, aBoundarySO);
 
-  return ret._retn();
-}
+  aStudyBuilder->CommitCommand();
 
+};
 //=============================================================================
 void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeType)
 {
@@ -1965,7 +2346,7 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy
 //=============================================================================
 void HOMARD_Gen_i::DeleteResultInSmesh(const char* NomFich, const char* MeshName)
 {
-  MESSAGE (" DeleteResultInSmesh pour "<< NomFich << "et le maillage "<< MeshName);
+  MESSAGE (" DeleteResultInSmesh pour le maillage " << MeshName << " dans le fichier " << NomFich );
   if (CORBA::is_nil(myCurrentStudy))
   {
       SALOME::ExceptionStruct es;
@@ -2058,29 +2439,14 @@ void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* No
 
   aStudyBuilder->CommitCommand();
 }
-
-//=====================================================================================
-void HOMARD_Gen_i::IsValidStudy( )
-//=====================================================================================
-{
-  MESSAGE( "IsValidStudy" );
-  if (CORBA::is_nil(myCurrentStudy))
-  {
-    SALOME::ExceptionStruct es;
-    es.type = SALOME::BAD_PARAM;
-    es.text = "Invalid Study Context";
-    throw SALOME::SALOME_Exception(es);
-  };
-  return ;
-}
-
-//===========================================================================
+//=============================================================================
+//=============================================================================
 //
+//=============================================================================
+//=============================================================================
 // Next functions are inherited from SALOMEDS::Driver interface
-//
-//===========================================================================
-
-//===========================================================================
+//=============================================================================
+//=============================================================================
 SALOMEDS::TMPFile* HOMARD_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
                                       const char* theURL,
                                       CORBA::Boolean isMultiFile)
@@ -2473,49 +2839,6 @@ PortableServer::ServantBase_var HOMARD_Gen_i::GetServant(CORBA::Object_ptr theOb
   return aServant;
 }
 
-//===========================================================================
-HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::newCase()
-{
-  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
-  HOMARD_Cas_i* aServant = new HOMARD_Cas_i(_orb, engine);
-  HOMARD::HOMARD_Cas_var aCase = HOMARD::HOMARD_Cas::_narrow(aServant->_this());
-  return aCase._retn();
-}
-
-//===========================================================================
-HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::newHypothesis()
-{
-  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
-  HOMARD_Hypothesis_i* aServant = new HOMARD_Hypothesis_i(_orb, engine);
-  HOMARD::HOMARD_Hypothesis_var aHypo = HOMARD::HOMARD_Hypothesis::_narrow(aServant->_this());
-  return aHypo._retn();
-}
-
-//===========================================================================
-HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::newIteration()
-{
-  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
-  HOMARD_Iteration_i* aServant = new HOMARD_Iteration_i(_orb, engine);
-  HOMARD::HOMARD_Iteration_var aIter = HOMARD::HOMARD_Iteration::_narrow(aServant->_this());
-  return aIter._retn();
-}
-
-//===========================================================================
-HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::newBoundary()
-{
-  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
-  HOMARD_Boundary_i* aServant = new HOMARD_Boundary_i(_orb, engine);
-  HOMARD::HOMARD_Boundary_var aBoundary = HOMARD::HOMARD_Boundary::_narrow(aServant->_this());
-  return aBoundary._retn();
-}
-//===========================================================================
-HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::newZone()
-{
-  HOMARD::HOMARD_Gen_var engine = POA_HOMARD::HOMARD_Gen::_this();
-  HOMARD_Zone_i* aServant = new HOMARD_Zone_i(_orb, engine);
-  HOMARD::HOMARD_Zone_var aZone = HOMARD::HOMARD_Zone::_narrow(aServant->_this());
-  return aZone._retn();
-}
 //==========================================================================
 Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
                                        CORBA::Boolean isPublished,
@@ -2534,7 +2857,7 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
 
    std::string aScript = "\"\"\"\n";
    aScript += "Python script for HOMARD\n";
-   aScript += "Copyright EDF-R&D 2010\n";
+   aScript += "Copyright EDF-R&D 2013\n";
    aScript += "\"\"\"\n";
    aScript += "__revision__ = \"V1.2\"\n";
    aScript += "import HOMARD\n";
@@ -2564,7 +2887,7 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
     CORBA::String_var dumpCorbaBoundary = maBoundary->GetDumpPython();
     std::string dumpBoundary = dumpCorbaBoundary.in();
     MESSAGE (dumpBoundary<<"\n");
-    aScript+=dumpBoundary;
+    aScript += dumpBoundary;
    }
 
 
@@ -2582,13 +2905,16 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
     CORBA::String_var dumpCorbaZone = maZone->GetDumpPython();
     std::string dumpZone = dumpCorbaZone.in();
     MESSAGE (dumpZone<<"\n");
-    aScript+=dumpZone;
+    aScript += dumpZone;
    }
 
 
-   MESSAGE (". Ecritures des hypotheses");
-   aScript += "#\n# Creation of the hypotheses";
-   aScript +=  "\n# ==========================";
+   if (myContextMap[GetCurrentStudyID()]._mesHypotheses.size() > 0)
+   {
+    MESSAGE (". Ecritures des hypotheses");
+    aScript += "#\n# Creation of the hypotheses";
+    aScript +=  "\n# ==========================";
+   }
    std::map<std::string, HOMARD::HOMARD_Hypothesis_var>::const_iterator it_hypo;
    for ( it_hypo  = myContextMap[GetCurrentStudyID()]._mesHypotheses.begin();
          it_hypo != myContextMap[GetCurrentStudyID()]._mesHypotheses.end(); it_hypo++)
@@ -2597,13 +2923,16 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
     CORBA::String_var dumpCorbaHypo = monHypo->GetDumpPython();
     std::string dumpHypo = dumpCorbaHypo.in();
     MESSAGE (dumpHypo<<"\n");
-    aScript+=dumpHypo;
+    aScript += dumpHypo;
    }
 
 
-   MESSAGE (". Ecritures des cas");
-   aScript += "#\n# Creation of the cases";
-   aScript += "\n# =====================";
+   if (myContextMap[GetCurrentStudyID()]._mesCas.size() > 0)
+   {
+    MESSAGE (". Ecritures des cas");
+    aScript += "#\n# Creation of the cases";
+    aScript += "\n# =====================";
+   }
    std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it_cas;
    for (it_cas  = myContextMap[GetCurrentStudyID()]._mesCas.begin();
         it_cas != myContextMap[GetCurrentStudyID()]._mesCas.end(); it_cas++)
@@ -2628,13 +2957,16 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
            std::string dumpCas2= dumpCorbaCase.in();
 
            MESSAGE (dumpCas<<dumpCas2<<"\n");
-           aScript+=dumpCas + dumpCas2;
+           aScript += dumpCas + dumpCas2;
         };
 
 
-   MESSAGE (". Ecritures des iterations");
-   aScript += "#\n# Creation of the iterations" ;
-   aScript += "\n# ==========================";
+   if (myContextMap[GetCurrentStudyID()]._mesIterations.size() > 0)
+   {
+    MESSAGE (". Ecritures des iterations");
+    aScript += "#\n# Creation of the iterations" ;
+    aScript += "\n# ==========================";
+   }
    std::map<std::string, HOMARD::HOMARD_Iteration_var>::const_iterator it_iter;
    for (it_iter  = myContextMap[GetCurrentStudyID()]._mesIterations.begin();
         it_iter != myContextMap[GetCurrentStudyID()]._mesIterations.end(); ++it_iter)
@@ -2643,31 +2975,69 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy,
     CORBA::String_var dumpCorbaIter = aIter->GetDumpPython();
     std::string dumpIter = dumpCorbaIter.in();
     MESSAGE (dumpIter<<"\n");
-    aScript+=dumpIter;
+    aScript += dumpIter;
    }
 
-   MESSAGE (". Ecritures finales");
-    if( isMultiFile )
-      aScript += "\n\tpass";
-    aScript += "\n";
+  MESSAGE (". Ecritures finales");
+  if( isMultiFile )
+    aScript += "\n\tpass";
+  aScript += "\n";
 
-    if( !isMultiFile ) // remove unnecessary tabulation
-      aScript = RemoveTabulation( aScript );
+  if( !isMultiFile ) // remove unnecessary tabulation
+    aScript = RemoveTabulation( aScript );
 
-/*   MESSAGE ("A ecrire \n"<<aScript);*/
-   const size_t aLen = strlen(aScript.c_str());
-   char* aBuffer = new char[aLen+1];
-   strcpy(aBuffer, aScript.c_str());
+//   MESSAGE ("A ecrire \n"<<aScript);
+  const size_t aLen = strlen(aScript.c_str());
+  char* aBuffer = new char[aLen+1];
+  strcpy(aBuffer, aScript.c_str());
 
-   CORBA::Octet* anOctetBuf =  (CORBA::Octet*)aBuffer;
-   Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1);
+  CORBA::Octet* anOctetBuf =  (CORBA::Octet*)aBuffer;
+  Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1);
 
-   MESSAGE ("Sortie de DumpPython");
-   return aStreamFile._retn();
+  MESSAGE ("Sortie de DumpPython");
+  return aStreamFile._retn();
 }
 
 
-// Version information
+//=============================================================================
+//=============================================================================
+// Utilitaires
+//=============================================================================
+//=============================================================================
+void HOMARD_Gen_i::IsValidStudy( )
+{
+//   MESSAGE( "IsValidStudy" );
+  if (CORBA::is_nil(myCurrentStudy))
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "Invalid Study Context";
+    throw SALOME::SALOME_Exception(es);
+  };
+  return ;
+}
+
+//=============================================================================
+CORBA::Boolean HOMARD_Gen_i::VerifieDir(const char* nomDir)
+{
+  std::map<std::string, HOMARD::HOMARD_Cas_var>::const_iterator it;
+  for (it = myContextMap[GetCurrentStudyID()]._mesCas.begin();
+  it != myContextMap[GetCurrentStudyID()]._mesCas.end(); it++)
+  {
+   if (std::string(nomDir) == std::string(it->second->GetDirName())) return false;
+  }
+  return true;
+}
+/*//=============================================================================
+void SALOMEException( std::string message )
+{
+  SALOME::ExceptionStruct es;
+  es.type = SALOME::BAD_PARAM;
+  es.text = message;
+  throw SALOME::SALOME_Exception(es);
+  return ;
+}*/
+//=============================================================================
 char* HOMARD_Gen_i::getVersion()
 {
 #if HOMARD_DEVELOPMENT
index c0ee27f95d29600dcaccae4280ee63484cfa9995..5d9033f47a2cdbc6167a6f561a9d8a6f719f9b88 100644 (file)
@@ -52,13 +52,25 @@ public:
   virtual ~HOMARD_Gen_i();
 
 
-  SALOMEDS::Study_ptr             GetCurrentStudy();
-  void                            SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
-  CORBA::Long                     GetCurrentStudyID();
+// Generalites
+
+// Les creations
+  HOMARD::HOMARD_Boundary_ptr     CreateBoundary (const char* nomBoundary, CORBA::Long typeBoundary);
+  HOMARD::HOMARD_Boundary_ptr     CreateBoundaryDi (const char* nomBoundary,
+                                                    const char* MeshName, const char* FileName);
+  HOMARD::HOMARD_Boundary_ptr     CreateBoundaryCylinder (const char* nomBoundary,
+                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
+                                      CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
+                                      CORBA::Double Rayon);
+  HOMARD::HOMARD_Boundary_ptr     CreateBoundarySphere (const char* nomBoundary,
+                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
+                                      CORBA::Double Rayon);
 
   HOMARD::HOMARD_Cas_ptr          CreateCase      (const char* nomCas,
                                                    const char* MeshName, const char* FileName);
+
   HOMARD::HOMARD_Hypothesis_ptr   CreateHypothesis(const char* nomHypothesis);
+
   HOMARD::HOMARD_Iteration_ptr    CreateIteration (const char* nomIter, const char* nomIterParent);
 
   HOMARD::HOMARD_Zone_ptr         CreateZone (const char* nomZone, CORBA::Long typeZone);
@@ -66,20 +78,14 @@ public:
                                       CORBA::Double Xmini, CORBA::Double Xmaxi,
                                       CORBA::Double Ymini, CORBA::Double Ymaxi,
                                       CORBA::Double Zmini, CORBA::Double Zmaxi);
-  HOMARD::HOMARD_Zone_ptr         CreateZoneSphere (const char* nomZone,
-                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, CORBA::Double Rayon);
-  HOMARD::HOMARD_Zone_ptr         CreateZoneCylinder (const char* nomZone,
-                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
-                                      CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe,
-                                      CORBA::Double Rayon, CORBA::Double Haut);
-  HOMARD::HOMARD_Zone_ptr         CreateZonePipe (const char* nomZone,
-                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
-                                      CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe,
-                                      CORBA::Double Rayon, CORBA::Double Haut, CORBA::Double Rayonint);
   HOMARD::HOMARD_Zone_ptr         CreateZoneBox2D (const char* nomZone,
                                       CORBA::Double Umini, CORBA::Double Umaxi,
                                       CORBA::Double Vmini, CORBA::Double Vmaxi,
                                       CORBA::Long Orient);
+  HOMARD::HOMARD_Zone_ptr         CreateZoneCylinder (const char* nomZone,
+                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
+                                      CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe,
+                                      CORBA::Double Rayon, CORBA::Double Haut);
   HOMARD::HOMARD_Zone_ptr         CreateZoneDisk (const char* nomZone,
                                       CORBA::Double Ucentre, CORBA::Double Vcentre,
                                       CORBA::Double Rayon,
@@ -88,41 +94,55 @@ public:
                                       CORBA::Double Ucentre, CORBA::Double Vcentre,
                                       CORBA::Double Rayon, CORBA::Double Rayonint,
                                       CORBA::Long Orient);
-
-  HOMARD::HOMARD_Boundary_ptr     CreateBoundary (const char* nomBoundary, CORBA::Long typeBoundary);
-  HOMARD::HOMARD_Boundary_ptr     CreateBoundaryDi (const char* nomBoundary,
-                                                    const char* MeshName, const char* FileName);
-  HOMARD::HOMARD_Boundary_ptr     CreateBoundaryCylinder (const char* nomBoundary,
-                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
-                                      CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
-                                      CORBA::Double Rayon);
-  HOMARD::HOMARD_Boundary_ptr     CreateBoundarySphere (const char* nomBoundary,
+  HOMARD::HOMARD_Zone_ptr         CreateZonePipe (const char* nomZone,
                                       CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
-                                      CORBA::Double Rayon);
+                                      CORBA::Double Xaxe, CORBA::Double Yaxe, CORBA::Double Zaxe,
+                                      CORBA::Double Rayon, CORBA::Double Haut, CORBA::Double Rayonint);
+  HOMARD::HOMARD_Zone_ptr         CreateZoneSphere (const char* nomZone,
+                                      CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre, CORBA::Double Rayon);
 
+// Les informations
+  HOMARD::HOMARD_Boundary_ptr     GetBoundary   (const char* nomBoundary);
   HOMARD::HOMARD_Cas_ptr          GetCase       (const char* nomCas);
-  HOMARD::HOMARD_Zone_ptr         GetZone       (const char* nomZone);
   HOMARD::HOMARD_Hypothesis_ptr   GetHypothesis (const char* nomHypothesis);
   HOMARD::HOMARD_Iteration_ptr    GetIteration  (const char* nomIteration);
-  HOMARD::HOMARD_Boundary_ptr     GetBoundary   (const char* nomBoundary);
+  HOMARD::HOMARD_Zone_ptr         GetZone       (const char* nomZone);
 
-  void                            AssociateCaseIter(const char* nomCas, const char* nomIter,
-                                                    const char* labelIter);
-  void                            AssociateIterHypo(const char* nomIter, const char* nomHypothesis);
-  void                            DissociateHypoZone(const char* nomZone, const char* nomHypothesis);
+  HOMARD::listeBoundarys*         GetAllBoundarysName();
+  HOMARD::listeCases*             GetAllCasesName();
+  HOMARD::listeHypotheses*        GetAllHypothesesName();
+  HOMARD::listeIterations*        GetAllIterationsName();
+  HOMARD::listeZones*             GetAllZonesName();
 
+  HOMARD::HOMARD_Iteration_ptr    LastIteration  (const char* nomCas);
+
+// L'etude
+  SALOMEDS::Study_ptr             GetCurrentStudy();
+  void                            SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
+  CORBA::Long                     GetCurrentStudyID();
+
+// Liens entre structures
   void                            InvalideBoundary(const char* nomBoundary);
-  void                            InvalideZone(const char* nomZone);
   void                            InvalideHypo(const char* nomHypo);
   void                            InvalideIter(const char* nomIter);
+  void                            InvalideZone(const char* nomZone);
 
-  void                            SetEtatIter(const char* nomIter,const CORBA::Boolean EtatCalcul);
+  CORBA::Long                     DeleteBoundary(const char* nomBoundary);
+  CORBA::Long                     DeleteCase(const char* nomCas);
+  CORBA::Long                     DeleteHypo(const char* nomHypothesis);
+  CORBA::Long                     DeleteIteration(const char* nomIter);
+  CORBA::Long                     DeleteIterationOption(const char* nomIter, CORBA::Long Option);
+  CORBA::Long                     DeleteZone(const char* nomZone);
 
-  HOMARD::listeCases*             GetAllCasesName();
-  HOMARD::listeHypotheses*        GetAllHypothesesName();
-  HOMARD::listeZones*             GetAllZonesName();
-  HOMARD::listeIterations*        GetAllIterationsName();
-  HOMARD::listeBoundarys*         GetAllBoundarysName();
+  void                            AssociateIterHypo(const char* nomIter, const char* nomHypothesis);
+
+  void                            AssociateHypoZone(const char* nomHypothesis, const char* nomZone, CORBA::Long TypeUse);
+  void                            DissociateHypoZone(const char* nomHypothesis, const char* nomZone);
+
+  void                            AssociateCaseIter(const char* nomCas, const char* nomIter,
+                                                    const char* labelIter);
+
+  void                            SetEtatIter(const char* nomIter,const CORBA::Boolean EtatCalcul);
 
   CORBA::Long                     Compute(const char* nomIteration, CORBA::Long etatMenage);
   CORBA::Boolean                  VerifieDir(const char* nomDir);
@@ -131,6 +151,7 @@ public:
   void                            DeleteResultInSmesh(const char* NomFich, const char* MeshName);
   void                            PublishFileUnderIteration(const char* NomIter, const char* NomFich,
                                                             const char* Commentaire);
+  void                            PublishBoundaryUnderCase(const char* CaseName, const char* BoundaryName);
 
   void                            IsValidStudy();
 
@@ -191,6 +212,7 @@ public:
                                             CORBA::Long theObjectID,
                                             SALOMEDS::SObject_ptr theObject);
 
+//   virtual void SALOMEException( std::string message );
 
 private:
   void                            addInStudy(SALOMEDS::Study_ptr theStudy);
@@ -207,7 +229,8 @@ private:
   virtual void                    PublishInStudyAttr(SALOMEDS::StudyBuilder_var aStudyBuilder,
                                                      SALOMEDS::SObject_var aResultSO,
                                                      const char* theName, const char* value, const char* icone, const char* ior);
-  PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject);
+
+PortableServer::ServantBase_var GetServant(CORBA::Object_ptr theObject);
 
   HOMARD::HOMARD_Cas_ptr          newCase();
   HOMARD::HOMARD_Hypothesis_ptr   newHypothesis();
index adec5d80221160e550c5f429322c4d2ffbde7851..3cc0a6c51f0dca57924159e4a8d3836779bbe4fe 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #include "HOMARD_Hypothesis_i.hxx"
 #include "HOMARD_Gen_i.hxx"
@@ -58,17 +67,16 @@ HOMARD_Hypothesis_i::HOMARD_Hypothesis_i( CORBA::ORB_ptr orb,
 HOMARD_Hypothesis_i::~HOMARD_Hypothesis_i()
 {
 }
-
 //=============================================================================
-/*!
- */
+//=============================================================================
+// Generalites
+//=============================================================================
 //=============================================================================
 void HOMARD_Hypothesis_i::SetName( const char* Name )
 {
   ASSERT( myHomardHypothesis );
   myHomardHypothesis->SetName( Name );
 }
-
 //=============================================================================
 char* HOMARD_Hypothesis_i::GetName()
 {
@@ -76,31 +84,33 @@ char* HOMARD_Hypothesis_i::GetName()
   return CORBA::string_dup( myHomardHypothesis->GetName().c_str() );
 }
 //=============================================================================
-/*!
- */
-//=============================================================================
-void HOMARD_Hypothesis_i::SetCaseCreation( const char* NomCaseCreation )
+CORBA::Long  HOMARD_Hypothesis_i::Delete()
 {
   ASSERT( myHomardHypothesis );
-  myHomardHypothesis->SetCaseCreation( NomCaseCreation );
+  char* HypoName = GetName() ;
+  MESSAGE ( "Delete : destruction de l'hypothese " << HypoName );
+  return _gen_i->DeleteHypo(HypoName) ;
 }
-
 //=============================================================================
-char* HOMARD_Hypothesis_i::GetCaseCreation()
+char* HOMARD_Hypothesis_i::GetDumpPython()
 {
   ASSERT( myHomardHypothesis );
-  return CORBA::string_dup( myHomardHypothesis->GetCaseCreation().c_str() );
+  return CORBA::string_dup( myHomardHypothesis->GetDumpPython().c_str() );
 }
 //=============================================================================
-char* HOMARD_Hypothesis_i::GetDumpPython()
+std::string HOMARD_Hypothesis_i::Dump() const
 {
-  ASSERT( myHomardHypothesis );
-  return CORBA::string_dup( myHomardHypothesis->GetDumpPython().c_str() );
+  return HOMARD::Dump( *myHomardHypothesis );
 }
-
 //=============================================================================
-/*!
- */
+bool HOMARD_Hypothesis_i::Restore( const std::string& stream )
+{
+  return HOMARD::Restore( *myHomardHypothesis, stream );
+}
+//=============================================================================
+//=============================================================================
+// Caracteristiques
+//=============================================================================
 //=============================================================================
 void HOMARD_Hypothesis_i::SetAdapRefinUnRef( CORBA::Long TypeAdap,CORBA::Long TypeRaff, CORBA::Long TypeDera )
 {
@@ -108,7 +118,6 @@ void HOMARD_Hypothesis_i::SetAdapRefinUnRef( CORBA::Long TypeAdap,CORBA::Long Ty
   myHomardHypothesis->SetAdapType( TypeAdap );
   myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera );
 }
-
 //=============================================================================
 HOMARD::listeTypes* HOMARD_Hypothesis_i::GetAdapRefinUnRef()
 {
@@ -138,36 +147,22 @@ CORBA::Long HOMARD_Hypothesis_i::GetUnRefType()
   ASSERT( myHomardHypothesis );
   return CORBA::Long( myHomardHypothesis->GetUnRefType() );
 }
-
-//=============================================================================
-/*!
- */
 //=============================================================================
 void HOMARD_Hypothesis_i::SetField( const char* FieldName )
 {
   myHomardHypothesis->SetField( FieldName );
 }
 //=============================================================================
-void HOMARD_Hypothesis_i::SetRefinThr( CORBA::Long TypeThR, CORBA::Double ThreshR )
-{
-  myHomardHypothesis->SetRefinThr( TypeThR, ThreshR );
-}
-//=============================================================================
-void HOMARD_Hypothesis_i::SetUnRefThr( CORBA::Long TypeThC, CORBA::Double ThreshC )
-{
-  myHomardHypothesis->SetUnRefThr( TypeThC, ThreshC );
-}
-//=============================================================================
-void HOMARD_Hypothesis_i::SetUseComp( CORBA::Long UsCmpI )
+char* HOMARD_Hypothesis_i::GetFieldName()
 {
-  myHomardHypothesis->SetUseComp( UsCmpI );
+  ASSERT( myHomardHypothesis );
+  return CORBA::string_dup( myHomardHypothesis->GetFieldName().c_str() );
 }
 //=============================================================================
 void HOMARD_Hypothesis_i::SetUseField( CORBA::Long UsField )
 {
   myHomardHypothesis->SetUseField( UsField );
 }
-
 //=============================================================================
 HOMARD::InfosHypo* HOMARD_Hypothesis_i::GetField()
 {
@@ -179,14 +174,45 @@ HOMARD::InfosHypo* HOMARD_Hypothesis_i::GetField()
   aInfosHypo->TypeThC    = CORBA::Long( myHomardHypothesis->GetUnRefThrType() );
   aInfosHypo->ThreshC    = CORBA::Double( myHomardHypothesis->GetThreshC() );
   aInfosHypo->UsField    = CORBA::Long( myHomardHypothesis->GetUseField() );
-  aInfosHypo->UsCmpI     = CORBA::Long( myHomardHypothesis->GetUseCompI() );
+  aInfosHypo->UsCmpI     = CORBA::Long( myHomardHypothesis->GetUseComp() );
   return aInfosHypo;
 }
 //=============================================================================
-char* HOMARD_Hypothesis_i::GetFieldName()
+void HOMARD_Hypothesis_i::SetUseComp( CORBA::Long UsCmpI )
+{
+  myHomardHypothesis->SetUseComp( UsCmpI );
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::AddComp( const char* NomComposant )
 {
   ASSERT( myHomardHypothesis );
-  return CORBA::string_dup( myHomardHypothesis->GetFieldName().c_str() );
+  myHomardHypothesis->AddComp( NomComposant );
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SupprComp()
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SupprComp();
+}
+//=============================================================================
+HOMARD::listeComposantsHypo* HOMARD_Hypothesis_i::GetListComp()
+{
+  ASSERT( myHomardHypothesis );
+  const std::list<std::string>& ListString = myHomardHypothesis->GetListComp();
+  HOMARD::listeComposantsHypo_var aResult = new HOMARD::listeComposantsHypo;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SetRefinThr( CORBA::Long TypeThR, CORBA::Double ThreshR )
+{
+  myHomardHypothesis->SetRefinThr( TypeThR, ThreshR );
 }
 //=============================================================================
 CORBA::Long HOMARD_Hypothesis_i::GetRefinThrType()
@@ -195,93 +221,63 @@ CORBA::Long HOMARD_Hypothesis_i::GetRefinThrType()
   return CORBA::Long( myHomardHypothesis->GetRefinThrType() );
 }
 //=============================================================================
+void HOMARD_Hypothesis_i::SetUnRefThr( CORBA::Long TypeThC, CORBA::Double ThreshC )
+{
+  myHomardHypothesis->SetUnRefThr( TypeThC, ThreshC );
+}
+//=============================================================================
 CORBA::Long HOMARD_Hypothesis_i::GetUnRefThrType()
 {
   ASSERT( myHomardHypothesis );
   return CORBA::Long( myHomardHypothesis->GetUnRefThrType() );
 }
-
-/*!
- */
 //=============================================================================
-void HOMARD_Hypothesis_i::AddIteration( const char* NomIteration )
+void HOMARD_Hypothesis_i::SetNivMax( CORBA::Long NivMax )
 {
-  ASSERT(myHomardHypothesis);
-  myHomardHypothesis->AddIteration( NomIteration );
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SetNivMax( NivMax );
 }
-
 //=============================================================================
-void  HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse )
+CORBA::Long HOMARD_Hypothesis_i::GetNivMax()
 {
   ASSERT( myHomardHypothesis );
-  myHomardHypothesis->AddZone( NomZone, TypeUse );
+  return myHomardHypothesis->GetNivMax();
 }
 //=============================================================================
-void  HOMARD_Hypothesis_i::SupprZone      (const char * NomZone)
+void HOMARD_Hypothesis_i::SetDiamMin( CORBA::Double DiamMin )
 {
-  ASSERT(myHomardHypothesis);
-  myHomardHypothesis->SupprZone( NomZone);
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SetDiamMin( DiamMin );
 }
 //=============================================================================
-HOMARD::listeZonesHypo* HOMARD_Hypothesis_i::GetZones()
+CORBA::Double HOMARD_Hypothesis_i::GetDiamMin()
 {
-  ASSERT(myHomardHypothesis);
-  const std::list<std::string>& ListString = myHomardHypothesis->GetZones();
-  HOMARD::listeZonesHypo_var aResult = new HOMARD::listeZonesHypo;
-  aResult->length( ListString.size() );
-  std::list<std::string>::const_iterator it;
-  int i = 0;
-  for ( it = ListString.begin(); it != ListString.end(); it++ )
-  {
-    aResult[i++] = CORBA::string_dup( (*it).c_str() );
-  }
-  return aResult._retn();
+  ASSERT( myHomardHypothesis );
+  return myHomardHypothesis->GetDiamMin();
 }
-
 //=============================================================================
-HOMARD::listeIters* HOMARD_Hypothesis_i::GetIterations()
+void HOMARD_Hypothesis_i::SetAdapInit( CORBA::Long AdapInit )
 {
-  ASSERT(myHomardHypothesis);
-  const std::list<std::string>& ListString = myHomardHypothesis->GetIterations();
-  HOMARD::listeIters_var aResult = new HOMARD::listeIters;
-  aResult->length( ListString.size() );
-  std::list<std::string>::const_iterator it;
-  int i = 0;
-  for ( it = ListString.begin(); it != ListString.end(); it++ )
-  {
-    aResult[i++] = CORBA::string_dup( (*it).c_str() );
-  }
-  return aResult._retn();
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SetAdapInit( AdapInit );
 }
-
 //=============================================================================
-void HOMARD_Hypothesis_i::AddComp( const char* NomComposant )
+CORBA::Long HOMARD_Hypothesis_i::GetAdapInit()
 {
   ASSERT( myHomardHypothesis );
-  myHomardHypothesis->AddComp( NomComposant );
+  return myHomardHypothesis->GetAdapInit();
 }
-
 //=============================================================================
-void HOMARD_Hypothesis_i::SupprComp()
+void HOMARD_Hypothesis_i::SetLevelOutput( CORBA::Long LevelOutput )
 {
   ASSERT( myHomardHypothesis );
-  myHomardHypothesis->SupprComp();
+  myHomardHypothesis->SetLevelOutput( LevelOutput );
 }
-
 //=============================================================================
-HOMARD::listeComposantsHypo* HOMARD_Hypothesis_i::GetListComp()
+CORBA::Long HOMARD_Hypothesis_i::GetLevelOutput()
 {
   ASSERT( myHomardHypothesis );
-  const std::list<std::string>& ListString = myHomardHypothesis->GetListComp();
-  HOMARD::listeComposantsHypo_var aResult = new HOMARD::listeComposantsHypo;
-  aResult->length( ListString.size() );
-  std::list<std::string>::const_iterator it;
-  int i = 0;
-  for ( it = ListString.begin(); it != ListString.end(); it++ )
-  {
-    aResult[i++] = CORBA::string_dup( (*it).c_str() );
-  }
-  return aResult._retn();
+  return myHomardHypothesis->GetLevelOutput();
 }
 //=============================================================================
 void HOMARD_Hypothesis_i::AddGroup( const char* Group)
@@ -316,9 +312,6 @@ HOMARD::ListGroupType*  HOMARD_Hypothesis_i::GetGroups()
   return aResult._retn();
 }
 //=============================================================================
-/*!
- */
-//=============================================================================
 void HOMARD_Hypothesis_i::SetTypeFieldInterp( CORBA::Long TypeFieldInterp )
 {
   ASSERT( myHomardHypothesis );
@@ -336,14 +329,12 @@ void HOMARD_Hypothesis_i::AddFieldInterp( const char* FieldInterp )
   ASSERT( myHomardHypothesis );
   myHomardHypothesis->AddFieldInterp( FieldInterp );
 }
-
 //=============================================================================
 void HOMARD_Hypothesis_i::SupprFieldInterp()
 {
   ASSERT( myHomardHypothesis );
   myHomardHypothesis->SupprFieldInterp();
 }
-
 //=============================================================================
 HOMARD::listFieldInterpHypo* HOMARD_Hypothesis_i::GetListFieldInterp()
 {
@@ -360,62 +351,81 @@ HOMARD::listFieldInterpHypo* HOMARD_Hypothesis_i::GetListFieldInterp()
   return aResult._retn();
 }
 //=============================================================================
-void HOMARD_Hypothesis_i::SetNivMax( CORBA::Long NivMax )
-{
-  ASSERT( myHomardHypothesis );
-  myHomardHypothesis->SetNivMax( NivMax );
-}
 //=============================================================================
-CORBA::Long HOMARD_Hypothesis_i::GetNivMax()
+// Liens avec les autres structures
+//=============================================================================
+//=============================================================================
+void HOMARD_Hypothesis_i::SetCaseCreation( const char* NomCaseCreation )
 {
   ASSERT( myHomardHypothesis );
-  return myHomardHypothesis->GetNivMax();
+  myHomardHypothesis->SetCaseCreation( NomCaseCreation );
 }
 //=============================================================================
-void HOMARD_Hypothesis_i::SetDiamMin( CORBA::Double DiamMin )
+char* HOMARD_Hypothesis_i::GetCaseCreation()
 {
   ASSERT( myHomardHypothesis );
-  myHomardHypothesis->SetDiamMin( DiamMin );
+  return CORBA::string_dup( myHomardHypothesis->GetCaseCreation().c_str() );
 }
 //=============================================================================
-CORBA::Double HOMARD_Hypothesis_i::GetDiamMin()
+void HOMARD_Hypothesis_i::LinkIteration( const char* NomIteration )
 {
-  ASSERT( myHomardHypothesis );
-  return myHomardHypothesis->GetDiamMin();
+  ASSERT(myHomardHypothesis);
+  myHomardHypothesis->LinkIteration( NomIteration );
 }
 //=============================================================================
-void HOMARD_Hypothesis_i::SetAdapInit( CORBA::Long AdapInit )
+void HOMARD_Hypothesis_i::UnLinkIteration( const char* NomIteration )
 {
-  ASSERT( myHomardHypothesis );
-  myHomardHypothesis->SetAdapInit( AdapInit );
+  ASSERT(myHomardHypothesis);
+  myHomardHypothesis->UnLinkIteration( NomIteration );
 }
 //=============================================================================
-CORBA::Long HOMARD_Hypothesis_i::GetAdapInit()
+HOMARD::listeIters* HOMARD_Hypothesis_i::GetIterations()
 {
-  ASSERT( myHomardHypothesis );
-  return myHomardHypothesis->GetAdapInit();
+  ASSERT(myHomardHypothesis);
+  const std::list<std::string>& ListString = myHomardHypothesis->GetIterations();
+  HOMARD::listeIters_var aResult = new HOMARD::listeIters;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
 }
 //=============================================================================
-void HOMARD_Hypothesis_i::SetLevelOutput( CORBA::Long LevelOutput )
+void  HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse )
 {
+  MESSAGE ("Dans AddZone pour " << NomZone) ;
   ASSERT( myHomardHypothesis );
-  myHomardHypothesis->SetLevelOutput( LevelOutput );
+  char* NomHypo = GetName() ;
+  return _gen_i->AssociateHypoZone(NomHypo, NomZone, TypeUse) ;
 }
 //=============================================================================
-CORBA::Long HOMARD_Hypothesis_i::GetLevelOutput()
+void  HOMARD_Hypothesis_i::AddZone0( const char* NomZone, CORBA::Long TypeUse )
 {
+  MESSAGE ("Dans AddZone0 pour " << NomZone) ;
   ASSERT( myHomardHypothesis );
-  return myHomardHypothesis->GetLevelOutput();
+  myHomardHypothesis->AddZone( NomZone, TypeUse );
 }
-
 //=============================================================================
-std::string HOMARD_Hypothesis_i::Dump() const
+void  HOMARD_Hypothesis_i::SupprZone(const char * NomZone)
 {
-  return HOMARD::Dump( *myHomardHypothesis );
+  ASSERT(myHomardHypothesis);
+  myHomardHypothesis->SupprZone( NomZone);
 }
-
 //=============================================================================
-bool HOMARD_Hypothesis_i::Restore( const std::string& stream )
+HOMARD::listeZonesHypo* HOMARD_Hypothesis_i::GetZones()
 {
-  return HOMARD::Restore( *myHomardHypothesis, stream );
+  ASSERT(myHomardHypothesis);
+  const std::list<std::string>& ListString = myHomardHypothesis->GetZones();
+  HOMARD::listeZonesHypo_var aResult = new HOMARD::listeZonesHypo;
+  aResult->length( ListString.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = ListString.begin(); it != ListString.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
 }
index 30c898a5a5dd42d6ec102ff3d02ba6c887c3e558..2c92b62da053fb8c97737cb685837340ff5cbfc8 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_HYPOTHESIS_I_HXX_
 #define _HOMARD_HYPOTHESIS_I_HXX_
@@ -43,59 +52,73 @@ public:
 
   virtual ~HOMARD_Hypothesis_i();
 
-  void                         SetName( const char* Name );
-  char*                        GetName();
-  void                         SetCaseCreation( const char* NomCaseCreation );
-  char*                        GetCaseCreation();
-  char*                        GetDumpPython();
-
-  void                         SetAdapRefinUnRef( CORBA::Long TypeAdap, CORBA::Long TypeRaff, CORBA::Long TypeDera );
-  HOMARD::listeTypes*          GetAdapRefinUnRef();
-  CORBA::Long                  GetAdapType();
-  CORBA::Long                  GetRefinType();
-  CORBA::Long                  GetUnRefType();
-
-  void                         SetField( const char* FieldName );
-  char*                        GetFieldName();
-  void                         SetRefinThr(CORBA::Long TypeThR, CORBA::Double ThreshR);
-  CORBA::Long                  GetRefinThrType();
-  void                         SetUnRefThr(CORBA::Long TypeThC, CORBA::Double ThreshC);
-  CORBA::Long                  GetUnRefThrType();
-  void                         SetUseComp(CORBA::Long UsCmpI);
-  void                         SetUseField(CORBA::Long UsField);
-  HOMARD::InfosHypo*           GetField();
-
-  void                         AddIteration( const char* NomIteration );
-  void                         AddZone( const char* NomZone, CORBA::Long TypeUse );
-  void                         SupprZone( const char* NomZone );
-  void                         AddComp( const char* NomComposant );
-  void                         SupprComp();
+// Generalites
+  void                   SetName( const char* Name );
+  char*                  GetName();
+
+  CORBA::Long            Delete();
+
+  char*                  GetDumpPython();
+
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
+
+// Caracteristiques
+  void                   SetAdapRefinUnRef( CORBA::Long TypeAdap, CORBA::Long TypeRaff, CORBA::Long TypeDera );
+  HOMARD::listeTypes*    GetAdapRefinUnRef();
+  CORBA::Long            GetAdapType();
+  CORBA::Long            GetRefinType();
+  CORBA::Long            GetUnRefType();
+
+  void                   SetField( const char* FieldName );
+  char*                  GetFieldName();
+  void                   SetUseField(CORBA::Long UsField);
+  HOMARD::InfosHypo*     GetField();
 
+  void                   SetUseComp(CORBA::Long UsCmpI);
+  void                   AddComp( const char* NomComposant );
+  void                   SupprComp();
   HOMARD::listeComposantsHypo* GetListComp();
-  HOMARD::listeIters*          GetIterations();
-  HOMARD::listeZonesHypo*      GetZones();
 
-  void                         AddGroup( const char* Group);
-  void                         SetGroups(const HOMARD::ListGroupType& ListGroup);
-  HOMARD::ListGroupType*       GetGroups();
+  void                   SetRefinThr(CORBA::Long TypeThR, CORBA::Double ThreshR);
+  CORBA::Long            GetRefinThrType();
+  void                   SetUnRefThr(CORBA::Long TypeThC, CORBA::Double ThreshC);
+  CORBA::Long            GetUnRefThrType();
 
-  void                         SetTypeFieldInterp( CORBA::Long TypeFieldInterp );
-  CORBA::Long                  GetTypeFieldInterp();
-  void                         AddFieldInterp( const char* FieldInterp );
-  void                         SupprFieldInterp();
+  void                   SetNivMax( CORBA::Long NivMax );
+  CORBA::Long            GetNivMax();
+
+  void                   SetDiamMin( CORBA::Double DiamMin );
+  CORBA::Double          GetDiamMin();
+
+  void                   SetAdapInit( CORBA::Long AdapInit );
+  CORBA::Long            GetAdapInit();
+
+  void                   SetLevelOutput( CORBA::Long LevelOutput );
+  CORBA::Long            GetLevelOutput();
+
+  void                   AddGroup( const char* Group);
+  void                   SetGroups(const HOMARD::ListGroupType& ListGroup);
+  HOMARD::ListGroupType* GetGroups();
+
+  void                   SetTypeFieldInterp( CORBA::Long TypeFieldInterp );
+  CORBA::Long            GetTypeFieldInterp();
+  void                   AddFieldInterp( const char* FieldInterp );
+  void                   SupprFieldInterp();
   HOMARD::listFieldInterpHypo* GetListFieldInterp();
 
-  void                         SetNivMax( CORBA::Long NivMax );
-  CORBA::Long                  GetNivMax();
-  void                         SetDiamMin( CORBA::Double DiamMin );
-  CORBA::Double                GetDiamMin();
-  void                         SetAdapInit( CORBA::Long AdapInit );
-  CORBA::Long                  GetAdapInit();
-  void                         SetLevelOutput( CORBA::Long LevelOutput );
-  CORBA::Long                  GetLevelOutput();
-
-  std::string                  Dump() const;
-  bool                         Restore( const std::string& stream );
+// Liens avec les autres structures
+  void                   SetCaseCreation( const char* NomCaseCreation );
+  char*                  GetCaseCreation();
+
+  void                   LinkIteration( const char* NomIteration );
+  void                   UnLinkIteration( const char* NomIteration );
+  HOMARD::listeIters*    GetIterations();
+
+  void                   AddZone( const char* NomZone, CORBA::Long TypeUse );
+  void                   AddZone0( const char* NomZone, CORBA::Long TypeUse );
+  void                   SupprZone( const char* NomZone );
+  HOMARD::listeZonesHypo* GetZones();
 
 private:
   ::HOMARD_Hypothesis*         myHomardHypothesis;
index a5693f3268ecd8c6be49d84eabcc1abb589240c7..295aaccad3e4d07158a5c1bd7cc90692f1116ce0 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #include "HOMARD_Iteration_i.hxx"
 #include "HOMARD_Gen_i.hxx"
@@ -60,286 +69,257 @@ HOMARD_Iteration_i::HOMARD_Iteration_i( CORBA::ORB_ptr orb,
 HOMARD_Iteration_i::~HOMARD_Iteration_i()
 {
 }
-
 //=============================================================================
-/*!
- */
+//=============================================================================
+// Generalites
+//=============================================================================
 //=============================================================================
 void HOMARD_Iteration_i::SetName( const char* Name )
 {
   ASSERT( myHomardIteration );
   myHomardIteration->SetName( Name );
 }
-
 //=============================================================================
 char* HOMARD_Iteration_i::GetName()
 {
   ASSERT( myHomardIteration );
   return CORBA::string_dup( myHomardIteration->GetName().c_str() );
 }
-
+//=============================================================================
+CORBA::Long  HOMARD_Iteration_i::Delete()
+{
+  ASSERT( myHomardIteration );
+  char* IterName = GetName() ;
+  MESSAGE ( "Delete : destruction de l'iteration " << IterName );
+  return _gen_i->DeleteIteration(IterName) ;
+}
 //=============================================================================
 char* HOMARD_Iteration_i::GetDumpPython()
 {
   ASSERT( myHomardIteration );
   return CORBA::string_dup( myHomardIteration->GetDumpPython().c_str() );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetEtat( CORBA::Boolean Etat )
+std::string HOMARD_Iteration_i::Dump() const
 {
-  ASSERT( myHomardIteration );
-  myHomardIteration->SetEtat( Etat );
+  return HOMARD::Dump( *myHomardIteration );
 }
-
 //=============================================================================
-CORBA::Boolean HOMARD_Iteration_i::GetEtat()
+bool HOMARD_Iteration_i::Restore( const std::string& stream )
 {
-  ASSERT( myHomardIteration );
-  return CORBA::Boolean( myHomardIteration->GetEtat());
+  return HOMARD::Restore( *myHomardIteration, stream );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetNumber( CORBA::Long NumIter )
+//=============================================================================
+// Caracteristiques
+//=============================================================================
+//=============================================================================
+void HOMARD_Iteration_i::SetDirName( const char* NomDir )
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetNumber( NumIter );
+  myHomardIteration->SetDirName( NomDir );
 }
-
 //=============================================================================
-CORBA::Long HOMARD_Iteration_i::GetNumber()
+char* HOMARD_Iteration_i::GetDirName()
 {
   ASSERT( myHomardIteration );
-  return  myHomardIteration->GetNumber() ;
+  return CORBA::string_dup( myHomardIteration->GetDirName().c_str() );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetMeshName( const char* NomMesh )
+void HOMARD_Iteration_i::SetNumber( CORBA::Long NumIter )
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetMeshName( NomMesh );
+  myHomardIteration->SetNumber( NumIter );
 }
-
 //=============================================================================
-char* HOMARD_Iteration_i::GetMeshName()
+CORBA::Long HOMARD_Iteration_i::GetNumber()
 {
   ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetMeshName().c_str() );
+  return  myHomardIteration->GetNumber() ;
 }
-
 //=============================================================================
-char* HOMARD_Iteration_i::GetIterParentName()
+void HOMARD_Iteration_i::SetEtat( CORBA::Boolean Etat )
 {
   ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetIterParentName().c_str() );
-
+  myHomardIteration->SetEtat( Etat );
 }
 //=============================================================================
-HOMARD::HOMARD_Iteration_ptr HOMARD_Iteration_i::GetIterParent()
+CORBA::Boolean HOMARD_Iteration_i::GetEtat()
 {
-// Nom de l'iteration parent
-  char* NomIterParent = GetIterParentName() ;
-  MESSAGE ( "GetIterParent : NomIterParent = " << NomIterParent );
-// On passe par la methode sur l'objet HOMARD
-// Il serait plus elegant de tout faire ici, mais il est complexe de passer tout le contexte
-  return _gen_i->GetIteration(NomIterParent) ;
+  ASSERT( myHomardIteration );
+  return CORBA::Boolean( myHomardIteration->GetEtat());
 }
-
-
-
 //=============================================================================
-HOMARD::listeIterFilles* HOMARD_Iteration_i::GetIterations()
+void HOMARD_Iteration_i::SetMeshName( const char* NomMesh )
 {
   ASSERT( myHomardIteration );
-  const std::list<std::string>& maListe = myHomardIteration->GetIterations();
-  HOMARD::listeIterFilles_var aResult = new HOMARD::listeIterFilles;
-  aResult->length( maListe.size() );
-  std::list<std::string>::const_iterator it;
-  int i = 0;
-  for ( it = maListe.begin(); it != maListe.end(); it++ )
-  {
-    aResult[i++] = CORBA::string_dup( (*it).c_str() );
-  }
-  return aResult._retn();
+  myHomardIteration->SetMeshName( NomMesh );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetIterParentName( const char* NomIterParent )
+char* HOMARD_Iteration_i::GetMeshName()
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetIterParentName( NomIterParent );
+  return CORBA::string_dup( myHomardIteration->GetMeshName().c_str() );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::AddIteration( const char* NomIteration )
+void HOMARD_Iteration_i::SetMeshFile( const char* MeshFile )
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->AddIteration( NomIteration );
+  myHomardIteration->SetMeshFile( MeshFile );
 }
-
 //=============================================================================
-HOMARD::HOMARD_Iteration_ptr HOMARD_Iteration_i::NextIteration( const char* IterName )
+char* HOMARD_Iteration_i::GetMeshFile()
 {
-// Nom de l'iteration parent
-  char* NomIterParent = GetName() ;
-  MESSAGE ( "NextIteration : IterName      = " << IterName );
-  MESSAGE ( "NextIteration : NomIterParent = " << NomIterParent );
-// On passe par la methode sur l'objet HOMARD
-// Il serait plus elegant de tout faire ici, mais il est complexe de passer tout le contexte
-  return _gen_i->CreateIteration(IterName, NomIterParent) ;
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetMeshFile().c_str() );
 }
-
-
 //=============================================================================
-CORBA::Long  HOMARD_Iteration_i::Compute(CORBA::Long etatMenage)
+void HOMARD_Iteration_i::SetFieldFile( const char* FieldFile )
 {
-  MESSAGE ( "Compute : calcul d'une iteration" );
   ASSERT( myHomardIteration );
-//
-// Nom de l'iteration
-  char* IterName = GetName() ;
-  MESSAGE ( ". IterName = " << IterName );
-// On passe par la methode sur l'objet HOMARD
-// Il serait plus elegant de tout faire ici, mais il est complexe de passer tout le contexte
-  return _gen_i->Compute(IterName, etatMenage) ;
+  myHomardIteration->SetFieldFile( FieldFile );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetMeshFile( const char* MeshFile )
+char* HOMARD_Iteration_i::GetFieldFile()
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetMeshFile( MeshFile );
+  return CORBA::string_dup( myHomardIteration->GetFieldFile().c_str() );
 }
-
 //=============================================================================
-char* HOMARD_Iteration_i::GetMeshFile()
+void HOMARD_Iteration_i::SetTimeStepRank( CORBA::Long TimeStep, CORBA::Long Rank )
 {
   ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetMeshFile().c_str() );
+  myHomardIteration->SetTimeStepRank( TimeStep, Rank );
 }
-
 //=============================================================================
-char* HOMARD_Iteration_i::GetCaseName()
+CORBA::Long HOMARD_Iteration_i::GetTimeStep()
 {
   ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetCaseName().c_str() );
+  return  CORBA::Long( myHomardIteration->GetTimeStep() );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetCaseName( const char* NomCas )
+CORBA::Long HOMARD_Iteration_i::GetRank()
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetCaseName( NomCas );
+  return  CORBA::Long( myHomardIteration->GetRank() );
 }
-
 //=============================================================================
-char* HOMARD_Iteration_i::GetDirName()
+void HOMARD_Iteration_i::SetMessFile( const char* MessFile )
 {
   ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetDirName().c_str() );
+  myHomardIteration->SetMessFile( MessFile );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetDirName( const char* NomDir )
+char* HOMARD_Iteration_i::GetMessFile()
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetDirName( NomDir );
+  return CORBA::string_dup( myHomardIteration->GetMessFile().c_str() );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::AssociateHypo( const char* NomHypo )
+CORBA::Long  HOMARD_Iteration_i::Compute(CORBA::Long etatMenage)
 {
+  MESSAGE ( "Compute : calcul d'une iteration" );
   ASSERT( myHomardIteration );
 //
 // Nom de l'iteration
   char* IterName = GetName() ;
-  MESSAGE ( ". IterName = " << IterName );
-// On passe par la methode sur l'objet HOMARD
-// Il serait plus elegant de tout faire ici, mais il est complexe de passer tout le contexte
-  return _gen_i->AssociateIterHypo(IterName, NomHypo) ;
+  MESSAGE ( "Compute : calcul de l'teration " << IterName );
+  return _gen_i->Compute(IterName, etatMenage) ;
 }
-
 //=============================================================================
-char* HOMARD_Iteration_i::GetHypoName()
+//=============================================================================
+// Liens avec les autres iterations
+//=============================================================================
+//=============================================================================
+HOMARD::HOMARD_Iteration_ptr HOMARD_Iteration_i::NextIteration( const char* IterName )
 {
-  ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetHypoName().c_str() );
+// Nom de l'iteration parent
+  char* NomIterParent = GetName() ;
+  MESSAGE ( "NextIteration : creation de l'iteration " << IterName << " comme fille de " << NomIterParent );
+  return _gen_i->CreateIteration(IterName, NomIterParent) ;
 }
-
-//=============================================================================
-// HOMARD::HOMARD_Hypothesis_ptr HOMARD_Iteration_i::GetHypo()
-// {
-// // Nom de l'hypothese
-//   char* NomHypo = GetHypoName() ;
-//   MESSAGE ( "GetHypo : NomHypo = " << NomHypo );
-// // On passe par la methode sur l'objet HOMARD
-// // Il serait plus elegant de tout faire ici, mais il est complexe de passer tout le contexte
-//   return _gen_i->GetHypothesis(NomHypo) ;
-// }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetHypoName( const char* NomHypo )
+void HOMARD_Iteration_i::LinkNextIteration( const char* NomIteration )
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetHypoName( NomHypo );
+  myHomardIteration->LinkNextIteration( NomIteration );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetFieldFile( const char* FieldFile )
+void HOMARD_Iteration_i::UnLinkNextIteration( const char* NomIteration )
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetFieldFile( FieldFile );
+  myHomardIteration->UnLinkNextIteration( NomIteration );
 }
-
 //=============================================================================
-char* HOMARD_Iteration_i::GetFieldFile()
+HOMARD::listeIterFilles* HOMARD_Iteration_i::GetIterations()
 {
   ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetFieldFile().c_str() );
+  const std::list<std::string>& maListe = myHomardIteration->GetIterations();
+  HOMARD::listeIterFilles_var aResult = new HOMARD::listeIterFilles;
+  aResult->length( maListe.size() );
+  std::list<std::string>::const_iterator it;
+  int i = 0;
+  for ( it = maListe.begin(); it != maListe.end(); it++ )
+  {
+    aResult[i++] = CORBA::string_dup( (*it).c_str() );
+  }
+  return aResult._retn();
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetTimeStepRank( CORBA::Long TimeStep, CORBA::Long Rank )
+void HOMARD_Iteration_i::SetIterParentName( const char* NomIterParent )
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetTimeStepRank( TimeStep, Rank );
+  myHomardIteration->SetIterParentName( NomIterParent );
 }
-
 //=============================================================================
-CORBA::Long HOMARD_Iteration_i::GetTimeStep()
+char* HOMARD_Iteration_i::GetIterParentName()
 {
   ASSERT( myHomardIteration );
-  return  CORBA::Long( myHomardIteration->GetTimeStep() );
+  return CORBA::string_dup( myHomardIteration->GetIterParentName().c_str() );
 }
-
 //=============================================================================
-CORBA::Long HOMARD_Iteration_i::GetRank()
+HOMARD::HOMARD_Iteration_ptr HOMARD_Iteration_i::GetIterParent()
+{
+// Nom de l'iteration parent
+  char* NomIterParent = GetIterParentName() ;
+  MESSAGE ( "GetIterParent : NomIterParent = " << NomIterParent );
+  return _gen_i->GetIteration(NomIterParent) ;
+}
+//=============================================================================
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
+//=============================================================================
+void HOMARD_Iteration_i::SetCaseName( const char* NomCas )
 {
   ASSERT( myHomardIteration );
-  return  CORBA::Long( myHomardIteration->GetRank() );
+  myHomardIteration->SetCaseName( NomCas );
 }
-
 //=============================================================================
-void HOMARD_Iteration_i::SetMessFile( const char* MessFile )
+char* HOMARD_Iteration_i::GetCaseName()
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetMessFile( MessFile );
+  return CORBA::string_dup( myHomardIteration->GetCaseName().c_str() );
 }
-
 //=============================================================================
-char* HOMARD_Iteration_i::GetMessFile()
+void HOMARD_Iteration_i::AssociateHypo( const char* NomHypo )
 {
   ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetMessFile().c_str() );
+//
+// Nom de l'iteration
+  char* IterName = GetName() ;
+  MESSAGE ( ". IterName = " << IterName );
+  return _gen_i->AssociateIterHypo(IterName, NomHypo) ;
 }
 //=============================================================================
-std::string HOMARD_Iteration_i::Dump() const
+void HOMARD_Iteration_i::SetHypoName( const char* NomHypo )
 {
-  return HOMARD::Dump( *myHomardIteration );
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetHypoName( NomHypo );
 }
-
 //=============================================================================
-bool HOMARD_Iteration_i::Restore( const std::string& stream )
+char* HOMARD_Iteration_i::GetHypoName()
 {
-  return HOMARD::Restore( *myHomardIteration, stream );
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetHypoName().c_str() );
 }
index f15cfa2fbb76cee00badbe774b36c7d39b44ab26..0b9b807b68eb1dab98c0ae07abaee709fb1511fa 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_ITERATION_I_HXX_
 #define _HOMARD_ITERATION_I_HXX_
@@ -44,21 +53,27 @@ public:
 
   virtual ~HOMARD_Iteration_i();
 
+// Generalites
   void                   SetName( const char* Name );
   char*                  GetName();
 
-  HOMARD::HOMARD_Iteration_ptr NextIteration( const char* Name) ;
+  CORBA::Long            Delete();
 
-  void                   SetIterParentName( const char* NomIterParent );
-  char*                  GetIterParentName();
-  HOMARD::HOMARD_Iteration_ptr GetIterParent() ;
+  char*                  GetDumpPython();
 
-  void                   SetEtat( CORBA::Boolean etat );
-  CORBA::Boolean         GetEtat();
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
+
+// Caracteristiques
+  void                   SetDirName( const char* NomDir );
+  char*                  GetDirName();
 
   void                   SetNumber( CORBA::Long NumIter );
   CORBA::Long            GetNumber();
 
+  void                   SetEtat( CORBA::Boolean etat );
+  CORBA::Boolean         GetEtat();
+
   void                   SetMeshName( const char* NomMesh );
   char*                  GetMeshName();
 
@@ -74,27 +89,27 @@ public:
   void                   SetMessFile( const char* MessFile );
   char*                  GetMessFile();
 
-  void                   AddIteration( const char* NomIteration );
+  CORBA::Long            Compute(CORBA::Long etatMenage);
+
+// Liens avec les autres iterations
+  HOMARD::HOMARD_Iteration_ptr NextIteration( const char* Name) ;
+
+  void                   LinkNextIteration( const char* NomIteration );
+  void                   UnLinkNextIteration( const char* NomIteration );
   HOMARD::listeIterFilles* GetIterations();
 
+  void                   SetIterParentName( const char* NomIterParent );
+  char*                  GetIterParentName();
+  HOMARD::HOMARD_Iteration_ptr GetIterParent() ;
+
+// Liens avec les autres structures
   void                   SetCaseName( const char* NomCas );
   char*                  GetCaseName();
 
-  void                   SetDirName( const char* NomDir );
-  char*                  GetDirName();
-
   void                   AssociateHypo( const char* NomHypo);
-
   void                   SetHypoName( const char* NomHypo );
   char*                  GetHypoName();
 
-  CORBA::Long            Compute(CORBA::Long etatMenage);
-
-  std::string            Dump() const;
-  bool                   Restore( const std::string& stream );
-
-  char*                  GetDumpPython();
-
 private:
   ::HOMARD_Iteration*    myHomardIteration;
 
index b7774231e266222c744731cb68a0ac851b1ed067..c794bd84520d6f081c6bfb6f27e6d53492d0c01b 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #include "HOMARD_Zone_i.hxx"
 #include "HOMARD_Gen_i.hxx"
@@ -58,74 +67,68 @@ HOMARD_Zone_i::HOMARD_Zone_i( CORBA::ORB_ptr orb,
 HOMARD_Zone_i::~HOMARD_Zone_i()
 {
 }
-
 //=============================================================================
-/*!
- */
+//=============================================================================
+// Generalites
+//=============================================================================
 //=============================================================================
 void HOMARD_Zone_i::SetName( const char* Name )
 {
   ASSERT( myHomardZone );
   myHomardZone->SetName( Name );
 }
-
 //=============================================================================
 char* HOMARD_Zone_i::GetName()
 {
   ASSERT( myHomardZone );
   return CORBA::string_dup( myHomardZone->GetName().c_str() );
 }
-
+//=============================================================================
+CORBA::Long  HOMARD_Zone_i::Delete()
+{
+  ASSERT( myHomardZone );
+  char* ZoneName = GetName() ;
+  MESSAGE ( "Delete : destruction de la zonee " << ZoneName );
+  return _gen_i->DeleteZone(ZoneName) ;
+}
 //=============================================================================
 char* HOMARD_Zone_i::GetDumpPython()
 {
   ASSERT( myHomardZone );
   return CORBA::string_dup( myHomardZone->GetDumpPython().c_str() );
 }
-
-
 //=============================================================================
-void HOMARD_Zone_i::SetType( CORBA::Long Type )
+std::string HOMARD_Zone_i::Dump() const
 {
-  ASSERT( myHomardZone );
-  myHomardZone->SetType( Type );
+  return HOMARD::Dump( *myHomardZone );
 }
-
 //=============================================================================
-CORBA::Long HOMARD_Zone_i::GetType()
+bool HOMARD_Zone_i::Restore( const std::string& stream )
 {
-  ASSERT( myHomardZone );
-  return  CORBA::Long( myHomardZone->GetType() );
+  return HOMARD::Restore( *myHomardZone, stream );
 }
-
 //=============================================================================
-void HOMARD_Zone_i::SetBox( double X0, double X1, double X2, double X3, double X4, double X5 )
+//=============================================================================
+// Caracteristiques
+//=============================================================================
+//=============================================================================
+void HOMARD_Zone_i::SetType( CORBA::Long Type )
 {
   ASSERT( myHomardZone );
-  myHomardZone->SetBox( X0, X1, X2, X3, X4, X5 );
+  myHomardZone->SetType( Type );
 }
-
 //=============================================================================
-HOMARD::double_array* HOMARD_Zone_i::GetCoords()
+CORBA::Long HOMARD_Zone_i::GetType()
 {
   ASSERT( myHomardZone );
-  HOMARD::double_array_var aResult = new HOMARD::double_array();
-  std::vector<double> mesCoor = myHomardZone->GetCoords();
-  aResult->length( mesCoor .size() );
-  std::vector<double>::const_iterator it;
-  int i = 0;
-  for ( it = mesCoor.begin(); it != mesCoor.end(); it++ )
-    aResult[i++] = (*it);
-  return aResult._retn();
+  return  CORBA::Long( myHomardZone->GetType() );
 }
-
 //=============================================================================
-void HOMARD_Zone_i::SetSphere( double Xcentre, double Ycentre, double Zcentre, double Rayon )
+void HOMARD_Zone_i::SetBox( double X0, double X1, double X2, double X3, double X4, double X5 )
 {
   ASSERT( myHomardZone );
-  myHomardZone->SetSphere( Xcentre, Ycentre, Zcentre, Rayon );
+  myHomardZone->SetBox( X0, X1, X2, X3, X4, X5 );
 }
-
 //=============================================================================
 void HOMARD_Zone_i::SetCylinder( double Xcentre, double Ycentre, double Zcentre,
                                  double Xaxis, double Yaxis, double Zaxis,
@@ -142,7 +145,25 @@ void HOMARD_Zone_i::SetPipe( double Xcentre, double Ycentre, double Zcentre,
   ASSERT( myHomardZone );
   myHomardZone->SetPipe( Xcentre, Ycentre, Zcentre, Xaxis, Yaxis, Zaxis, Rayon, Haut, Rayonint );
 }
-
+//=============================================================================
+void HOMARD_Zone_i::SetSphere( double Xcentre, double Ycentre, double Zcentre, double Rayon )
+{
+  ASSERT( myHomardZone );
+  myHomardZone->SetSphere( Xcentre, Ycentre, Zcentre, Rayon );
+}
+//=============================================================================
+HOMARD::double_array* HOMARD_Zone_i::GetCoords()
+{
+  ASSERT( myHomardZone );
+  HOMARD::double_array_var aResult = new HOMARD::double_array();
+  std::vector<double> mesCoor = myHomardZone->GetCoords();
+  aResult->length( mesCoor .size() );
+  std::vector<double>::const_iterator it;
+  int i = 0;
+  for ( it = mesCoor.begin(); it != mesCoor.end(); it++ )
+    aResult[i++] = (*it);
+  return aResult._retn();
+}
 //=============================================================================
 void HOMARD_Zone_i::SetLimit( double Xincr, double Yincr, double Zincr )
 {
@@ -150,7 +171,6 @@ void HOMARD_Zone_i::SetLimit( double Xincr, double Yincr, double Zincr )
   ASSERT( myHomardZone );
   myHomardZone->SetLimit( Xincr, Yincr, Zincr );
 }
-
 //=============================================================================
 HOMARD::double_array* HOMARD_Zone_i::GetLimit()
 {
@@ -164,21 +184,16 @@ HOMARD::double_array* HOMARD_Zone_i::GetLimit()
     aResult[i++] = (*it);
   return aResult._retn();
 }
-
+//=============================================================================
+//=============================================================================
+// Liens avec les autres structures
+//=============================================================================
 //=============================================================================
 void HOMARD_Zone_i::AddHypo( const char* NomHypo )
 {
   MESSAGE ( " AddHypo, NomHypo= " << NomHypo);
   ASSERT( myHomardZone );
   myHomardZone->AddHypo( NomHypo );
-  MESSAGE ( " FIn de AddHypo");
-}
-
-//=============================================================================
-void HOMARD_Zone_i::SupprHypo( const char* NomHypo )
-{
-  ASSERT( myHomardZone );
-  myHomardZone->SupprHypo( NomHypo );
 }
 //=============================================================================
 HOMARD::listeHypo* HOMARD_Zone_i::GetHypo()
@@ -193,15 +208,10 @@ HOMARD::listeHypo* HOMARD_Zone_i::GetHypo()
     aResult[i++] = CORBA::string_dup( (*it).c_str() );
   return aResult._retn();
 }
-
 //=============================================================================
-std::string HOMARD_Zone_i::Dump() const
+void HOMARD_Zone_i::SupprHypo( const char* NomHypo )
 {
-  return HOMARD::Dump( *myHomardZone );
+  ASSERT( myHomardZone );
+  myHomardZone->SupprHypo( NomHypo );
 }
 
-//=============================================================================
-bool HOMARD_Zone_i::Restore( const std::string& stream )
-{
-  return HOMARD::Restore( *myHomardZone, stream );
-}
index 33d4a0c7cd5627096fe8807148653d67218d0b41..e792e1bb622f6860fc310e1a1204591cd156cf9b 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
+//
 
 #ifndef _HOMARD_Zone_I_HXX_
 #define _HOMARD_Zone_I_HXX_
@@ -43,38 +52,45 @@ public:
 
   virtual ~HOMARD_Zone_i();
 
+// Generalites
   void                   SetName( const char* Name );
   char*                  GetName();
+
+  CORBA::Long            Delete();
+
   char*                  GetDumpPython();
 
-  void                   SetType( CORBA::Long Type );
+  std::string            Dump() const;
+  bool                   Restore( const std::string& stream );
 
+// Caracteristiques
+  void                   SetType( CORBA::Long Type );
   CORBA::Long            GetType();
 
-  HOMARD::double_array*  GetCoords();
   void                   SetBox( double Xmini, double Xmaxi,
                                  double Ymini, double Ymaxi,
                                  double Zmini, double Zmaxi );
 
-  void                   SetSphere( double Xcentre, double Ycentre, double ZCentre,
-                                    double Rayon );
-
   void                   SetCylinder( double Xcentre, double Ycentre, double ZCentre,
                                       double Xaxis, double Yaxis, double Zaxis,
                                       double Rayon, double Haut );
+
   void                   SetPipe( double Xcentre, double Ycentre, double ZCentre,
                                   double Xaxis, double Yaxis, double Zaxis,
                                   double Rayon, double Haut, double Rayonint );
 
-  HOMARD::double_array*  GetLimit();
+  void                   SetSphere( double Xcentre, double Ycentre, double ZCentre,
+                                    double Rayon );
+
+  HOMARD::double_array*  GetCoords();
+
   void                   SetLimit( double Xincr, double Yincr, double Zincr);
+  HOMARD::double_array*  GetLimit();
 
+// Liens avec les autres structures
   void                   AddHypo( const char *NomHypo );
-  void                   SupprHypo( const char *NomHypo );
   HOMARD::listeHypo*     GetHypo();
-
-  std::string            Dump() const;
-  bool                   Restore( const std::string& stream );
+  void                   SupprHypo( const char *NomHypo );
 
 private:
   ::HOMARD_Zone*         myHomardZone;
index 8aab75c352fb6c724f0553d693f2338228b1709e..ded97622be2b538ae974799090d8fcb289ef2900 100644 (file)
 #include <cstring>
 #include <algorithm>
 
-extern "C" 
+extern "C"
 {
 #include <med.h>
 }
 
 #include "utilities.h"
 // =======================================================================
+int MEDFileExist( const char * aFile )
+// Retourne 1 si le fichier existe, 0 sinon
+// =======================================================================
+{
+  int existe ;
+  med_idt medIdt = MEDfileOpen(aFile,MED_ACC_RDONLY);
+  if ( medIdt < 0 ) { existe = 0 ; }
+  else              { MEDfileClose(medIdt);
+                      existe = 1 ; }
+  return existe ;
+}
+// =======================================================================
 std::set<std::string> GetListeGroupesInMedFile(const char * aFile)
 // =======================================================================
 {
@@ -64,15 +76,15 @@ std::set<std::string> GetListeGroupesInMedFile(const char * aFile)
                           axisname,
                           axisunit);
    if ( aRet < 0 ) { return ListeGroupes; };
-   
+
    med_int nfam, ngro, natt;
    if ((nfam = MEDnFamily(medIdt,meshname)) < 0) { return ListeGroupes; };
-   
+
   char familyname[MED_NAME_SIZE+1];
   med_int numfam;
-  for (int i=0;i<nfam;i++) 
+  for (int i=0;i<nfam;i++)
   {
-    if ((ngro = MEDnFamilyGroup(medIdt,meshname,i+1)) < 0) 
+    if ((ngro = MEDnFamilyGroup(medIdt,meshname,i+1)) < 0)
     {
       // GERALD -- QMESSAGE BOX
       std::cerr << " Error : Families are unreadable" << std::endl;
@@ -81,7 +93,7 @@ std::set<std::string> GetListeGroupesInMedFile(const char * aFile)
     }
     if (ngro == 0) continue;
 
-    if ((natt = MEDnFamily23Attribute(medIdt,meshname,i+1)) < 0) 
+    if ((natt = MEDnFamily23Attribute(medIdt,meshname,i+1)) < 0)
     {
       // GERALD -- QMESSAGE BOX
       std::cerr << " Error : Families are unreadable" << std::endl;
@@ -93,7 +105,7 @@ std::set<std::string> GetListeGroupesInMedFile(const char * aFile)
     med_int* attval = (med_int*) malloc(sizeof(med_int)*natt);
     char*    attdes = (char *)   malloc(MED_COMMENT_SIZE*natt+1);
     char*    gro    = (char*)    malloc(MED_LNAME_SIZE*ngro+1);
-    
+
     med_err aRet = MEDfamily23Info(medIdt,
                                 meshname,
                                 i+1,
@@ -103,9 +115,9 @@ std::set<std::string> GetListeGroupesInMedFile(const char * aFile)
                                 attdes,
                                 &numfam,
                                 gro);
-    
-    if (aRet < 0) 
-    { 
+
+    if (aRet < 0)
+    {
       // GERALD -- QMESSAGE BOX
       std::cerr << " Error : Families are unreadable" << std::endl;
       std::cerr << "Pb avec la famille : " << i+1 << std::endl;
@@ -116,7 +128,7 @@ std::set<std::string> GetListeGroupesInMedFile(const char * aFile)
     free(attdes);
     if ((numfam )> 0) { continue;} // On ne garde que les familles d elts
 
-    for (int j=0;j<ngro;j++) 
+    for (int j=0;j<ngro;j++)
     {
           char str2[MED_LNAME_SIZE+1];
           strncpy(str2,gro+j*MED_LNAME_SIZE,MED_LNAME_SIZE);
@@ -140,10 +152,10 @@ std::vector<double> GetBoundingBoxInMedFile(const char * aFile)
 //  9 distance max dans le maillage
 
    std::vector<double> LesExtremes;
-   
+
    // Ouverture du Fichier Med
    med_idt medIdt = MEDfileOpen(aFile,MED_ACC_RDONLY);
-   if (medIdt <0) 
+   if (medIdt <0)
    {
           // GERALD -- QMESSAGE BOX
           std::cerr << "Error : mesh is unreadable" << std::endl;
@@ -153,7 +165,7 @@ std::vector<double> GetBoundingBoxInMedFile(const char * aFile)
                                 // Le fichier Med est lisible
     // Boucle sur les noms de maillage
    med_int numberOfMeshes = MEDnMesh(medIdt) ;
-   if (numberOfMeshes != 1 ) 
+   if (numberOfMeshes != 1 )
    {
           // GERALD -- QMESSAGE BOX
           std::cerr << "Error : file contains more than one mesh" << std::endl;
@@ -185,7 +197,7 @@ std::vector<double> GetBoundingBoxInMedFile(const char * aFile)
                           axisname,
                           axisunit);
 
-   if (aRet < 0) 
+   if (aRet < 0)
    {
           // GERALD -- QMESSAGE BOX
           std::cerr << "Error : mesh is unreadable" << std::endl;
@@ -203,7 +215,7 @@ std::vector<double> GetBoundingBoxInMedFile(const char * aFile)
                             MED_NO_CMODE,
                             &chgt,
                             &trsf);
-   if ( nnoe < 0) 
+   if ( nnoe < 0)
    {
           // GERALD -- QMESSAGE BOX
           std::cerr << "Error : mesh is unreadable" << std::endl;
@@ -218,7 +230,7 @@ std::vector<double> GetBoundingBoxInMedFile(const char * aFile)
                                       MED_NO_IT,
                                       MED_NO_INTERLACE,
                                       coo);
-   if ( aRet < 0) 
+   if ( aRet < 0)
    {
           // GERALD -- QMESSAGE BOX
           std::cerr << "Error : mesh coordinates are unreadable" << std::endl;
@@ -226,7 +238,7 @@ std::vector<double> GetBoundingBoxInMedFile(const char * aFile)
    }
 
    med_float xmin,xmax,ymin,ymax,zmin,zmax;
-   
+
    xmin=coo[0];
    xmax=coo[0];
    for (int i=1;i<nnoe;i++)
index e6bac47dd8d75266e1be0c38982702d87835106a..a501a7b1b9ee97c146e9f7a77519dd7ded20bcc4 100644 (file)
@@ -24,6 +24,7 @@
 #include <set>
 #include <string>
 
+int                    MEDFileExist( const char * aFile );
 std::vector<double>    GetBoundingBoxInMedFile( const char * aFile);
 std::set<std::string>  GetListeGroupesInMedFile(const char * aFile);
 
index 71e7dac82df85ca95f1d81807dec9cf930514e8d..7f7801d6d505297bddeed1a37549db9f2fb9d547 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2013
 Test test_1
 """
-__revision__ = "V1.7"
+__revision__ = "V1.8"
 
 #========================================================================
 Test_Name = "test_1"
@@ -166,9 +166,8 @@ except Exception, e:
 #
 # Test of the result
 #
-s_iter_test_file = str(n_iter_test_file)
-test_file_suff = "apad.0" + s_iter_test_file + ".bilan"
-rep_test_file = "I0" + s_iter_test_file
+test_file_suff = "apad.%02d.bilan" % n_iter_test_file
+rep_test_file = "I%02d" % n_iter_test_file
 #
 test_file = os.path.join(Rep_Test, Test_Name + "." + test_file_suff)
 mess_error_ref = "\nReference file: " + test_file
index d6dd949a117ad181be30b6ca1a6e8034f6dbc257..d5ac783ff0b71ef514918d80cb2f0052d391e622 100644 (file)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2013
 Test test_2
 """
-__revision__ = "V1.6"
+__revision__ = "V1.7"
 
 #========================================================================
 Test_Name = "test_2"
@@ -154,9 +154,8 @@ except Exception, e:
 #
 # Test of the result
 #
-s_iter_test_file = str(n_iter_test_file)
-test_file_suff = "apad.0" + s_iter_test_file + ".bilan"
-rep_test_file = "I0" + s_iter_test_file
+test_file_suff = "apad.%02d.bilan" % n_iter_test_file
+rep_test_file = "I%02d" % n_iter_test_file
 #
 test_file = os.path.join(Rep_Test, Test_Name + "." + test_file_suff)
 mess_error_ref = "\nReference file: " + test_file
index 36a9e8e32f56ed409f067c4e50b40f923ca4c6d9..e977157c711e7d860650d80af73177e54dfcae31 100644 (file)
@@ -22,10 +22,11 @@ Python script for HOMARD
 Copyright EDF-R&D 2011, 2013
 Test test_3
 """
-__revision__ = "V1.4"
+__revision__ = "V1.5"
 
 #========================================================================
 Test_Name = "test_3"
+n_boucle = 2
 n_iter_test_file = 2
 #========================================================================
 import os
@@ -110,27 +111,46 @@ Copyright EDF-R&D 2010, 2013
     Case_1.AddBoundaryGroup('sphere_1', 'END_1')
     Case_1.AddBoundaryGroup('sphere_2', 'END_2')
 #
-# Creation of the iterations
-# ==========================
-# Creation of the iteration Iter_1
-    Iter_1 = Case_1.NextIteration('Iter_1')
-    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)
-    if error :
-      error = 1
-      break
+# Creation and destruction of the iterations
+# ==========================================
+#
+    for iaux in range (n_boucle+1) :
+#
+  # Creation of the iteration Iter_1
+      Iter_1 = Case_1.NextIteration('Iter_1')
+      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)
+      if error :
+        error = 10*iaux + 1
+        break
+
+  # Creation of the iteration Iter_2
+      Iter_2 = Iter_1.NextIteration('Iter_2')
+      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)
+      if error :
+        error = 10*iaux + 2
+        break
 
-# Creation of the iteration Iter_2
-    Iter_2 = Iter_1.NextIteration('Iter_2')
-    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)
-    if error :
-      error = 2
-      break
+  # Destruction
+      if ( iaux < n_boucle ) :
+  # Recursive destruction of the iterations
+        error = Iter_1.Delete()
+        if error :
+          error = 10*iaux + 3
+          break
+  # Destruction and creation of the hypothese
+        if ( iaux == 1 ) :
+          error = Hypo.Delete()
+          if error :
+            error = 10*iaux + 4
+            break
+          Hypo = homard.CreateHypothesis('Hypo')
+          Hypo.SetAdapRefinUnRef(-1, 1, 0)
 #
     break
 #
@@ -154,9 +174,8 @@ except Exception, e:
 #
 # Test of the result
 #
-s_iter_test_file = str(n_iter_test_file)
-test_file_suff = "apad.0" + s_iter_test_file + ".bilan"
-rep_test_file = "I0" + s_iter_test_file
+test_file_suff = "apad.%02d.bilan" % n_iter_test_file
+rep_test_file = "I%02d" % (n_iter_test_file*(n_boucle+1))
 #
 test_file = os.path.join(Rep_Test, Test_Name + "." + test_file_suff)
 mess_error_ref = "\nReference file: " + test_file