Salome HOME
Introduction of informations on the meshes
authornicolas <nicolas>
Mon, 25 Feb 2013 09:20:38 +0000 (09:20 +0000)
committernicolas <nicolas>
Mon, 25 Feb 2013 09:20:38 +0000 (09:20 +0000)
50 files changed:
doc/Makefile.am
doc/conf.py.in
doc/gui_create_case.rst
doc/gui_homard.rst
doc/gui_mesh_info.rst [new file with mode: 0644]
doc/gui_usage.rst
doc/images/intro_37.png
doc/images/intro_40.png
doc/images/lancement_1.png
doc/images/lancement_2.png
doc/images/lancement_3.png
doc/images/mesh_info_1.png [new file with mode: 0644]
doc/images/mesh_info_2.png [new file with mode: 0644]
doc/images/mesh_info_3.png [new file with mode: 0644]
doc/images/mesh_info_4.png [new file with mode: 0644]
doc/images/mesh_info_5.png [new file with mode: 0644]
doc/intro.rst
doc/tui_create_case.rst
doc/tui_create_iteration.rst
idl/HOMARD_Cas.idl
idl/HOMARD_Gen.idl
idl/HOMARD_Iteration.idl
resources/Makefile.am
resources/advanced_mesh_info.png [new file with mode: 0644]
src/HOMARD/HOMARD_DriverTools.cxx
src/HOMARD/HOMARD_Iteration.cxx
src/HOMARD/HOMARD_Iteration.hxx
src/HOMARD/HomardDriver.cxx
src/HOMARD/HomardDriver.hxx
src/HOMARDGUI/HOMARDGUI.cxx
src/HOMARDGUI/HOMARDGUI.h
src/HOMARDGUI/HOMARDGUI_Utils.cxx
src/HOMARDGUI/HOMARDGUI_Utils.h
src/HOMARDGUI/HOMARD_msg_en.ts
src/HOMARDGUI/HOMARD_msg_fr.ts
src/HOMARDGUI/IterInfo.h [new file with mode: 0644]
src/HOMARDGUI/IterInfo.ui [new file with mode: 0644]
src/HOMARDGUI/Makefile.am
src/HOMARDGUI/MeshInfo.h [new file with mode: 0644]
src/HOMARDGUI/MeshInfo.ui [new file with mode: 0644]
src/HOMARDGUI/MonIterInfo.cxx [new file with mode: 0644]
src/HOMARDGUI/MonIterInfo.h [new file with mode: 0644]
src/HOMARDGUI/MonMeshInfo.cxx [new file with mode: 0644]
src/HOMARDGUI/MonMeshInfo.h [new file with mode: 0644]
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_Iteration_i.cxx
src/HOMARD_I/HOMARD_Iteration_i.hxx

index 5c5c24e92da14a1eb0042100ac6665b26d995ad1..6eae2243c5523b3ba30b7985e6db710680049e07 100644 (file)
@@ -62,6 +62,7 @@ gui_create_iteration.rst \
 gui_create_zone.rst \
 gui_homard.rst \
 gui_usage.rst \
+gui_mesh_info.rst \
 index.rst \
 intro.rst \
 tui_create_boundary.rst \
index 4aa0a92cb8e2b424035a8d2cd15d1a14848ea5ce..c2d218e560d651c88a54246906af2ba70eb63313 100644 (file)
@@ -38,7 +38,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'HOMARD'
-copyright = u'1996, 2011, 2012, EDF R&D, G. Nicolas, T. Fouquet, P. Noyret'
+copyright = u'1996, 2011, 2013, EDF R&D, G. Nicolas, T. Fouquet, P. Noyret'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
index aaac4a777aebb3cafe84ee0996074e633efdcfd9..e1dcac0979ce7e7849dd35c0e243aaf167208860 100644 (file)
@@ -22,7 +22,7 @@ Un nom de cas est propos
 
 Le répertoire
 """""""""""""
-Le répertoire est celui qui contiendra les fichiers produits par les adaptations successives. Ce répertoire doit exister. Par défaut, Salome propose ``/tmp``. Ce choix peut être modifié, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche. C'est dans ce répertoire que seront exportés les maillages au format MED, dans des fichiers de nom ``maill.xx.med``, où ``xx`` est un numéro d'ordre créé automatiquement ; ces noms de fichiers seront visibles dans l'arbre d'études.
+Le répertoire est celui qui contiendra les fichiers produits par les adaptations successives. Par défaut, rien n'est proposé. Le choix est fait, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche. C'est dans ce répertoire que seront exportés les maillages au format MED, dans des fichiers de nom ``maill.xx.med``, où ``xx`` est un numéro d'ordre créé automatiquement. Ces fichiers seront visibles dans l'arbre d'études.
 
 .. image:: images/create_case_2.png
    :align: center
index c4df6439ec75d220f70650dbe4bb0cdb0fe0b715..08f8928c77e883a439bf1663602c956bbeb99d6d 100644 (file)
@@ -12,7 +12,6 @@ Lancer une adaptation s'obtient en s
 .. image:: images/lancement_1.png
    :align: center
 
-
 .. index:: single: arbre d'étude
 
 L'arbre d'étude
@@ -20,11 +19,12 @@ L'arbre d'
 
 A l'issue de ce calcul, l'arbre d'études a été enrichi. L'icone devant l'itération est validée. Sous l'itération, on trouve la référence aux fichiers de résultats créés, identifiés par leur nom dans le répertoire *rep* qui a été défini à la création du cas :
 
-  - *rep*/I(n+1)/Liste.n.vers.(n+1)
+  - *rep*/I(n+1)/Liste.n.vers.(n+1).log
   - *rep*/I(n+1)/apad.n.vers.(n+1).bilan
   - *rep*/maill.(n+1).med
 
-Les deux premiers fichiers sont des fichiers de texte, éditables. Liste.n.vers.(n+1) contient des informations sur le déroulement de l'adaptation : récapitulatif du mode d'adaptation, pourcentage de mailles concernées, etc. Le fichier apad.n.vers.(n+1).bilan est un résumé des caractéristiques du maillage obtenus.
+Les deux premiers fichiers sont des fichiers de texte, éditables. Liste.n.vers.(n+1).log contient des informations sur le déroulement de l'adaptation : récapitulatif du mode d'adaptation, pourcentage de mailles concernées, etc. Le fichier apad.n.vers.(n+1).bilan est un résumé des caractéristiques du maillage obtenu.
+
 Le fichier maill.(n+1).med est celui qui contient le maillage produit au format MED. On retrouve ce maillage dans la section de l'arbre d'études du module SMESH. Il est alors visible dans ce module et utilisable ensuite comme tout autre maillage.
 
 
@@ -33,13 +33,12 @@ Le fichier maill.(n+1).med est celui qui contient le maillage produit au format
 
 Consulter le résultat d'une adaptation
 """"""""""""""""""""""""""""""""""""""
-Les deux fichiers de texte, Liste.n.vers.(n+1) et apad.n.vers.(n+1).bilan, sont visibles en les sélectionnant. On choisit ensuite "*Afficher le fichier*" dans le menu HOMARD ou à la souris.
+Les deux fichiers de texte, Liste.n.vers.(n+1).log et apad.n.vers.(n+1).bilan, sont visibles en les sélectionnant. On choisit ensuite "*Afficher le fichier*" dans le menu HOMARD ou à la souris.
 
 .. image:: images/lancement_3.png
    :align: center
 
 
-
 .. note::
   Par défaut, le calcul est lancé avec l'exécutable de HOMARD installé avec Salome. Si on souhaite utiliser une version privée de HOMARD, pour tester une évolution par exemple, il faut préciser où le nouvel exécutable est disponible. Pour cela, il faut renseigner deux variables d'environnement.
   "*HOMARD_REP_EXE_PRIVATE*" définit le répertoire dans lequel se trouve l'exécutable voulu.
diff --git a/doc/gui_mesh_info.rst b/doc/gui_mesh_info.rst
new file mode 100644 (file)
index 0000000..58b00ca
--- /dev/null
@@ -0,0 +1,92 @@
+.. _gui_mesh_info:
+
+Analyse de maillage
+===================
+.. index:: single: analyse
+.. index:: single: information
+
+La demande d'analyse d'un maillage se fait par la donnée des informations suivantes :
+
+  - Un répertoire
+  - Le fichier du maillage
+
+Si le maillage fait partie d'un cas enregistré, son analyse est faite à partir de son itération dans l'arbre d'études. Voir plus loin.
+
+
+Maillage à importer
+"""""""""""""""""""
+La sélection de la fonction d'analyse est faite par le menu de la barre supérieure de la fenêtre :
+
+.. image:: images/mesh_info_1.png
+   :align: center
+
+La fenêtre de choix s'affiche.
+
+.. image:: images/mesh_info_2.png
+   :align: center
+
+Le nom du cas
+-------------
+Un nom de cas est proposé automatiquement : Case_1, Case_2, etc. Ce nom peut être modifié. Il ne doit pas avoir déjà été utilisé pour un autre cas.
+
+Le répertoire
+-------------
+Le répertoire est celui qui contiendra les fichiers produits par l'information. Par défaut, rien n'est proposé. Le choix est fait, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche. C'est dans ce répertoire que seront exportés les fichiers d'information de nom ``Liste.log`` et ``info_av.00.bilan``. Ces fichiers seront visibles dans l'arbre d'études.
+
+.. image:: images/create_case_2.png
+   :align: center
+
+.. index:: single: maillage;initial
+.. index:: single: MED
+
+Le maillage à analyser
+----------------------
+Le maillage à analyser doit se trouver dans un fichier au format MED. Le nom du fichier peut être fourni, soit en tapant le nom dans la zone de texte, soit en activant la fonction de recherche.
+
+.. image:: images/create_case_3.png
+   :align: center
+
+.. note::
+  Le fichier ne doit contenir qu'un seul maillage.
+
+.. warning::
+  Le maillage ne doit pas être lui-même le produit d'une adaptation de maillage par HOMARD, sous peine de perdre l'analyse des différents niveaux de raffinement/déraffinement
+
+Options d'analyse
+-----------------
+L'analyse est faite selon les options cochées.
+  - qualité des mailles
+  - diamètre des mailles
+  - connexité du domaine ; en un seul morceau, combien de trous, etc.
+  - tailles des constituants du domaine, groupe par groupe
+  - interpénétration des mailles, par dimension
+
+Le résultat de l'analyse est contenu dans le fichier ``info_av.00.bilan`` ; ce fichier est à consulter en l'affichant après sa désignation avec "*Afficher le fichier*" dans le menu HOMARD ou à la souris.
+
+L'arbre d'étude
+---------------
+A l'issue de cette demande d'information, l'arbre d'études a été enrichi de ce nouveau cas. On y trouve l'itération initiale, identifiée par le nom du maillage qui a été lu dans le fichier fourni, et les deux fichiers d'information de nom ``Liste.log`` et ``info_av.00.bilan``.
+
+.. image:: images/mesh_info_3.png
+   :align: center
+
+
+Itération calculée
+""""""""""""""""""
+
+Pour analyser le maillage produit par une itération d'adaptation de maillage, on désigne à la souris cette itération dans l'arbre d'études et on lance l'analyse. On retrouve le menu similaire au cas initial :
+
+.. image:: images/mesh_info_4.png
+   :align: center
+
+Comme pour un maillage importé, l'arbre d'études a été enrichi avec les deux fichiers d'information de nom ``Liste.log`` et ``info_ap.xx.bilan``, où xx est le numéro de l'itération dans le cas.
+
+.. image:: images/mesh_info_5.png
+   :align: center
+
+
+
+Méthodes python correspondantes
+"""""""""""""""""""""""""""""""
+Consulter :ref:`tui_create_case` et :ref:`tui_create_iteration`
+
index 81e7bf599441d68bb46b2cd56f486f44dbcdb975..e36548102389d5e071d9bf4f81bda626c12d8de5 100644 (file)
@@ -35,4 +35,5 @@ Mode d'emploi de la saisie des donn
    gui_create_zone
    gui_create_boundary
    gui_homard
+   gui_mesh_info
 
index c6f7943deb12990895c8f08bb38aeabb563f2b7f..f04c51229b41ef4d333784421e155446e77af338 100644 (file)
Binary files a/doc/images/intro_37.png and b/doc/images/intro_37.png differ
index 36c447a01ccb36b7689b516dbcddfca8319b41b0..88f3077ea0afdc88fa805a1e5e6164d4a823058f 100644 (file)
Binary files a/doc/images/intro_40.png and b/doc/images/intro_40.png differ
index 03b76a9d39464c61350b59636ca436de3bbb17a1..5a7e6cf747ab354d5f74d72c4a16a3b480bbcb0c 100644 (file)
Binary files a/doc/images/lancement_1.png and b/doc/images/lancement_1.png differ
index d5713d51ddf823b88d24c24f61841d2f1ccd60d3..9655bcb1ce1aa32d03510f9876ebf5dd34dd5cf7 100644 (file)
Binary files a/doc/images/lancement_2.png and b/doc/images/lancement_2.png differ
index bd1eb64444cae32697a7fb54a5218e66db9687bf..aef0b242458a233346dae5f26c8e6219517ad6ae 100644 (file)
Binary files a/doc/images/lancement_3.png and b/doc/images/lancement_3.png differ
diff --git a/doc/images/mesh_info_1.png b/doc/images/mesh_info_1.png
new file mode 100644 (file)
index 0000000..044f8dc
Binary files /dev/null and b/doc/images/mesh_info_1.png differ
diff --git a/doc/images/mesh_info_2.png b/doc/images/mesh_info_2.png
new file mode 100644 (file)
index 0000000..9f77229
Binary files /dev/null and b/doc/images/mesh_info_2.png differ
diff --git a/doc/images/mesh_info_3.png b/doc/images/mesh_info_3.png
new file mode 100644 (file)
index 0000000..0419327
Binary files /dev/null and b/doc/images/mesh_info_3.png differ
diff --git a/doc/images/mesh_info_4.png b/doc/images/mesh_info_4.png
new file mode 100644 (file)
index 0000000..ea3ec0c
Binary files /dev/null and b/doc/images/mesh_info_4.png differ
diff --git a/doc/images/mesh_info_5.png b/doc/images/mesh_info_5.png
new file mode 100644 (file)
index 0000000..e885f4c
Binary files /dev/null and b/doc/images/mesh_info_5.png differ
index c13379116552aae2a9853ab4b2a917541c98594f..0eff3eacd40513c85a2ed008ba0a0aa8494d1c59 100644 (file)
@@ -95,7 +95,12 @@ La premi
 .. image:: images/homard_1.png
    :align: center
 
-Une fois le module HOMARD activé, on crée un cas par le choix "*Nouveau cas*" dans le menu HOMARD. La fenêtre suivante apparaît :
+Une fois le module HOMARD activé, on crée un cas par le choix "*Nouveau cas*" dans le menu HOMARD.
+
+.. image:: images/homard_2.png
+   :align: center
+
+La fenêtre suivante apparaît :
 
 .. image:: images/intro_31.png
    :align: center
@@ -168,13 +173,10 @@ SALOME VERSION 7.1 :
    - En TUI, choix du dernier instant comme instant de pilotage par SetTimeStepRankLast (voir :ref:`tui_create_iteration`)
    - Possibilité de détruire les objets (GUI et TUI)
    - Modification des fonctions TUI pour qu'elles agissent sur les objets et non plus sur les noms :
-        homard.AssociateIterHypo(iter_name,hypo_name) devient iter.AssociateHypo(hypo_name)
-
-        homard.AssociateHypoZone(hypo_name,zone_name,type_use) devient hypo.AssociateHypo(zone_name,type_use)
-
-        homard.CreateIteration(iter_name,iter_parent_name) devient iter.NextIteration(iter_name) ou case.NextIteration(iter_name)
+     ``homard.AssociateIterHypo(iter_name,hypo_name)`` devient ``iter.AssociateHypo(hypo_name)``, ``homard.AssociateHypoZone(hypo_name,zone_name,type_use)`` devient ``hypo.AssociateHypo(zone_name,type_use)``, ``homard.CreateIteration(iter_name,iter_parent_name)`` devient ``iter.NextIteration(iter_name)`` ou ``case.NextIteration(iter_name)``
    - Ajout de fonctions :
-        cas.LastIteration() : retourne la dernière itération de la descendance du cas (voir :ref:`tui_create_iteration`)
+     ``cas.LastIteration()`` : retourne la dernière itération de la descendance du cas (voir :ref:`tui_create_iteration`)
+   - Analyse de maillages (voir :ref:`gui_mesh_info`)
 
 
 
index 21b6950d40ebf5fd78405ffd38fee7403df7f6cd..f1e0c2919fb8721c1729d76137b90283867e3822 100644 (file)
@@ -143,6 +143,27 @@ Les options avanc
 |     présentes dans le maillage initial                        |
 +---------------------------------------------------------------+
 
+Informations sur le maillage initial
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: MeshInfo                                          |
+|                                                               |
+| **MeshInfo(Qual, Diam, Conn, Tail, Inte)**                    |
+|     Donne des informations sur le maillage. Pour chaque       |
+|     option, le choix 0 correspond à ne rien faire, alors que  |
+|     le choix 1 active l'option.                               |
+|                                                               |
+|     - ``Qual`` : qualité des mailles                          |
+|     - ``Diam`` : diamètre des mailles                         |
+|     - ``Conn`` : connexité du domaine ; en un seul morceau,   |
+|       combien de trous, etc.                                  |
+|     - ``Tail`` : tailles des constituants du domaine, groupe  |
+|       par groupe                                              |
+|     - ``Inte`` : interpénétration des mailles, par dimension  |
++---------------------------------------------------------------+
+
 
 Exemple
 """""""
index 9a9a1bd85dafea984cc9502c396a0ddcf7af22d6..96db65ffa49de51d7a946352bc59810f19ff7a10 100644 (file)
@@ -144,6 +144,17 @@ G
 |     - ``0`` : itération non calculée                          |
 |     - ``1`` : itération calculée correctement                 |
 +---------------------------------------------------------------+
+| .. module:: GetLogFile                                        |
+|                                                               |
+| **GetLogFile()**                                              |
+|     Retourne le nom du fichier retraçant le déroulement de    |
+|     l'exécuion de HOMARD                                      |
++---------------------------------------------------------------+
+| .. module:: GetFileInfo                                       |
+|                                                               |
+| **GetFileInfo()**                                             |
+|     Retourne le nom du fichier contenant l'abalyse du maillage|
++---------------------------------------------------------------+
 | .. index:: single: Delete                                     |
 |                                                               |
 | **Delete()**                                                  |
@@ -185,6 +196,21 @@ Informations sur les maillages
 | **GetMeshFile()**                                             |
 |     Retourne le nom du fichier du maillage produit            |
 +---------------------------------------------------------------+
+| .. module:: MeshInfo                                          |
+|                                                               |
+| **MeshInfo(Qual, Diam, Conn, Tail, Inte)**                    |
+|     Donne des informations sur le maillage. Pour chaque       |
+|     option, le choix 0 correspond à ne rien faire, alors que  |
+|     le choix 1 active l'option.                               |
+|                                                               |
+|     - ``Qual`` : qualité des mailles                          |
+|     - ``Diam`` : diamètre des mailles                         |
+|     - ``Conn`` : connexité du domaine ; en un seul morceau,   |
+|       combien de trous, etc.                                  |
+|     - ``Tail`` : tailles des constituants du domaine, groupe  |
+|       par groupe                                              |
+|     - ``Inte`` : interpénétration des mailles, par dimension  |
++---------------------------------------------------------------+
 
 Informations sur le champ
 ^^^^^^^^^^^^^^^^^^^^^^^^^
index 4dd2c3a794b3a760a2215f62a1f87f6fac0d35a8..d226341ec54a5cf988937cb0f8d0029ba3abcb73 100644 (file)
@@ -75,6 +75,9 @@ module HOMARD
     void     SetPyram(in long Pyram)                       raises (SALOME::SALOME_Exception);
     long     GetPyram()                                    raises (SALOME::SALOME_Exception);
 
+    void     MeshInfo(in long Qual, in long Diam, in long Conn, in long Tail, in long Inte)
+                                                           raises (SALOME::SALOME_Exception);
+
 // Liens avec les autres structures
     string   GetIter0Name ()                               raises (SALOME::SALOME_Exception);
     HOMARD_Iteration GetIter0 ()                           raises (SALOME::SALOME_Exception);
index 5780c4289eea042eea8c654d0b8c0d116ca02381..85602cdab6515939b1997950ab089b21ef383540 100644 (file)
@@ -110,6 +110,9 @@ module HOMARD
     listeIterations GetAllIterationsName()                 raises (SALOME::SALOME_Exception);
     listeZones      GetAllZonesName()                      raises (SALOME::SALOME_Exception);
 
+    void            MeshInfo(in string CaseName, in string MeshName, in string FileName,  in string DirName, in long Qual, in long Diam, in long Conn, in long Tail, in long Inte )
+                                                           raises (SALOME::SALOME_Exception);
+
     HOMARD_Iteration LastIteration(in string CaseName)     raises (SALOME::SALOME_Exception);
 //
 // A.3. L'etude
@@ -146,7 +149,8 @@ module HOMARD
     void DissociateHypoZone(in string HypoName, in string ZoneName)
                                                            raises (SALOME::SALOME_Exception);
 
-    long Compute (in string IterName, in long CleanOption) raises (SALOME::SALOME_Exception);
+    long Compute (in string IterName, in long CleanOption, in long modeHOMARD, in long Option)
+                                                           raises (SALOME::SALOME_Exception);
 
     boolean  VerifieDir (in string IterName)               raises (SALOME::SALOME_Exception);
 
index a41739d620412bbd905812d7609a012130a6f7f3..f5fd7ef550aba39f8b4a15008a75eaf701d7ac41 100644 (file)
@@ -71,11 +71,19 @@ 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);
+    void     SetLogFile(in string LogFile)                 raises (SALOME::SALOME_Exception);
+    string   GetLogFile()                                  raises (SALOME::SALOME_Exception);
 
     long     Compute(in long etatMenage)                   raises (SALOME::SALOME_Exception);
 
+    void     MeshInfo(in long Qual, in long Diam, in long Conn, in long Tail, in long Inte)
+                                                           raises (SALOME::SALOME_Exception);
+    void     MeshInfoOption(in long Qual, in long Diam, in long Conn, in long Tail, in long Inte, in long Option)
+                                                           raises (SALOME::SALOME_Exception);
+
+    void     SetFileInfo(in string FileInfo)               raises (SALOME::SALOME_Exception);
+    string   GetFileInfo()                                 raises (SALOME::SALOME_Exception);
+
 // Liens avec les autres iterations
     HOMARD_Iteration NextIteration(in string NomIter)      raises (SALOME::SALOME_Exception);
 
index d2a60218f13594e6b66e9b9941350d2f0adbeeb7..5c8decf04a185eac5d8ed8ef3828d2a7b9a87bb9 100644 (file)
@@ -21,6 +21,7 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 dist_salomeres_DATA =   \
        $(top_builddir)/resources/SalomeApp.xml \
+       advanced_mesh_info.png \
        boxdxy.png \
        boxdxy_2.png \
        boxdxyz.png \
diff --git a/resources/advanced_mesh_info.png b/resources/advanced_mesh_info.png
new file mode 100644 (file)
index 0000000..6e5b317
Binary files /dev/null and b/resources/advanced_mesh_info.png differ
index 4bcc8146a4770a8de46947529452b75192bb60d2..b6211887385ec364673f665e306358fc5c66204a 100644 (file)
@@ -156,7 +156,7 @@ namespace HOMARD
     os << separator() << iteration.GetEtat();
     os << separator() << iteration.GetNumber();
     os << separator() << iteration.GetMeshFile();
-    os << separator() << iteration.GetMessFile();
+    os << separator() << iteration.GetLogFile();
     os << separator() << iteration.GetMeshName();
     os << separator() << iteration.GetFieldFile();
     os << separator() << iteration.GetTimeStep();
@@ -432,7 +432,7 @@ namespace HOMARD
     iteration.SetMeshFile( chunk.c_str() );
     chunk = getNextChunk( stream, start, ok );
     if ( !ok ) return false;
-    iteration.SetMessFile( chunk.c_str() );
+    iteration.SetLogFile( chunk.c_str() );
     chunk = getNextChunk( stream, start, ok );
     if ( !ok ) return false;
     iteration.SetMeshName( chunk.c_str() );
index 922a5a2a8762da9d8afb1fd28c9e5062c60d2ac7..2efd2f94c08223af4d4ca5eab937609c063d3498 100644 (file)
@@ -44,9 +44,10 @@ HOMARD_Iteration::HOMARD_Iteration():
  _NumIter( -1 ),
   _NomMesh( "" ), _MeshFile( "" ),
   _FieldFile( "" ), _TimeStep( -1 ), _Rank( -1 ),
-  _MessFile( "" ),
+  _LogFile( "" ),
   _IterParent( "" ),
-  _NomHypo( "" ), _NomCas( "" ), _NomDir( "" )
+  _NomHypo( "" ), _NomCas( "" ), _NomDir( "" ),
+  _FileInfo( "" )
 {
   MESSAGE("HOMARD_Iter");
 }
@@ -210,14 +211,24 @@ int HOMARD_Iteration::GetRank() const
   return _Rank;
 }
 //=============================================================================
-void HOMARD_Iteration::SetMessFile( const char* MessFile )
+void HOMARD_Iteration::SetLogFile( const char* LogFile )
 {
-  _MessFile = std::string( MessFile );
+  _LogFile = std::string( LogFile );
 }
 //=============================================================================
-std::string HOMARD_Iteration::GetMessFile() const
+std::string HOMARD_Iteration::GetLogFile() const
 {
-  return _MessFile;
+  return _LogFile;
+}
+//=============================================================================
+void HOMARD_Iteration::SetFileInfo( const char* FileInfo )
+{
+  _FileInfo = std::string( FileInfo );
+}
+//=============================================================================
+std::string HOMARD_Iteration::GetFileInfo() const
+{
+  return _FileInfo;
 }
 //=============================================================================
 //=============================================================================
index 542da90a9f0c484a1d026a5f9dbb09012fa6adfe..1a772358dc86b62b6f099467cb08a46f4ad998c9 100644 (file)
@@ -72,8 +72,11 @@ public:
   int                           GetTimeStep() const;
   int                           GetRank() const;
 
-  void                          SetMessFile( const char* MessFile );
-  std::string                   GetMessFile() const;
+  void                          SetLogFile( const char* LogFile );
+  std::string                   GetLogFile() const;
+
+  void                          SetFileInfo( const char* FileInfo );
+  std::string                   GetFileInfo() const;
 
 // Liens avec les autres iterations
   void                          LinkNextIteration( const char* NomIteration );
@@ -100,12 +103,13 @@ private:
   std::string                   _FieldFile;
   int                           _TimeStep;
   int                           _Rank;
-  std::string                   _MessFile;
+  std::string                   _LogFile;
   std::string                   _IterParent;
   std::string                   _NomHypo;
   std::string                   _NomCas;
   std::string                   _NomDir;
   std::list<std::string>        _mesIterFilles;
+  std::string                   _FileInfo;
 };
 
 #endif
index ac6d4ca50c8957c022fcc27c48685da320c59923..1cfa5f3295b5b85c0f6dd42d7ad256552c23a375 100644 (file)
@@ -31,7 +31,7 @@
 //=============================================================================
 HomardDriver::HomardDriver(const std::string siter, const std::string siterp1):
   _HOMARD_Exec( "" ), _NomDir( "" ), _NomFichierConfBase( "HOMARD.Configuration" ),
-  _NomFichierConf( "" ), _siter( "" ), _siterp1( "" ),
+  _NomFichierConf( "" ), _NomFichierDonn( "" ), _siter( "" ), _siterp1( "" ),
   _Texte( "" ), _bLu( false )
 {
 // Memorisation du nom complet de l'executable HOMARD
@@ -59,28 +59,56 @@ HomardDriver::~HomardDriver()
 {
 }
 
-////=============================================================================
-void HomardDriver::TexteInit( const std::string DirCompute, const std::string DirComputePa, const std::string MessFile )
+//===============================================================================
+void HomardDriver::TexteInit( const std::string DirCompute, const std::string LogFile )
 {
-  MESSAGE("TexteInit, MessFile ="<<MessFile<<", DirCompute ="<<DirCompute<<", DirComputePa ="<<DirComputePa);
+  MESSAGE("TexteInit, DirCompute ="<<DirCompute<<", LogFile ="<<LogFile);
 //
-  _Texte  = "Action   homa\n" ;
+  _Texte  = "ListeStd \"" + LogFile + "\"\n" ;
+  _Texte += "RepeTrav \"" + DirCompute + "\"\n" ;
+  _Texte += "RepeInfo \"" + DirCompute + "\"\n" ;
+//
+}
+//===============================================================================
+void HomardDriver::TexteAdap( )
+{
+  MESSAGE("TexteAdap");
+//
+  _Texte += "Action   homa\n" ;
   _Texte += "CCAssoci med\n" ;
   _Texte += "ModeHOMA 1\n" ;
   _Texte += "NumeIter " + _siter + "\n" ;
-  _Texte += "ListeStd \"" + MessFile + "\"\n" ;
-  _Texte += "# Maillages HOMARD \n" ;
-  _Texte += "HOMaiN__ Mai" + _siter   + " \"" + DirComputePa + "/maill." + _siter   + ".hom.med\"\n" ;
-  _Texte += "HOMaiNP1 Mai" + _siterp1 + " \"" + DirCompute   + "/maill." + _siterp1 + ".hom.med\"\n" ;
-  _Texte += "RepeTrav \"" + DirCompute + "\"\n" ;
-  _Texte += "RepeInfo \"" + DirCompute + "\"\n" ;
+//
+}
+//===============================================================================
+void HomardDriver::TexteInfo( int TypeBila, int NumeIter )
+{
+  MESSAGE("TexteInit, TypeBila ="<<TypeBila);
+//
+  _Texte += "ModeHOMA 2\n" ;
+  std::stringstream saux1 ;
+  saux1 << TypeBila ;
+  std::string saux2 = saux1.str() ;
+  _Texte += "TypeBila " + saux2 + "\n" ;
+  if ( NumeIter ==  0 )
+  {
+    _Texte += "NumeIter 0\n" ;
+    _Texte += "Action   info_av\n" ;
+    _Texte += "CCAssoci med\n" ;
+  }
+  else
+  {
+    _Texte += "NumeIter " + _siter + "\n" ;
+    _Texte += "Action   info_ap\n" ;
+    _Texte += "CCAssoci homard\n" ;
+  }
 //
 }
 
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres )
 {
-  MESSAGE("TexteMaillage, NomMesh ="<<NomMesh<<", MeshFile ="<<MeshFile);
+  MESSAGE("TexteMaillage, NomMesh ="<<NomMesh<<", MeshFile ="<<MeshFile<<", apres ="<<apres);
   std::string saux ;
   saux = "P1" ;
   if ( apres < 1 ) { saux = "__" ; }
@@ -90,7 +118,19 @@ void HomardDriver::TexteMaillage( const std::string NomMesh, const std::string M
   _Texte += "CCMaiN" + saux + " \"" + MeshFile + "\"\n" ;
 }
 
-////=============================================================================
+//===============================================================================
+void HomardDriver::TexteMaillageHOMARD( const std::string Dir, const std::string liter, int apres )
+{
+  MESSAGE("TexteMaillageHOMARD, Dir ="<<Dir<<", liter ="<<liter<<", apres ="<<apres);
+  std::string saux ;
+  if ( apres < 1 ) { saux = "__" ; }
+  else             { saux = "P1" ; }
+
+  _Texte += "# Maillage HOMARD " + liter + "\n" ;
+  _Texte += "HOMaiN" + saux + " Mai" + liter   + " \"" + Dir + "/maill." + liter   + ".hom.med\"\n" ;
+}
+
+//===============================================================================
 void HomardDriver::TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff, int TypeDera )
 {
   MESSAGE("TexteConfRaffDera, ConfType ="<<ConfType);
@@ -168,14 +208,14 @@ void HomardDriver::TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff,
 //
 //   MESSAGE("A la fin de HomardDriver::TexteConfRaffDera, _Texte ="<<_Texte);
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteCompo( int NumeComp, const std::string NompCompo)
 {
   MESSAGE("TexteCompo, NumeComp = "<<NumeComp<<", NompCompo = "<<NompCompo);
   _Texte +="CCCoChaI \"" + NompCompo + "\"\n" ;
 }
 
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8 )
 {
   MESSAGE("TexteZone, NumeZone = "<<NumeZone<<", ZoneType = "<<ZoneType<<", TypeUse = "<<TypeUse);
@@ -494,7 +534,7 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0
 //   MESSAGE("A la fin de HomardDriver::TexteZone, _Texte ="<<_Texte);
 }
 
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteField( const std::string FieldName, const std::string FieldFile, int TimeStep, int Rank,
                int TypeThR, double ThreshR, int TypeThC, double ThreshC,
                int UsField, int UsCmpI )
@@ -586,7 +626,7 @@ void HomardDriver::TexteField( const std::string FieldName, const std::string Fi
   }
 }
 
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteGroup( const std::string GroupName )
 {
   MESSAGE("TexteGroup, GroupName = "<<GroupName);
@@ -594,7 +634,7 @@ void HomardDriver::TexteGroup( const std::string GroupName )
   _Texte += "CCGroAda \"" + GroupName  + "\"\n" ;
 //
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteBoundaryOption( int BoundaryOption )
 {
   MESSAGE("TexteBoundaryOption, BoundaryOption = "<<BoundaryOption);
@@ -607,7 +647,7 @@ void HomardDriver::TexteBoundaryOption( int BoundaryOption )
   _Texte += "SuivFron " + saux + "\n" ;
 //
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteBoundaryDi(  const std::string MeshName, const std::string MeshFile )
 {
   MESSAGE("TexteBoundaryDi, MeshName  = "<<MeshName);
@@ -617,7 +657,7 @@ void HomardDriver::TexteBoundaryDi(  const std::string MeshName, const std::stri
   _Texte += "CCFronti \"" + MeshFile + "\"\n" ;
 //
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteBoundaryDiGr(  const std::string GroupName )
 {
   MESSAGE("TexteBoundaryDiGr, GroupName  = "<<GroupName);
@@ -625,7 +665,7 @@ void HomardDriver::TexteBoundaryDiGr(  const std::string GroupName )
   _Texte += "CCGroFro \"" + GroupName + "\"\n" ;
 //
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6 )
 {
   MESSAGE("TexteBoundaryAn, NameBoundary = "<<NameBoundary);
@@ -732,7 +772,7 @@ void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoun
   _Texte += saux + "#\n" ;
 //
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteBoundaryAnGr( const std::string NameBoundary, int NumeBoundary, const std::string GroupName )
 {
   MESSAGE("TexteBoundaryAnGr, NameBoundary  = "<<NameBoundary);
@@ -753,7 +793,7 @@ void HomardDriver::TexteBoundaryAnGr( const std::string NameBoundary, int NumeBo
   _Texte += saux + "#\n" ;
 //
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteFieldInterp( int TypeFieldInterp, const std::string FieldFile, const std::string MeshFile, int TimeStep, int Rank )
 {
   MESSAGE("TexteFieldInterp, TypeFieldInterp = "<<TypeFieldInterp);
@@ -775,7 +815,7 @@ void HomardDriver::TexteFieldInterp( int TypeFieldInterp, const std::string Fiel
 //
 //  std::cerr << "A la fin de TexteFieldInterp _Texte ="<<_Texte << std::endl;
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteFieldInterpName( int NumeChamp, const std::string FieldName)
 {
   MESSAGE("TexteFieldInterpName, NumeChamp = "<<NumeChamp<<", FieldName = "<<FieldName);
@@ -801,7 +841,7 @@ void HomardDriver::TexteFieldInterpName( int NumeChamp, const std::string FieldN
     }
   }
 }
-////=============================================================================
+//===============================================================================
 void HomardDriver::TexteAdvanced( int Pyram, int NivMax, double DiamMin, int AdapInit, int LevelOutput )
 {
   MESSAGE("TexteAdvanced, Pyram ="<<Pyram<<", NivMax ="<<NivMax<<", DiamMin ="<<DiamMin<<", AdapInit ="<<AdapInit<<", LevelOutput ="<<LevelOutput);
@@ -850,35 +890,58 @@ void HomardDriver::TexteAdvanced( int Pyram, int NivMax, double DiamMin, int Ada
   }
 }
 
-////=============================================================================
+//===============================================================================
 void HomardDriver::CreeFichier( )
 {
 //
-  _NomFichierConf = _NomFichierConfBase + "." + _siter + ".vers." + _siterp1 ;
+  if ( _siter != _siterp1 )
+  { _NomFichierConf = _NomFichierConfBase + "." + _siter + ".vers." + _siterp1 ; }
+  else
+  { _NomFichierConf = _NomFichierConfBase + "." + _siter + ".info" ; }
+//
+  std::ofstream Fic(_NomFichierConf.c_str(), std::ios::out ) ;
+  if (Fic.is_open() == true) { Fic << _Texte << std::endl ; }
+  Fic.close() ;
+//
+}
+
+//===============================================================================
+// Creation du fichier de donnees pour l'information
+//===============================================================================
+void HomardDriver::CreeFichierDonn( )
+{
+//
+  MESSAGE("CreeFichierDonn");
+  _NomFichierDonn = "info.donn" ;
 //
-  std::ofstream FicConf(_NomFichierConf.c_str(), std::ios::out ) ;
-  if (FicConf.is_open() == true)
-  {
-    FicConf << _Texte << std::endl ;
-  }
-  FicConf.close() ;
+  std::string data ;
+  data  = "0\n" ;
+  data += "0\n" ;
+  data += "q\n" ;
+  std::ofstream Fic(_NomFichierDonn.c_str(), std::ios::out ) ;
+  if (Fic.is_open() == true) { Fic << data << std::endl ; }
+  Fic.close() ;
 //
 }
 
-////=============================================================================
-int HomardDriver::ExecuteHomard()
+//===============================================================================
+int HomardDriver::ExecuteHomard(int option)
 {
+  MESSAGE("ExecuteHomard, avec option = "<<option);
+  std::string commande ;
+  int codret ;
 // Copie des Fichiers HOMARD
-  std::string commande= "cp " + _NomFichierConf + " " + _NomFichierConfBase ;
-  system(commande.c_str());
+  commande = "cp " + _NomFichierConf + " " + _NomFichierConfBase ;
+  codret = system(commande.c_str()) ;
 
-  MESSAGE("ExecuteHomard");
-  int codret = system(_HOMARD_Exec.c_str()) ;
-  if ( codret != 0)
+// Execution de HOMARD
+  if ( codret == 0)
   {
-      // GERALD -- QMESSAGE BOX
-      MESSAGE ( "Erreur en executant HOMARD : " << codret );
-//       ASSERT("Erreur en executant HOMARD" == 0);
+    commande = _HOMARD_Exec.c_str() ;
+    if ( _NomFichierDonn != "" ) { commande += " < " + _NomFichierDonn ; }
+    codret = system(commande.c_str());
+    if ( codret != 0) { MESSAGE ( "Erreur en executant HOMARD : " << codret ); };
+    _NomFichierDonn = "" ;
   };
 
   return codret ;
index 355204e53215078ebbda7794b5239b255b3517c2..76cdb03084d9b420aadfdebd6826fe66c2488b84 100644 (file)
@@ -31,9 +31,13 @@ public:
   HomardDriver(const std::string siter, const std::string siterp1);
   ~HomardDriver();
   //
-  void        TexteInit( const std::string DirCompute, const std::string DirComputePa, const std::string MessFile );
+  void        TexteInit( const std::string DirCompute, const std::string LogFile );
+  void        TexteInfo( int TypeBila, int NumeIter );
+  void        CreeFichierDonn();
+  void        TexteAdap( );
   void        CreeFichier();
   void        TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres );
+  void        TexteMaillageHOMARD( const std::string Dir, const std::string liter, int apres );
   void        TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff, int TypeDera );
   void        TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8 );
   void        TexteGroup( const std::string GroupName );
@@ -55,7 +59,7 @@ public:
   void        TexteAdvanced( int Pyram, int NivMax, double DiamMin, int AdapInit, int LevelOutput);
   void        CloseFichier();
   //
-  int         ExecuteHomard();
+  int         ExecuteHomard(int option);
   //
   bool        LireFichier();
   bool        EcrireFichier();
@@ -72,6 +76,7 @@ public:
   std::string _NomDir;
   std::string _NomFichierConfBase;
   std::string _NomFichierConf;
+  std::string _NomFichierDonn;
   std::string _siter;
   std::string _siterp1;
   std::string _Texte;
index 23776674ed8dc26e1bc5ee931f32047b7217c0fd..3125a90a6eb3ac8c0f8cc42bd7e6e48c3b80175f 100644 (file)
@@ -66,6 +66,8 @@ using namespace std;
 #include "MonEditZone.h"
 #include "MonEditBoundaryAn.h"
 #include "MonEditBoundaryDi.h"
+#include "MonMeshInfo.h"
+#include "MonIterInfo.h"
 #include "HomardQtCommun.h"
 
 // BOOST Includes
@@ -151,14 +153,16 @@ void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QS
 //================================================
 void HOMARDGUI::createActions(){
 //
-  createHOMARDAction( 1101, "NEW_CASE",       "cas_calcule.png"  );
-  createHOMARDAction( 1102, "NEW_ITERATION",  "iter_next.png"    );
-  createHOMARDAction( 1111, "COMPUTE",        "mesh_compute.png" );
+  createHOMARDAction( 1101, "NEW_CASE",       "cas_calcule.png"        );
+  createHOMARDAction( 1102, "NEW_ITERATION",  "iter_next.png"          );
+  createHOMARDAction( 1111, "COMPUTE",        "mesh_compute.png"       );
+  createHOMARDAction( 1121, "MESH_INFO",      "advanced_mesh_info.png" );
 //
   createHOMARDAction( 1201, "EDIT",           "whatis.png"       );
   createHOMARDAction( 1211, "DELETE",         "delete.png"       );
 //
-  createHOMARDAction( 1301, "EDIT_MESS_FILE", "texte.png"        );
+  createHOMARDAction( 1301, "MESH_INFO",      "advanced_mesh_info.png" );
+  createHOMARDAction( 1302, "EDIT_MESS_FILE", "texte.png"              );
 //
 }
 
@@ -192,7 +196,9 @@ void HOMARDGUI::createMenus(){
   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( 1301, HOMARD_Id, -1 ); //Information sur un maillage
+  createMenu( separator(), HOMARD_Id,-1);
+  createMenu( 1302, HOMARD_Id, -1 ); //EditAsciiFile pour le fichier listeStd ou bilan
   createMenu( separator(), HOMARD_Id,-1);
   createMenu( 1201, HOMARD_Id, -1 ); //Edit
   createMenu( separator(), HOMARD_Id,-1);
@@ -252,7 +258,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
     {
       MESSAGE("etape 1101")
       MESSAGE("command " << theCommandID << " activated");
-      MonCreateCase *aDlg = new MonCreateCase( parent, TRUE,
+      MonCreateCase *aDlg = new MonCreateCase( parent, true,
                             HOMARD::HOMARD_Gen::_duplicate(homardGen) ) ;
       aDlg->show();
       break;
@@ -276,7 +282,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       if (monIter == QString("")) break;
       try
       {
-        homardGen->Compute(monIter.toStdString().c_str(), 0);
+        homardGen->Compute(monIter.toStdString().c_str(), 0, 1, -1);
       }
       catch( SALOME::SALOME_Exception& S_ex )
       {
@@ -288,6 +294,16 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       break;
     }
 
+    case 1121: // Information sur le maillage de l'iteration
+    {
+      MESSAGE("command " << theCommandID << " activated");
+      QString IterName=HOMARD_QT_COMMUN::SelectionArbreEtude(QString("IterationHomard"), 0);
+      MESSAGE("IterName " << IterName.toStdString().c_str() << " choisi dans arbre");
+      MonIterInfo *IterDlg = new MonIterInfo( parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), IterName ) ;
+      IterDlg->show();
+      break;
+    }
+
     case 1201: // Edition d'un objet
     {
       MESSAGE("command " << theCommandID << " activated");
@@ -317,21 +333,21 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
         // Edition d'une zone
         else if (HOMARD_UTILS::isZone(obj))
         {
-          MonEditZone *aDlg = new MonEditZone(0, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          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 ) ;
+            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 ) ;
+            MonEditBoundaryAn *aDlg = new MonEditBoundaryAn(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
             aDlg->show();
         }
       }
@@ -415,11 +431,20 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       break;
     }
 
-    case 1301: // Affichage du fichier mess
+    case 1301: // Information sur un maillage
+    {
+      MESSAGE("etape 1301")
+      MESSAGE("command " << theCommandID << " activated");
+      MonMeshInfo *aDlg = new MonMeshInfo( parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen) ) ;
+      aDlg->show();
+      break;
+    }
+
+    case 1302: // Affichage du fichier mess
     {
       MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() );
       _PTR(SObject) obj = chercheMonObjet();
-      if ((obj) and ((HOMARD_UTILS::isFileMess(obj) or HOMARD_UTILS::isFileSummary(obj))))
+      if ((obj) and ((HOMARD_UTILS::isFilelog(obj) or HOMARD_UTILS::isFileSummary(obj))))
       {
           MonEditFile *aDlg = new MonEditFile( 0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName ) ;
           aDlg->show();
@@ -560,7 +585,9 @@ void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& t
       pix = resMgr->loadPixmap( "HOMARD", "iter_next.png" );
       menu->addAction(QIcon(pix), tr(QString("HOM_MEN_NEW_ITERATION").toLatin1().data()), this,SLOT(NextIter()));
       QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "mesh_compute.png" );
-      menu->addAction(QIcon(pix2), tr(QString("HOM_MEN_COMPUTE").toLatin1().data()), this,SLOT(LanceCalcul()));
+      menu->addAction(QIcon(pix2), tr(QString("HOM_MEN_COMPUTE").toLatin1().data()), this, SLOT(LanceCalcul()));
+      pix2 = resMgr->loadPixmap( "HOMARD", "advanced_mesh_info.png" );
+      menu->addAction(QIcon(pix2), tr(QString("HOM_MEN_MESH_INFO").toLatin1().data()), this, SLOT(IterInfo()));
       EditObject = true ;
       DeleteObject = true ;
     }
@@ -569,7 +596,7 @@ void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& t
       EditObject = true ;
       DeleteObject = true ;
     }
-    else if ( HOMARD_UTILS::isFileMess(obj) or HOMARD_UTILS::isFileSummary(obj) )
+    else if ( HOMARD_UTILS::isFilelog(obj) or HOMARD_UTILS::isFileSummary(obj) )
     {
       pix = resMgr->loadPixmap( "HOMARD", "texte.png" );
       menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_MESS_FILE").toLatin1().data()), this,SLOT(EditAsciiFile()));
@@ -599,6 +626,11 @@ void HOMARDGUI::LanceCalcul()
   this->OnGUIEvent(1111);
 }
 
+void HOMARDGUI::IterInfo()
+{
+  this->OnGUIEvent(1121);
+}
+
 void HOMARDGUI::Edit()
 {
   this->OnGUIEvent(1201);
@@ -609,9 +641,14 @@ void HOMARDGUI::Delete()
   this->OnGUIEvent(1211);
 }
 
+// void HOMARDGUI::EditAsciiFile()
+// {
+//   this->OnGUIEvent(1301);
+// }
+
 void HOMARDGUI::EditAsciiFile()
 {
-  this->OnGUIEvent(1301);
+  this->OnGUIEvent(1302);
 }
 
 //
index 610571f8b31422877850368630e2f716702a6950..31101477acd51a4060cca4fb906644df8d73e04c 100644 (file)
@@ -63,6 +63,7 @@ private slots:
     void OnGUIEvent();
     void EditAsciiFile();
     void LanceCalcul();
+    void IterInfo();
     void NextIter();
     void Edit();
     void Delete();
index 91e4721048ecc52caffce95e60f5ca4d44b351ba..fc1398ad60afa82dcbb73df314fe6d1a00d60fca 100644 (file)
@@ -254,9 +254,9 @@ bool HOMARD_UTILS::isCase(_PTR(SObject) MonObj)
 //================================================================
 // Retourne vrai si l objet est un fichier de messages
 //================================================================
-bool HOMARD_UTILS::isFileMess(_PTR(SObject) MonObj)
+bool HOMARD_UTILS::isFilelog(_PTR(SObject) MonObj)
 {
-   return isObject( MonObj, QString("Mess"), 0 ) ;
+   return isObject( MonObj, QString("log"), 0 ) ;
 }
 //================================================================
 // Retourne vrai si l objet est un fichier de bilan
index f202cadb49a1f65c4ab21bea5000c4819202b010..52bb41772a5a47d0ebd5fb582d1a01cbeeb0b82e 100644 (file)
@@ -79,7 +79,7 @@ namespace HOMARD_UTILS {
   bool isHypo(_PTR(SObject)  MonObj);
   bool isIter(_PTR(SObject)  MonObj);
   bool isCase(_PTR(SObject)  MonObj);
-  bool isFileMess(_PTR(SObject)  MonObj);
+  bool isFilelog(_PTR(SObject)  MonObj);
   bool isFileSummary(_PTR(SObject)  MonObj);
   bool isObject(_PTR(SObject)  MonObj, QString TypeObject, int option );
 
index d740bb40bc3be8abf5d516c2f162ab0fd55babbd..89aca2f5bbc4c0db4797dd065cb3f9ace932e028 100644 (file)
         <source>HOM_MEN_DELETE</source>
         <translation>Delete</translation>
     </message>
+    <message>
+        <source>HOM_MEN_MESH_INFO</source>
+        <translation>Mesh analysis</translation>
+    </message>
     <message>
         <source>HOM_MEN_EDIT_MESS_FILE</source>
         <translation>Show the file</translation>
         <source>HOM_GROU_EDIT_WINDOW_TITLE</source>
         <translation>Selected groups</translation>
     </message>
+    <message>
+        <source>HOM_MESH_INFO_0</source>
+        <translation>Mesh analysis</translation>
+    </message>
+    <message>
+        <source>HOM_MESH_INFO_1</source>
+        <translation>Select at least one option.</translation>
+    </message>
+    <message>
+        <source>HOM_MESH_INFO_2</source>
+        <translation>Analysis in the object browser, file </translation>
+    </message>
 </context>
 </TS>
index a4cb3ae1195af545a282158fb09b0ad69da2fd0f..3a63a413fa6aa5f7b3b5e02bf7aef7df28d86223 100644 (file)
         <source>HOM_MEN_DELETE</source>
         <translation>Supprimer</translation>
     </message>
+    <message>
+        <source>HOM_MEN_MESH_INFO</source>
+        <translation>Analyse de maillage</translation>
+    </message>
     <message>
         <source>HOM_MEN_EDIT_MESS_FILE</source>
         <translation>Afficher le fichier</translation>
         <source>HOM_GROU_EDIT_WINDOW_TITLE</source>
         <translation>Groupes choisis</translation>
     </message>
+    <message>
+        <source>HOM_MESH_INFO_0</source>
+        <translation>Analyse de maillage</translation>
+    </message>
+    <message>
+        <source>HOM_MESH_INFO_1</source>
+        <translation>Choisir au moins une option.</translation>
+    </message>
+    <message>
+        <source>HOM_MESH_INFO_2</source>
+        <translation>Bilan de l'analyse dans l'arbre d'études, fichier </translation>
+    </message>
     <message>
         <source>Filtering with groups</source>
         <translation>Filtrage par les groupes</translation>
         <source>Group</source>
         <translation>Groupe</translation>
     </message>
+    <message>
+        <source>Information on a mesh</source>
+        <translation>Analyse d'un maillage</translation>
+    </message>
+    <message>
+        <source>Group size</source>
+        <translation>Taille des domaines</translation>
+    </message>
+    <message>
+        <source>Quality</source>
+        <translation>Qualité</translation>
+    </message>
+    <message>
+        <source>Connection</source>
+        <translation>Connexité</translation>
+    </message>
+    <message>
+        <source>Diametre</source>
+        <translation>Diamètre</translation>
+    </message>
+    <message>
+        <source>Entanglement</source>
+        <translation>Interpénétration</translation>
+    </message>
     <message>
         <source>Edit a file</source>
         <translation>Affichage d&apos;un fichier</translation>
diff --git a/src/HOMARDGUI/IterInfo.h b/src/HOMARDGUI/IterInfo.h
new file mode 100644 (file)
index 0000000..452a9da
--- /dev/null
@@ -0,0 +1,156 @@
+/********************************************************************************
+** Form generated from reading UI file 'IterInfo.ui'
+**
+** Created: Wed Feb 20 17:10:38 2013
+**      by: Qt User Interface Compiler version 4.6.3
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef ITERINFO_H
+#define ITERINFO_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QCheckBox>
+#include <QtGui/QDialog>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHeaderView>
+#include <QtGui/QPushButton>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_IterInfo
+{
+public:
+    QGridLayout *gridLayout_2;
+    QGroupBox *GBOptions;
+    QGridLayout *gridLayout;
+    QCheckBox *CBQuality;
+    QCheckBox *CBConnection;
+    QCheckBox *CBDiametre;
+    QCheckBox *CBBlockSize;
+    QCheckBox *CBEntanglement;
+    QGroupBox *GroupButtons;
+    QGridLayout *gridLayout1;
+    QPushButton *buttonHelp;
+    QPushButton *buttonApply;
+    QPushButton *buttonOk;
+    QPushButton *buttonCancel;
+
+    void setupUi(QDialog *IterInfo)
+    {
+        if (IterInfo->objectName().isEmpty())
+            IterInfo->setObjectName(QString::fromUtf8("IterInfo"));
+        IterInfo->resize(420, 220);
+        QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+        sizePolicy.setHorizontalStretch(0);
+        sizePolicy.setVerticalStretch(0);
+        sizePolicy.setHeightForWidth(IterInfo->sizePolicy().hasHeightForWidth());
+        IterInfo->setSizePolicy(sizePolicy);
+        IterInfo->setAutoFillBackground(true);
+        gridLayout_2 = new QGridLayout(IterInfo);
+        gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+        GBOptions = new QGroupBox(IterInfo);
+        GBOptions->setObjectName(QString::fromUtf8("GBOptions"));
+        gridLayout = new QGridLayout(GBOptions);
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        CBQuality = new QCheckBox(GBOptions);
+        CBQuality->setObjectName(QString::fromUtf8("CBQuality"));
+
+        gridLayout->addWidget(CBQuality, 0, 0, 1, 1);
+
+        CBConnection = new QCheckBox(GBOptions);
+        CBConnection->setObjectName(QString::fromUtf8("CBConnection"));
+
+        gridLayout->addWidget(CBConnection, 0, 1, 1, 1);
+
+        CBDiametre = new QCheckBox(GBOptions);
+        CBDiametre->setObjectName(QString::fromUtf8("CBDiametre"));
+
+        gridLayout->addWidget(CBDiametre, 1, 0, 1, 1);
+
+        CBBlockSize = new QCheckBox(GBOptions);
+        CBBlockSize->setObjectName(QString::fromUtf8("CBBlockSize"));
+
+        gridLayout->addWidget(CBBlockSize, 1, 1, 1, 1);
+
+        CBEntanglement = new QCheckBox(GBOptions);
+        CBEntanglement->setObjectName(QString::fromUtf8("CBEntanglement"));
+
+        gridLayout->addWidget(CBEntanglement, 2, 0, 1, 2);
+
+
+        gridLayout_2->addWidget(GBOptions, 0, 0, 2, 2);
+
+        GroupButtons = new QGroupBox(IterInfo);
+        GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
+        gridLayout1 = new QGridLayout(GroupButtons);
+#ifndef Q_OS_MAC
+        gridLayout1->setSpacing(6);
+#endif
+#ifndef Q_OS_MAC
+        gridLayout1->setContentsMargins(9, 9, 9, 9);
+#endif
+        gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
+        buttonHelp = new QPushButton(GroupButtons);
+        buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+        buttonHelp->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonHelp, 0, 4, 1, 1);
+
+        buttonApply = new QPushButton(GroupButtons);
+        buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+        buttonApply->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonApply, 0, 1, 1, 1);
+
+        buttonOk = new QPushButton(GroupButtons);
+        buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+        buttonOk->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonOk, 0, 0, 1, 1);
+
+        buttonCancel = new QPushButton(GroupButtons);
+        buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+        buttonCancel->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1);
+
+
+        gridLayout_2->addWidget(GroupButtons, 2, 0, 1, 2);
+
+
+        retranslateUi(IterInfo);
+
+        QMetaObject::connectSlotsByName(IterInfo);
+    } // setupUi
+
+    void retranslateUi(QDialog *IterInfo)
+    {
+        IterInfo->setWindowTitle(QApplication::translate("IterInfo", "Information on a mesh", 0, QApplication::UnicodeUTF8));
+        GBOptions->setTitle(QApplication::translate("IterInfo", "Options", 0, QApplication::UnicodeUTF8));
+        CBQuality->setText(QApplication::translate("IterInfo", "Quality", 0, QApplication::UnicodeUTF8));
+        CBConnection->setText(QApplication::translate("IterInfo", "Connection", 0, QApplication::UnicodeUTF8));
+        CBDiametre->setText(QApplication::translate("IterInfo", "Diametre", 0, QApplication::UnicodeUTF8));
+        CBBlockSize->setText(QApplication::translate("IterInfo", "Group size", 0, QApplication::UnicodeUTF8));
+        CBEntanglement->setText(QApplication::translate("IterInfo", "Entanglement", 0, QApplication::UnicodeUTF8));
+        GroupButtons->setTitle(QString());
+        buttonHelp->setText(QApplication::translate("IterInfo", "Help", 0, QApplication::UnicodeUTF8));
+        buttonApply->setText(QApplication::translate("IterInfo", "Apply", 0, QApplication::UnicodeUTF8));
+        buttonOk->setText(QApplication::translate("IterInfo", "OK", 0, QApplication::UnicodeUTF8));
+        buttonCancel->setText(QApplication::translate("IterInfo", "Cancel", 0, QApplication::UnicodeUTF8));
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class IterInfo: public Ui_IterInfo {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // ITERINFO_H
diff --git a/src/HOMARDGUI/IterInfo.ui b/src/HOMARDGUI/IterInfo.ui
new file mode 100644 (file)
index 0000000..04b2664
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>IterInfo</class>
+ <widget class="QDialog" name="IterInfo">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>420</width>
+    <height>220</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Information on a mesh</string>
+  </property>
+  <property name="autoFillBackground">
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0" rowspan="2" colspan="2">
+    <widget class="QGroupBox" name="GBOptions">
+     <property name="title">
+      <string>Options</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QCheckBox" name="CBQuality">
+        <property name="text">
+         <string>Quality</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QCheckBox" name="CBConnection">
+        <property name="text">
+         <string>Connection</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QCheckBox" name="CBDiametre">
+        <property name="text">
+         <string>Diametre</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QCheckBox" name="CBBlockSize">
+        <property name="text">
+         <string>Group size</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QCheckBox" name="CBEntanglement">
+        <property name="text">
+         <string>Entanglement</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="2">
+    <widget class="QGroupBox" name="GroupButtons">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="4">
+       <widget class="QPushButton" name="buttonHelp">
+        <property name="text">
+         <string>Help</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="buttonApply">
+        <property name="text">
+         <string>Apply</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QPushButton" name="buttonOk">
+        <property name="text">
+         <string>OK</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QPushButton" name="buttonCancel">
+        <property name="text">
+         <string>Cancel</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index ae5f5bc7f24c809702b184bc56753fe4f7e4b535..5eab8cfa98262a58686133c132b609212705cd98 100644 (file)
@@ -45,6 +45,10 @@ salomeinclude_HEADERS =       \
        MonCreateIteration.h  \
        CreateIteration.h     \
        MonEditIteration.h    \
+       MonMeshInfo.h         \
+       MeshInfo.h            \
+       MonIterInfo.h         \
+       IterInfo.h            \
        HOMARDGUI.h           \
        HOMARDGUI_Utils.h     \
        EditFile.h            \
@@ -59,19 +63,21 @@ dist_libHOMARD_la_SOURCES =     \
        HOMARDGUI.cxx           \
        HOMARDGUI_Utils.cxx     \
        MonCreateBoundaryAn.cxx \
-       MonEditBoundaryAn.cxx \
+       MonEditBoundaryAn.cxx   \
        MonCreateBoundaryDi.cxx \
-       MonEditBoundaryDi.cxx \
+       MonEditBoundaryDi.cxx   \
        MonCreateCase.cxx       \
        MonEditCase.cxx         \
        MonCreateHypothesis.cxx \
        MonEditHypothesis.cxx   \
-       MonCreateListGroup.cxx \
-       MonEditListGroup.cxx \
+       MonCreateListGroup.cxx  \
+       MonEditListGroup.cxx    \
        MonCreateIteration.cxx  \
        MonEditIteration.cxx    \
        MonCreateZone.cxx       \
        MonEditZone.cxx         \
+       MonMeshInfo.cxx         \
+       MonIterInfo.cxx         \
        MonEditFile.cxx         \
        HomardQtCommun.cxx
 
@@ -92,6 +98,8 @@ MOC_FILES =                         \
        MonEditListGroup_moc.cxx    \
        MonCreateIteration_moc.cxx  \
        MonEditIteration_moc.cxx    \
+       MonMeshInfo_moc.cxx         \
+       MonIterInfo_moc.cxx         \
        MonEditFile_moc.cxx
 
 nodist_libHOMARD_la_SOURCES = $(MOC_FILES)
@@ -133,11 +141,13 @@ nodist_salomeres_DATA =  \
 UI_FILES = \
 CreateBoundaryAn.ui \
 CreateBoundaryDi.ui \
-CreateCase.ui \
+CreateCase.ui       \
 CreateHypothesis.ui \
-CreateIteration.ui \
-CreateListGroup.ui \
-CreateZone.ui \
+CreateIteration.ui  \
+CreateListGroup.ui  \
+CreateZone.ui       \
+MeshInfo.ui         \
+IterInfo.ui         \
 EditFile.ui
 
 EXTRA_DIST += $(UI_FILES)
diff --git a/src/HOMARDGUI/MeshInfo.h b/src/HOMARDGUI/MeshInfo.h
new file mode 100644 (file)
index 0000000..95dc88b
--- /dev/null
@@ -0,0 +1,270 @@
+/********************************************************************************
+** Form generated from reading UI file 'MeshInfo.ui'
+**
+** Created: Tue Feb 19 10:05:35 2013
+**      by: Qt User Interface Compiler version 4.6.3
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef MESHINFO_H
+#define MESHINFO_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QCheckBox>
+#include <QtGui/QDialog>
+#include <QtGui/QGridLayout>
+#include <QtGui/QGroupBox>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QPushButton>
+#include <QtGui/QSpacerItem>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_MeshInfo
+{
+public:
+    QGridLayout *gridLayout_2;
+    QHBoxLayout *hboxLayout;
+    QLabel *Name;
+    QLineEdit *LECaseName;
+    QHBoxLayout *hboxLayout1;
+    QLabel *Directory;
+    QPushButton *PushDir;
+    QLineEdit *LEDirName;
+    QSpacerItem *spacerItem;
+    QHBoxLayout *hboxLayout2;
+    QLabel *Mesh_2;
+    QPushButton *PushFichier;
+    QLineEdit *LEFileName;
+    QSpacerItem *spacerItem1;
+    QGroupBox *GBOptions;
+    QGridLayout *gridLayout;
+    QCheckBox *CBQuality;
+    QCheckBox *CBConnection;
+    QCheckBox *CBDiametre;
+    QCheckBox *CBBlockSize;
+    QCheckBox *CBEntanglement;
+    QSpacerItem *verticalSpacer;
+    QGroupBox *GroupButtons;
+    QGridLayout *gridLayout1;
+    QPushButton *buttonHelp;
+    QPushButton *buttonApply;
+    QPushButton *buttonOk;
+    QPushButton *buttonCancel;
+    QSpacerItem *spacer_2;
+
+    void setupUi(QDialog *MeshInfo)
+    {
+        if (MeshInfo->objectName().isEmpty())
+            MeshInfo->setObjectName(QString::fromUtf8("MeshInfo"));
+        MeshInfo->resize(536, 372);
+        QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+        sizePolicy.setHorizontalStretch(0);
+        sizePolicy.setVerticalStretch(0);
+        sizePolicy.setHeightForWidth(MeshInfo->sizePolicy().hasHeightForWidth());
+        MeshInfo->setSizePolicy(sizePolicy);
+        MeshInfo->setAutoFillBackground(true);
+        gridLayout_2 = new QGridLayout(MeshInfo);
+        gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2"));
+        hboxLayout = new QHBoxLayout();
+#ifndef Q_OS_MAC
+        hboxLayout->setSpacing(6);
+#endif
+#ifndef Q_OS_MAC
+        hboxLayout->setContentsMargins(0, 0, 0, 0);
+#endif
+        hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
+        Name = new QLabel(MeshInfo);
+        Name->setObjectName(QString::fromUtf8("Name"));
+
+        hboxLayout->addWidget(Name);
+
+        LECaseName = new QLineEdit(MeshInfo);
+        LECaseName->setObjectName(QString::fromUtf8("LECaseName"));
+        LECaseName->setMinimumSize(QSize(382, 21));
+
+        hboxLayout->addWidget(LECaseName);
+
+
+        gridLayout_2->addLayout(hboxLayout, 0, 0, 1, 2);
+
+        hboxLayout1 = new QHBoxLayout();
+#ifndef Q_OS_MAC
+        hboxLayout1->setSpacing(6);
+#endif
+        hboxLayout1->setContentsMargins(0, 0, 0, 0);
+        hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
+        Directory = new QLabel(MeshInfo);
+        Directory->setObjectName(QString::fromUtf8("Directory"));
+
+        hboxLayout1->addWidget(Directory);
+
+        PushDir = new QPushButton(MeshInfo);
+        PushDir->setObjectName(QString::fromUtf8("PushDir"));
+        PushDir->setAutoDefault(false);
+
+        hboxLayout1->addWidget(PushDir);
+
+        LEDirName = new QLineEdit(MeshInfo);
+        LEDirName->setObjectName(QString::fromUtf8("LEDirName"));
+        LEDirName->setMinimumSize(QSize(382, 21));
+
+        hboxLayout1->addWidget(LEDirName);
+
+
+        gridLayout_2->addLayout(hboxLayout1, 1, 0, 1, 2);
+
+        spacerItem = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        gridLayout_2->addItem(spacerItem, 2, 0, 1, 1);
+
+        hboxLayout2 = new QHBoxLayout();
+#ifndef Q_OS_MAC
+        hboxLayout2->setSpacing(6);
+#endif
+        hboxLayout2->setContentsMargins(0, 0, 0, 0);
+        hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2"));
+        Mesh_2 = new QLabel(MeshInfo);
+        Mesh_2->setObjectName(QString::fromUtf8("Mesh_2"));
+
+        hboxLayout2->addWidget(Mesh_2);
+
+        PushFichier = new QPushButton(MeshInfo);
+        PushFichier->setObjectName(QString::fromUtf8("PushFichier"));
+        PushFichier->setAutoDefault(false);
+
+        hboxLayout2->addWidget(PushFichier);
+
+        LEFileName = new QLineEdit(MeshInfo);
+        LEFileName->setObjectName(QString::fromUtf8("LEFileName"));
+        LEFileName->setMinimumSize(QSize(382, 21));
+
+        hboxLayout2->addWidget(LEFileName);
+
+
+        gridLayout_2->addLayout(hboxLayout2, 3, 0, 1, 2);
+
+        spacerItem1 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        gridLayout_2->addItem(spacerItem1, 4, 0, 1, 1);
+
+        GBOptions = new QGroupBox(MeshInfo);
+        GBOptions->setObjectName(QString::fromUtf8("GBOptions"));
+        gridLayout = new QGridLayout(GBOptions);
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        CBQuality = new QCheckBox(GBOptions);
+        CBQuality->setObjectName(QString::fromUtf8("CBQuality"));
+
+        gridLayout->addWidget(CBQuality, 0, 0, 1, 1);
+
+        CBConnection = new QCheckBox(GBOptions);
+        CBConnection->setObjectName(QString::fromUtf8("CBConnection"));
+
+        gridLayout->addWidget(CBConnection, 0, 1, 1, 1);
+
+        CBDiametre = new QCheckBox(GBOptions);
+        CBDiametre->setObjectName(QString::fromUtf8("CBDiametre"));
+
+        gridLayout->addWidget(CBDiametre, 1, 0, 1, 1);
+
+        CBBlockSize = new QCheckBox(GBOptions);
+        CBBlockSize->setObjectName(QString::fromUtf8("CBBlockSize"));
+
+        gridLayout->addWidget(CBBlockSize, 1, 1, 1, 1);
+
+        CBEntanglement = new QCheckBox(GBOptions);
+        CBEntanglement->setObjectName(QString::fromUtf8("CBEntanglement"));
+
+        gridLayout->addWidget(CBEntanglement, 2, 0, 1, 2);
+
+
+        gridLayout_2->addWidget(GBOptions, 5, 0, 1, 1);
+
+        verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        gridLayout_2->addItem(verticalSpacer, 6, 0, 1, 1);
+
+        GroupButtons = new QGroupBox(MeshInfo);
+        GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
+        gridLayout1 = new QGridLayout(GroupButtons);
+#ifndef Q_OS_MAC
+        gridLayout1->setSpacing(6);
+#endif
+#ifndef Q_OS_MAC
+        gridLayout1->setContentsMargins(9, 9, 9, 9);
+#endif
+        gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
+        buttonHelp = new QPushButton(GroupButtons);
+        buttonHelp->setObjectName(QString::fromUtf8("buttonHelp"));
+        buttonHelp->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonHelp, 0, 4, 1, 1);
+
+        buttonApply = new QPushButton(GroupButtons);
+        buttonApply->setObjectName(QString::fromUtf8("buttonApply"));
+        buttonApply->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonApply, 0, 1, 1, 1);
+
+        buttonOk = new QPushButton(GroupButtons);
+        buttonOk->setObjectName(QString::fromUtf8("buttonOk"));
+        buttonOk->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonOk, 0, 0, 1, 1);
+
+        buttonCancel = new QPushButton(GroupButtons);
+        buttonCancel->setObjectName(QString::fromUtf8("buttonCancel"));
+        buttonCancel->setAutoDefault(false);
+
+        gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1);
+
+
+        gridLayout_2->addWidget(GroupButtons, 7, 0, 1, 1);
+
+        spacer_2 = new QSpacerItem(128, 25, QSizePolicy::Fixed, QSizePolicy::Minimum);
+
+        gridLayout_2->addItem(spacer_2, 7, 1, 1, 1);
+
+
+        retranslateUi(MeshInfo);
+
+        QMetaObject::connectSlotsByName(MeshInfo);
+    } // setupUi
+
+    void retranslateUi(QDialog *MeshInfo)
+    {
+        MeshInfo->setWindowTitle(QApplication::translate("MeshInfo", "Information on a mesh", 0, QApplication::UnicodeUTF8));
+        Name->setText(QApplication::translate("MeshInfo", "Name", 0, QApplication::UnicodeUTF8));
+        Directory->setText(QApplication::translate("MeshInfo", "Directory", 0, QApplication::UnicodeUTF8));
+        PushDir->setText(QString());
+        Mesh_2->setText(QApplication::translate("MeshInfo", "Mesh", 0, QApplication::UnicodeUTF8));
+        PushFichier->setText(QString());
+        GBOptions->setTitle(QApplication::translate("MeshInfo", "Options", 0, QApplication::UnicodeUTF8));
+        CBQuality->setText(QApplication::translate("MeshInfo", "Quality", 0, QApplication::UnicodeUTF8));
+        CBConnection->setText(QApplication::translate("MeshInfo", "Connection", 0, QApplication::UnicodeUTF8));
+        CBDiametre->setText(QApplication::translate("MeshInfo", "Diametre", 0, QApplication::UnicodeUTF8));
+        CBBlockSize->setText(QApplication::translate("MeshInfo", "Group size", 0, QApplication::UnicodeUTF8));
+        CBEntanglement->setText(QApplication::translate("MeshInfo", "Entanglement", 0, QApplication::UnicodeUTF8));
+        GroupButtons->setTitle(QString());
+        buttonHelp->setText(QApplication::translate("MeshInfo", "Help", 0, QApplication::UnicodeUTF8));
+        buttonApply->setText(QApplication::translate("MeshInfo", "Apply", 0, QApplication::UnicodeUTF8));
+        buttonOk->setText(QApplication::translate("MeshInfo", "OK", 0, QApplication::UnicodeUTF8));
+        buttonCancel->setText(QApplication::translate("MeshInfo", "Cancel", 0, QApplication::UnicodeUTF8));
+    } // retranslateUi
+
+};
+
+namespace Ui {
+    class MeshInfo: public Ui_MeshInfo {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // MESHINFO_H
diff --git a/src/HOMARDGUI/MeshInfo.ui b/src/HOMARDGUI/MeshInfo.ui
new file mode 100644 (file)
index 0000000..c3e55aa
--- /dev/null
@@ -0,0 +1,285 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MeshInfo</class>
+ <widget class="QDialog" name="MeshInfo">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>536</width>
+    <height>372</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Information on a mesh</string>
+  </property>
+  <property name="autoFillBackground">
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0" colspan="2">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="Name">
+       <property name="text">
+        <string>Name</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LECaseName">
+       <property name="minimumSize">
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0" colspan="2">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="Directory">
+       <property name="text">
+        <string>Directory</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PushDir">
+       <property name="text">
+        <string/>
+       </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LEDirName">
+       <property name="minimumSize">
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="0">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>18</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="Mesh_2">
+       <property name="text">
+        <string>Mesh</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PushFichier">
+       <property name="text">
+        <string/>
+       </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LEFileName">
+       <property name="minimumSize">
+        <size>
+         <width>382</width>
+         <height>21</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="4" column="0">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>1</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="5" column="0">
+    <widget class="QGroupBox" name="GBOptions">
+     <property name="title">
+      <string>Options</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QCheckBox" name="CBQuality">
+        <property name="text">
+         <string>Quality</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QCheckBox" name="CBConnection">
+        <property name="text">
+         <string>Connection</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QCheckBox" name="CBDiametre">
+        <property name="text">
+         <string>Diametre</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QCheckBox" name="CBBlockSize">
+        <property name="text">
+         <string>Group size</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QCheckBox" name="CBEntanglement">
+        <property name="text">
+         <string>Entanglement</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="6" column="0">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="7" column="0">
+    <widget class="QGroupBox" name="GroupButtons">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="4">
+       <widget class="QPushButton" name="buttonHelp">
+        <property name="text">
+         <string>Help</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="buttonApply">
+        <property name="text">
+         <string>Apply</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QPushButton" name="buttonOk">
+        <property name="text">
+         <string>OK</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QPushButton" name="buttonCancel">
+        <property name="text">
+         <string>Cancel</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="7" column="1">
+    <spacer name="spacer_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>128</width>
+       <height>25</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/HOMARDGUI/MonIterInfo.cxx b/src/HOMARDGUI/MonIterInfo.cxx
new file mode 100644 (file)
index 0000000..4709685
--- /dev/null
@@ -0,0 +1,196 @@
+// Copyright (C) 2011-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+using namespace std;
+
+#include "MonIterInfo.h"
+
+#include <QFile>
+#include <QTextStream>
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -----------------------------------------------------------------------------------------
+MonIterInfo::MonIterInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString IterName)
+// -----------------------------------------------------------------------------------------
+/* Constructs a MonIterInfo
+ * Inherits from CasHomard
+ * Sets attributes to default values
+ */
+    :
+    Ui_IterInfo(),
+    _IterName(IterName),
+    _aCaseName(""),
+    _BlockSize(0),
+    _Connection(0),
+    _Diametre(0),
+    _Entanglement(0),
+    _Quality(0),
+    _Option(-1)
+{
+    MESSAGE("appel de _duplicate");
+      _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      setupUi(this);
+      setModal(modal);
+      InitConnect();
+
+      adjustSize();
+}
+
+// ------------------------------------------------------------------------
+MonIterInfo::~MonIterInfo()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonIterInfo::InitConnect()
+// ------------------------------------------------------------------------
+{
+    MESSAGE("InitConnect");
+    connect( CBBlockSize,    SIGNAL(stateChanged(int)), this, SLOT(SetBlockSize()));
+    connect( CBConnection,   SIGNAL(stateChanged(int)), this, SLOT(SetConnection()));
+    connect( CBDiametre,     SIGNAL(stateChanged(int)), this, SLOT(SetDiametre()));
+    connect( CBEntanglement, SIGNAL(stateChanged(int)), this, SLOT(SetEntanglement()));
+    connect( CBQuality,      SIGNAL(stateChanged(int)), this, SLOT(SetQuality()));
+
+    connect( buttonOk,       SIGNAL(pressed()), this, SLOT(PushOnOK()));
+    connect( buttonApply,    SIGNAL(pressed()), this, SLOT(PushOnApply()));
+    connect( buttonCancel,   SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonHelp,     SIGNAL(pressed()), this, SLOT(PushOnHelp()));
+}
+// -------------------------------
+bool MonIterInfo::PushOnApply()
+// --------------------------------
+{
+  MESSAGE("PushOnApply");
+
+  // Au moins une option a ete choisie
+  if ( ( _Quality == 0 ) and ( _Diametre == 0 ) and ( _Connection == 0 ) and ( _BlockSize == 0 ) and ( _Entanglement == 0 ) )
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_MESH_INFO_1") );
+    return false;
+  }
+
+  // Recuperation de l'iteration
+  aIter = _myHomardGen->GetIteration(_IterName.toStdString().c_str()) ;
+
+  // Lancement de l'analyse
+  try
+  {
+    aIter->MeshInfoOption( _Quality, _Diametre, _Connection, _BlockSize, _Entanglement, _Option );
+  }
+  catch( SALOME::SALOME_Exception& S_ex )
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QString(CORBA::string_dup(S_ex.details.text)) );
+    return false;
+  }
+
+  // Le bilan de l'analyse a afficher
+  QString aFileName = aIter->GetFileInfo() ;
+// // Creation de l'objet fichier QT associe
+//   QFile file( aFileName );
+// // Ouverture
+//   bool bOpen = file.open( QIODevice::ReadOnly | QIODevice::Text ) ;
+// //
+//   if ( bOpen )
+//   {
+//      Ui_EditFile() ;
+// // Lecture
+// //    Remarque : il serait plus clair de tout lire d'un coup mais cela ne marche pas !
+// //               alors on fait ligne par ligne et on cumule en ajoutant un saut de ligne.
+//       QTextStream stream( &file );
+//       QString tout;
+//       while ( !stream.atEnd() )
+//       {
+//         tout = tout + stream.readLine() + "\n" ;
+//       }
+//       QTBEditFile->setPlainText( tout );
+//   QMessageBox::information( 0, QObject::tr("HOM_MESH_INFO_0"),
+//                                tout );
+//   }
+
+  // Message simple en attendant de savoir faire
+  QMessageBox::information( 0, QObject::tr("HOM_MESH_INFO_0"),
+                               QObject::tr("HOM_MESH_INFO_2")+aFileName );
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+// ---------------------------
+void MonIterInfo::PushOnOK()
+// ---------------------------
+{
+     bool bOK = PushOnApply();
+     if ( bOK )  this->close();
+}
+//------------------------------
+void MonIterInfo::PushOnHelp()
+//-------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_mesh_info.html"));
+}
+// ------------------------------------------------------------------------
+void MonIterInfo::SetBlockSize()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetBlockSize ");
+  if ( CBBlockSize->isChecked() ) { _BlockSize = 1 ; }
+  else                            { _BlockSize = 0 ; }
+}
+// ------------------------------------------------------------------------
+void MonIterInfo::SetConnection()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetConnection ");
+  if ( CBConnection->isChecked() ) { _Connection = 1 ; }
+  else                             { _Connection = 0 ; }
+}
+// ------------------------------------------------------------------------
+void MonIterInfo::SetDiametre()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetDiametre ");
+  if ( CBDiametre->isChecked() ) { _Diametre = 1 ; }
+  else                           { _Diametre = 0 ; }
+}
+// ------------------------------------------------------------------------
+void MonIterInfo::SetEntanglement()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetEntanglement ");
+  if ( CBEntanglement->isChecked() ) { _Entanglement = 1 ; }
+  else                               { _Entanglement = 0 ; }
+}
+// ------------------------------------------------------------------------
+void MonIterInfo::SetQuality()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetQuality ");
+  if ( CBQuality->isChecked() ) { _Quality = 1 ; }
+  else                          { _Quality = 0 ; }
+}
diff --git a/src/HOMARDGUI/MonIterInfo.h b/src/HOMARDGUI/MonIterInfo.h
new file mode 100644 (file)
index 0000000..a0d21d1
--- /dev/null
@@ -0,0 +1,77 @@
+// Copyright (C) 2011-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MON_ITERINFO_H
+#define MON_ITERINFO_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+
+#include <IterInfo.h>
+#include <QDialog>
+#include <QWidget>
+#include "EditFile.h"
+
+class QListBox;
+
+class MonIterInfo : public QDialog, public Ui_IterInfo
+{
+    Q_OBJECT
+
+public:
+    MonIterInfo( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString IterName);
+    ~MonIterInfo();
+
+protected :
+    MonIterInfo( QWidget* parent, HOMARD::HOMARD_Gen_var myHomardGen, QString IterName );
+
+    QString _IterName;
+    QString _aCaseName;
+
+    int _BlockSize;
+    int _Connection;
+    int _Diametre;
+    int _Entanglement;
+    int _Quality;
+    int _Option;
+
+    HOMARD::HOMARD_Iteration_var aIter ;
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+
+    virtual void InitConnect();
+
+public slots:
+
+    virtual void SetBlockSize();
+    virtual void SetConnection();
+    virtual void SetEntanglement();
+    virtual void SetDiametre();
+    virtual void SetQuality();
+
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+
+};
+
+#endif // MON_ITERINFO_H
diff --git a/src/HOMARDGUI/MonMeshInfo.cxx b/src/HOMARDGUI/MonMeshInfo.cxx
new file mode 100644 (file)
index 0000000..ffffad6
--- /dev/null
@@ -0,0 +1,263 @@
+// Copyright (C) 2011-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+using namespace std;
+
+#include "MonMeshInfo.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+
+// -----------------------------------------------------------------------------------------
+MonMeshInfo::MonMeshInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen)
+// -----------------------------------------------------------------------------------------
+/* Constructs a MonMeshInfo
+ * Inherits from CasHomard
+ * Sets attributes to default values
+ */
+    :
+    Ui_MeshInfo(),
+    _aCaseName(""),_aDirName(""),
+    _BlockSize(0),
+    _Connection(0),
+    _Diametre(0),
+    _Entanglement(0),
+    _Quality(0)
+{
+      _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+      setupUi(this);
+      setModal(modal);
+      InitConnect();
+
+      SetNewCaseName() ;
+      adjustSize();
+}
+
+// ------------------------------------------------------------------------
+MonMeshInfo::~MonMeshInfo()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonMeshInfo::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( LECaseName,     SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
+    connect( PushDir,        SIGNAL(pressed()), this, SLOT(SetDirName()));
+    connect( PushFichier,    SIGNAL(pressed()), this, SLOT(SetFileName()));
+
+    connect( CBBlockSize,    SIGNAL(stateChanged(int)), this, SLOT(SetBlockSize()));
+    connect( CBConnection,   SIGNAL(stateChanged(int)), this, SLOT(SetConnection()));
+    connect( CBDiametre,     SIGNAL(stateChanged(int)), this, SLOT(SetDiametre()));
+    connect( CBEntanglement, SIGNAL(stateChanged(int)), this, SLOT(SetEntanglement()));
+    connect( CBQuality,      SIGNAL(stateChanged(int)), this, SLOT(SetQuality()));
+
+    connect( buttonOk,       SIGNAL(pressed()), this, SLOT(PushOnOK()));
+    connect( buttonApply,    SIGNAL(pressed()), this, SLOT(PushOnApply()));
+    connect( buttonCancel,   SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonHelp,     SIGNAL(pressed()), this, SLOT(PushOnHelp()));
+}
+// -------------------------------
+bool MonMeshInfo::PushOnApply()
+// --------------------------------
+{
+  MESSAGE("PushOnApply");
+  QString aCaseName=LECaseName->text().trimmed();
+  if ( aCaseName == "" )
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_CASE_NAME") );
+    return false;
+  }
+
+  QString aDirName=LEDirName->text().trimmed();
+  if (aDirName == QString(""))
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_CASE_DIRECTORY_1") );
+    return false;
+  }
+  if ((aDirName != _aDirName) and (_myHomardGen->VerifieDir( aDirName.toStdString().c_str()) == false))
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_CASE_DIRECTORY_2") );
+    return false;
+  }
+  if (chdir(aDirName.toStdString().c_str()) != 0)
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_CASE_DIRECTORY_3") );
+    return false;
+  }
+
+  QString aFileName=LEFileName->text().trimmed();
+  if (aFileName ==QString(""))
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_CASE_MESH") );
+    return false;
+  }
+
+  QString aMeshName = HOMARD_QT_COMMUN::LireNomMaillage(aFileName);
+  if (aMeshName == "" )
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_MED_FILE_2") );
+    return false;
+  }
+  if ( ( _Quality == 0 ) and ( _Diametre == 0 ) and ( _Connection == 0 ) and ( _BlockSize == 0 ) and ( _Entanglement == 0 ) )
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_MESH_INFO") );
+    return false;
+  }
+
+  if (aCaseName != _aCaseName )
+  {
+    _aCaseName = aCaseName;
+    try
+    {
+      _myHomardGen->MeshInfo( \
+            CORBA::string_dup(_aCaseName.toStdString().c_str()),  \
+            CORBA::string_dup(aMeshName.toStdString().c_str()),  \
+            CORBA::string_dup(aFileName.toStdString().c_str()),  \
+            CORBA::string_dup(aDirName.toStdString().c_str()),  \
+            _Quality, _Diametre, _Connection, _BlockSize, _Entanglement );
+    }
+    catch( SALOME::SALOME_Exception& S_ex )
+    {
+      QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                QString(CORBA::string_dup(S_ex.details.text)) );
+      return false;
+    }
+  }
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+// ---------------------------
+void MonMeshInfo::PushOnOK()
+// ---------------------------
+{
+     bool bOK = PushOnApply();
+     if ( bOK )  this->close();
+}
+//------------------------------
+void MonMeshInfo::PushOnHelp()
+//-------------------------------
+{
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"));
+}
+// ---------------------------------
+void MonMeshInfo::SetNewCaseName()
+// ------------------------------
+{
+  HOMARD::listeCases_var  MyCases = _myHomardGen->GetAllCasesName();
+  int num = 0; QString aCaseName="";
+  while (aCaseName=="" )
+  {
+    aCaseName.setNum(num+1) ;
+    aCaseName.insert(0, QString("Case_")) ;
+    for ( int i=0; i<MyCases->length(); i++)
+    {
+      if ( aCaseName ==  QString((MyCases)[i]))
+      {
+          num=num+1;
+          aCaseName="";
+          break;
+      }
+   }
+  }
+  LECaseName->clear() ;
+  LECaseName->insert(aCaseName);
+}
+
+// ------------------------------------------------------------------------
+void MonMeshInfo::SetDirName()
+// ------------------------------------------------------------------------
+{
+  QString aDirName=QFileDialog::getExistingDirectory ();
+  if (!(aDirName.isEmpty()))LEDirName->setText(aDirName);
+}
+// ------------------------------------------------------------------------
+void MonMeshInfo::SetFileName()
+// ------------------------------------------------------------------------
+{
+  QString fileName0 = LEFileName->text().trimmed();
+  QString fileName = HOMARD_QT_COMMUN::PushNomFichier();
+  if (fileName.isEmpty()) fileName = fileName0 ;
+  LEFileName->setText(fileName);
+}
+// ------------------------------------------------------------------------
+void MonMeshInfo::CaseNameChanged()
+// ------------------------------------------------------------------------
+{
+    if (_aCaseName != LECaseName->text().trimmed())
+    {
+       LEFileName->setReadOnly(false);
+       PushFichier->show();
+    }
+}
+// ------------------------------------------------------------------------
+void MonMeshInfo::SetBlockSize()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetBlockSize ");
+  if ( CBBlockSize->isChecked() ) { _BlockSize = 1 ; }
+  else                            { _BlockSize = 0 ; }
+}
+// ------------------------------------------------------------------------
+void MonMeshInfo::SetConnection()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetConnection ");
+  if ( CBConnection->isChecked() ) { _Connection = 1 ; }
+  else                             { _Connection = 0 ; }
+}
+// ------------------------------------------------------------------------
+void MonMeshInfo::SetDiametre()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetDiametre ");
+  if ( CBDiametre->isChecked() ) { _Diametre = 1 ; }
+  else                           { _Diametre = 0 ; }
+}
+// ------------------------------------------------------------------------
+void MonMeshInfo::SetEntanglement()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetEntanglement ");
+  if ( CBEntanglement->isChecked() ) { _Entanglement = 1 ; }
+  else                               { _Entanglement = 0 ; }
+}
+// ------------------------------------------------------------------------
+void MonMeshInfo::SetQuality()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de SetQuality ");
+  if ( CBQuality->isChecked() ) { _Quality = 1 ; }
+  else                          { _Quality = 0 ; }
+}
diff --git a/src/HOMARDGUI/MonMeshInfo.h b/src/HOMARDGUI/MonMeshInfo.h
new file mode 100644 (file)
index 0000000..5892ba5
--- /dev/null
@@ -0,0 +1,74 @@
+// Copyright (C) 2011-2012  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MON_MESHINFO_H
+#define MON_MESHINFO_H
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Cas)
+
+#include <MeshInfo.h>
+#include <QWidget>
+
+class MonMeshInfo : public QDialog, public Ui_MeshInfo
+{
+    Q_OBJECT
+
+public:
+    MonMeshInfo( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen);
+    ~MonMeshInfo();
+
+protected :
+    QString _aCaseName;
+    QString _aDirName;
+
+    int _BlockSize;
+    int _Connection;
+    int _Diametre;
+    int _Entanglement;
+    int _Quality;
+
+    HOMARD::HOMARD_Cas_var aCase ;
+    HOMARD::HOMARD_Gen_var _myHomardGen;
+
+    virtual void InitConnect();
+    virtual void SetNewCaseName();
+
+public slots:
+    virtual void SetDirName();
+    virtual void SetFileName();
+
+    virtual void SetBlockSize();
+    virtual void SetConnection();
+    virtual void SetEntanglement();
+    virtual void SetDiametre();
+    virtual void SetQuality();
+
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+
+    virtual void CaseNameChanged();
+};
+
+#endif // MON_MESHINFO_H
index 8e456ec36919fc497a87ba4a5e79c8ff896ea23f..ec75d4366a971aea0fb43e80f59f3235ba2d7178 100755 (executable)
@@ -185,7 +185,6 @@ void HOMARD_Cas_i::SetGroups( const HOMARD::ListGroupType& ListGroup )
   {
     ListString.push_back(std::string(ListGroup[i]));
   }
-
   myHomardCas->SetGroups( ListString );
 }
 //=============================================================================
@@ -259,6 +258,26 @@ CORBA::Long HOMARD_Cas_i::GetPyram()
   return myHomardCas->GetPyram();
 }
 //=============================================================================
+void HOMARD_Cas_i::MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte)
+{
+  MESSAGE ( "MeshInfo : information sur le maillage initial du cas" );
+  ASSERT( myHomardCas );
+//
+// Nom de l'iteration
+  char* IterName = GetIter0Name() ;
+  CORBA::Long etatMenage = -1 ;
+  CORBA::Long modeHOMARD = 7 ;
+  CORBA::Long Option = 1 ;
+  if ( Qual != 0 ) { modeHOMARD = modeHOMARD*5 ; }
+  if ( Diam != 0 ) { modeHOMARD = modeHOMARD*19 ; }
+  if ( Conn != 0 ) { modeHOMARD = modeHOMARD*11 ; }
+  if ( Tail != 0 ) { modeHOMARD = modeHOMARD*13 ; }
+  if ( Inte != 0 ) { modeHOMARD = modeHOMARD*3 ; }
+  CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option) ;
+  MESSAGE ( "MeshInfo : codret = " << codret );
+  return ;
+}
+//=============================================================================
 //=============================================================================
 // Liens avec les autres structures
 //=============================================================================
index 740e2eef6b2fb8e87c48ecaaa59ebf001caee35c..27355f2a5b0616b6cd7b72b947f0b8ee5550501a 100644 (file)
@@ -85,6 +85,8 @@ public:
   void                   SetPyram( CORBA::Long Pyram );
   CORBA::Long            GetPyram();
 
+  void                   MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte);
+
 // Liens avec les autres structures
   char*                  GetIter0Name();
   HOMARD::HOMARD_Iteration_ptr GetIter0() ;
index 3f54b8d5d7ffa780523abf6c2ac3aed993b0b9e6..6aba5456e9cb528e553ad3325321e16f4b80d32b 100755 (executable)
@@ -499,29 +499,6 @@ void HOMARD_Gen_i::InvalideBoundary(const char* BoundaryName)
   };
 }
 //=============================================================================
-void HOMARD_Gen_i::InvalideZone(const char* ZoneName)
-{
-  MESSAGE( "InvalideZone : ZoneName    = " << ZoneName );
-  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
-  if (CORBA::is_nil(myZone))
-  {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid Zone ";
-      throw SALOME::SALOME_Exception(es);
-      return ;
-  };
-  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  );
@@ -597,11 +574,12 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter)
         throw SALOME::SALOME_Exception(es);
         return ;
     };
-    const char* dirParent  = myCase->GetDirName();
+    const char* dirCase    = myCase->GetDirName();
     const char* nomDir     = myIteration->GetDirName();
     const char* nomFichier = myIteration->GetMeshFile();
-    std::string commande= "rm -rf " + std::string(dirParent) + "/" + std::string(nomDir);
+    std::string commande= "rm -rf " + std::string(dirCase) + "/" + std::string(nomDir);
     commande = commande + ";rm -rf " + std::string(nomFichier);
+    MESSAGE ( "commande = " << commande );
     if ((system(commande.c_str())) != 0)
     {
           SALOME::ExceptionStruct es;
@@ -617,6 +595,85 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter)
 
 }
 //=============================================================================
+void HOMARD_Gen_i::InvalideIterInfo(const char* nomIter)
+{
+  MESSAGE("InvalideIterInfo : nomIter = " << nomIter);
+  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::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())
+  {
+      SALOMEDS::SObject_var so = aIter->Value();
+      SALOMEDS::GenericAttribute_var anAttr;
+      if (!so->FindAttribute(anAttr, "AttributeComment")) continue;
+      SALOMEDS::AttributeComment_var aCommentAttr = SALOMEDS::AttributeComment::_narrow(anAttr);
+      std::string value (aCommentAttr->Value());
+/*      MESSAGE("... value = " << value);*/
+      if( (value == std::string("logInfo")) or ( value == std::string("SummaryInfo")) )
+      {
+        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* dirCase  = myCase->GetDirName();
+  const char* nomDir   = myIteration->GetDirName();
+  std::string commande = "rm -f " + std::string(dirCase) + "/" + std::string(nomDir) + "/info* " ;
+  commande += std::string(dirCase) + "/" + std::string(nomDir) + "/Liste.*info" ;
+/*  MESSAGE ( "commande = " << commande );*/
+  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 ;
+  }
+
+}
+//=============================================================================
+void HOMARD_Gen_i::InvalideZone(const char* ZoneName)
+{
+  MESSAGE( "InvalideZone : ZoneName    = " << ZoneName );
+  HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+  if (CORBA::is_nil(myZone))
+  {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = "Invalid Zone ";
+      throw SALOME::SALOME_Exception(es);
+      return ;
+  };
+  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());
+  }
+}
+//=============================================================================
 //=============================================================================
 //
 //=============================================================================
@@ -909,6 +966,28 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::GetBoundary(const char* nomBoundary)
 //=============================================================================
 //=============================================================================
 
+//=============================================================================
+//=============================================================================
+// Informations
+//=============================================================================
+//=============================================================================
+void HOMARD_Gen_i::MeshInfo(const char* nomCas, const char* MeshName, const char* MeshFile, const char* DirName, CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte)
+{
+  MESSAGE ( "MeshInfo : nomCas = " << nomCas << ", MeshName = " << MeshName << ", MeshFile = " << MeshFile  );
+  MESSAGE ( "Qual = " << Qual << ", Diam = " << Diam << ", Conn = " << Conn << ", Tail = " << Tail << ", Inte = " << Inte  );
+  IsValidStudy () ;
+
+// Creation du cas
+  HOMARD::HOMARD_Cas_ptr myCase = CreateCase(nomCas, MeshName, MeshFile) ;
+  myCase->SetDirName(DirName) ;
+// Analyse
+  myCase->MeshInfo(Qual, Diam, Conn, Tail, Inte) ;
+
+  return ;
+}
+//=============================================================================
+//=============================================================================
+
 //=============================================================================
 //=============================================================================
 // Recuperation des structures par le contexte
@@ -1042,7 +1121,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char*
   HOMARD::HOMARD_Iteration_var anIter = newIteration();
   myContextMap[GetCurrentStudyID()]._mesIterations[NomIteration] = anIter;
   std::ostringstream DirName;
-  DirName << "I_00";
+  DirName << "I00";
 
   anIter->SetDirName(DirName.str().c_str());
   anIter->SetName(NomIteration.c_str());
@@ -1413,20 +1492,215 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneNam
 
 //=============================================================================
 //=============================================================================
-// Calcul d'une iteration
+// Traitement d'une iteration
+// etatMenage = 1 : destruction du repertoire d'execution
+// modeHOMARD  = 1 : adaptation
+//            != 1 : information avec les options modeHOMARD
+// Option >0 : appel depuis python
+//        <0 : appel depuis GUI
 //=============================================================================
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMenage)
+CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option)
 {
-  MESSAGE ( "Compute : calcul de " << NomIteration );
+  MESSAGE ( "Compute : traitement de " << NomIteration << ", avec modeHOMARD = " << modeHOMARD << ", avec Option = " << Option );
+
+  // A. Prealable
+  int codret = 0;
 
-// A. Prealable
-// A.1. La base
+  // A.1. L'objet iteration
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[NomIteration];
   ASSERT(!CORBA::is_nil(myIteration));
 
-// A.2. On ne calcule pas l iteration 0
+  // A.2. Numero de l'iteration
+  //     siterp1 : numero de l'iteration a traiter
+  //     Si adaptation :
+  //        siter   : numero de l'iteration parent, ou 0 si deja au debut mais cela ne servira pas !
+  //     Ou si information :
+  //        siter = siterp1
+  int NumeIter = myIteration->GetNumber();
+  std::string siterp1 ;
+  std::stringstream saux1 ;
+  saux1 << NumeIter ;
+  siterp1 = saux1.str() ;
+  if (NumeIter < 10) { siterp1 = "0" + siterp1 ; }
+
+  std::string siter ;
+  if ( modeHOMARD==1 )
+  {
+    std::stringstream saux0 ;
+    int iaux = max(0, NumeIter-1) ;
+    saux0 << iaux ;
+    siter = saux0.str() ;
+    if (NumeIter < 11) { siter = "0" + siter ; }
+  }
+  else
+  { siter = siterp1 ; }
+
+  // A.3. Le cas
+  const char* nomCas = myIteration->GetCaseName();
+  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
+  ASSERT(!CORBA::is_nil(myCase));
+
+  // B. Les repertoires
+  // B.1. Le repertoire courant
+  char* nomDirWork = getenv("PWD") ;
+  // B.2. Le sous-repertoire de l'iteration a traiter
+  char* DirCompute = ComputeDir(myCase, myIteration, etatMenage);
+  MESSAGE( ". DirCompute = " << DirCompute );
+
+  // C. Le fichier des messages
+  // C.1. Le deroulement de l'execution de HOMARD
+  std::string LogFile = DirCompute ;
+  LogFile += "/Liste" ;
+  if ( modeHOMARD == 1 ) { LogFile += "." + siter + ".vers." + siterp1 ; }
+  LogFile += ".log" ;
+  MESSAGE (". LogFile = " << LogFile);
+  if ( modeHOMARD == 1 ) { myIteration->SetLogFile(LogFile.c_str()); }
+  // C.2. Le bilan de l'analyse du maillage
+  std::string FileInfo = DirCompute ;
+  FileInfo += "/" ;
+  if ( modeHOMARD == 1 ) { FileInfo += "apad" ; }
+  else
+  { if ( NumeIter == 0 ) { FileInfo += "info_av" ; }
+    else                 { FileInfo += "info_ap" ; }
+  }
+  FileInfo += "." + siterp1 + ".bilan" ;
+  myIteration->SetFileInfo(FileInfo.c_str());
+
+   // D. On passe dans le repertoire de l'iteration a calculer
+  MESSAGE ( ". On passe dans DirCompute = " << DirCompute );
+  chdir(DirCompute) ;
+
+  // E. Les donnees de l'execution HOMARD
+  // E.1. L'objet du texte du fichier de configuration
+  HomardDriver* myDriver = new HomardDriver(siter, siterp1);
+  myDriver->TexteInit(DirCompute, LogFile);
+
+  // E.2. Le maillage associe a l'iteration
+  const char* NomMesh = myIteration->GetMeshName();
+  MESSAGE ( ". NomMesh = " << NomMesh );
+  const char* MeshFile = myIteration->GetMeshFile();
+  MESSAGE ( ". MeshFile = " << MeshFile );
+
+  // E.3. Les donnees du traitement HOMARD
+  int iaux ;
+  if ( modeHOMARD == 1 )
+  {
+    iaux = 1 ;
+    myDriver->TexteMaillageHOMARD( DirCompute, siterp1, iaux ) ;
+    myDriver->TexteMaillage(NomMesh, MeshFile, 1);
+    codret = ComputeAdap(myCase, myIteration, etatMenage, myDriver, Option) ;
+  }
+  else
+  {
+    InvalideIterInfo(NomIteration);
+    myDriver->TexteInfo( modeHOMARD, NumeIter ) ;
+    iaux = 0 ;
+    myDriver->TexteMaillageHOMARD( DirCompute, siterp1, iaux ) ;
+    myDriver->TexteMaillage(NomMesh, MeshFile, 0);
+    myDriver->CreeFichierDonn();
+  }
+
+  // E.4. Ajout des informations liees a l'eventuel suivi de frontiere
+  DriverTexteBoundary(myCase, myDriver) ;
+
+  // E.5. Ecriture du texte dans le fichier
+  if (codret == 0)
+  { myDriver->CreeFichier(); }
+
+// G. Execution
+//
+  int codretexec = 12 ;
+  if (codret == 0)
+  {
+    codretexec = myDriver->ExecuteHomard(Option);
+//
+    MESSAGE ( "Erreur en executant HOMARD : " << codretexec );
+    if ( modeHOMARD == 1 )
+    {
+      if (codretexec == 0) { SetEtatIter(NomIteration,true); }
+      else                 { SetEtatIter(NomIteration,false); }
+      // GERALD -- QMESSAGE BOX
+    }
+  }
+
+  // H. Gestion des resultats
+  if (codret == 0)
+  {
+    std::string Commentaire ;
+    // H.1. Le fichier des messages, dans tous les cas
+    Commentaire = "log" ;
+    if ( modeHOMARD == 1 ) { Commentaire += " " + siterp1 ; }
+    else                   { Commentaire += "Info" ; }
+    PublishFileUnderIteration(NomIteration, LogFile.c_str(), Commentaire.c_str());
+
+    // H.2. Si tout s'est bien passe :
+    if (codretexec == 0)
+    {
+    // H.2.1. Le fichier de bilan
+      Commentaire = "Summary" ;
+      if ( modeHOMARD == 1 ) { Commentaire += " " + siterp1 ; }
+      else                   { Commentaire += "Info" ; }
+      PublishFileUnderIteration(NomIteration, FileInfo.c_str(), Commentaire.c_str());
+    // H.2.2. Le fichier de  maillage obtenu
+      if ( modeHOMARD == 1 )
+      {
+        std::stringstream saux0 ;
+        Commentaire = "Iteration" ;
+        Commentaire += " " + siter ;
+        PublishFileUnderIteration(NomIteration, MeshFile, Commentaire.c_str());
+        PublishResultInSmesh(MeshFile, 1);
+      }
+    }
+  // H.3 Message d'erreur en cas de probleme
+    else
+    {
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      std::string text = "Error during the adaptation.\n" ;
+      try
+      {
+          ifstream fichier(LogFile.c_str(), ios::in);
+          string ligne;
+          while(getline(fichier, ligne) and (ligne != "===== HOMARD ===== STOP ====="));
+          while (getline(fichier, ligne)) { text += ligne+ "\n";};
+      }
+      catch (...) {
+        text += "no log file ....";
+      }
+      es.text = CORBA::string_dup(text.c_str());
+      throw SALOME::SALOME_Exception(es);
+    }
+  }
+
+  // I. Menage et retour dans le repertoire du cas
+  if (codret == 0)
+  {
+    delete myDriver;
+    MESSAGE ( ". On retourne dans nomDirWork = " << nomDirWork );
+    chdir(nomDirWork);
+  }
+
+  return codretexec ;
+}
+//=============================================================================
+// Calcul d'une iteration : partie specifique a l'adaptation
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option)
+{
+  MESSAGE ( "ComputeAdap" );
+
+  // A. Prealable
+  // A.1. Bases
+  int codret = 0;
+  // Numero de l'iteration
   int NumeIter = myIteration->GetNumber();
+  std::stringstream saux0 ;
+  saux0 << NumeIter-1 ;
+  std::string siter = saux0.str() ;
+  if (NumeIter < 11) { siter = "0" + siter ; }
+
+  // A.2. On ne calcule pas l iteration 0
   if ( NumeIter == 0 )
   {
       SALOME::ExceptionStruct es;
@@ -1436,7 +1710,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
       return 1;
   };
 
-// A.3. On verifie qu il y a une hypothese (erreur improbable);
+  // A.3. On verifie qu il y a une hypothese (erreur improbable);
   const char* nomHypo = myIteration->GetHypoName();
   if (std::string(nomHypo) == std::string(""))
   {
@@ -1445,17 +1719,19 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
       es.text= "This iteration does not have any associated hypothesis.";
       throw SALOME::SALOME_Exception(es);
       return 2;
-  }
+  };
   HOMARD::HOMARD_Hypothesis_var myHypo = myContextMap[GetCurrentStudyID()]._mesHypotheses[nomHypo];
   ASSERT(!CORBA::is_nil(myHypo));
 
-  // A.4. L'iteration parent
+  // B. L'iteration parent
   const char* nomIterationParent = myIteration->GetIterParentName();
   HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterationParent];
   ASSERT(!CORBA::is_nil(myIterationParent));
+  // Si l'iteration parent n'est pas calculee, on le fait (recursivite amont)
   if ( ! myIterationParent->GetEtat() )
   {
-      int codret = Compute(nomIterationParent, etatMenage);
+      int iaux = 1 ;
+      int codret = Compute(nomIterationParent, etatMenage, iaux, Option);
       if (codret != 0)
       {
         // GERALD -- QMESSAGE BOX
@@ -1463,167 +1739,52 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
       }
   };
 
-  // A.5. Le cas
-  const char* nomCas = myIteration->GetCaseName();
-  HOMARD::HOMARD_Cas_var myCase = myContextMap[GetCurrentStudyID()]._mesCas[nomCas];
-  ASSERT(!CORBA::is_nil(myCase));
-
-  // A.6. Les numeros d'iterations
-  int codret = 0;
-  std::stringstream saux0 ;
-  saux0 << NumeIter - 1 ;
-  std::string siter = saux0.str() ;
-  if (NumeIter < 11) { siter = "0" + siter ; }
-//
-  std::stringstream saux1 ;
-  saux1 << NumeIter ;
-  std::string siterp1 = saux1.str() ;
-  if (NumeIter < 10) { siterp1 = "0" + siterp1 ; }
-
-  // B. Les repertoires
-  // B.1. Le repertoire courant
-  char* nomDirWork = getenv("PWD") ;
-  // B.2. Le repertoire du cas
-  const char* nomDirCase = myCase->GetDirName();
-  MESSAGE ( ". nomDirCase = " << nomDirCase );
+  // C. Le sous-repertoire de l'iteration precedente
+  char* DirComputePa = ComputeDirPa(myCase, myIteration);
+  MESSAGE( ". DirComputePa = " << DirComputePa );
 
-  // B.3. Le sous-repertoire de l'iteration a calculer, puis le repertoire complet a creer
-  // B.3.1. Le nom du sous-repertoire
-  const char* nomDirIt = myIteration->GetDirName();
+  // D. Les donnees de l'adaptation HOMARD
+  // D.1. Le type de conformite
+  int ConfType = myCase->GetConfType();
+  MESSAGE ( ". ConfType = " << ConfType );
 
-  // B.3.2. Le nom complet du sous-repertoire
-  std::stringstream DirCompute ;
-  DirCompute << nomDirCase << "/" << nomDirIt;
-  MESSAGE (". DirCompute = " << DirCompute.str() );
+  // D.2. Le maillage de depart
+  const char* NomMeshParent = myIterationParent->GetMeshName();
+  MESSAGE ( ". NomMeshParent = " << NomMeshParent );
+  const char* MeshFileParent = myIterationParent->GetMeshFile();
+  MESSAGE ( ". MeshFileParent = " << MeshFileParent );
 
-  // B.3.3. Si le sous-repertoire n'existe pas, on le cree
-  //        Si le sous-repertoire existe :
-  //         etatMenage = 0 : on sort en erreur si le repertoire n'est pas vide
-  //         etatMenage = 1 : on fait le menage du repertoire
-  if (chdir(DirCompute.str().c_str()) != 0)
+  // D.3. Le maillage associe a l'iteration
+  const char* MeshFile = myIteration->GetMeshFile();
+  MESSAGE ( ". MeshFile = " << MeshFile );
+  FILE *file = fopen(MeshFile,"r");
+  if (file != NULL)
   {
-//  Creation du repertoire car il n'existe pas :
-    if (mkdir(DirCompute.str().c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0)
+    fclose(file);
+    if (etatMenage == 0)
     {
-       // GERALD -- QMESSAGE BOX
-       std::cerr << "Pb Creation du repertoire DirCompute = " << DirCompute.str() << std::endl;
-       ASSERT("Pb a la creation du repertoire" == 0);
+          SALOME::ExceptionStruct es;
+          es.type = SALOME::BAD_PARAM;
+          std::string text = "MeshFile : " + std::string(MeshFile) + " already exists ";
+          es.text = CORBA::string_dup(text.c_str());
+          throw SALOME::SALOME_Exception(es);
+          return 4;
     }
-  }
-  else
-  {
-//  Le repertoire existe
-//  On demande de faire le menage de son contenu :
-    if (etatMenage != 0)
-    {
-       MESSAGE (". Menage du repertoire DirCompute = " << DirCompute.str());
-       std::string commande= "rm -rf " + DirCompute.str()+"/*" ;
-       int codret = system(commande.c_str());
-       if (codret != 0)
-       {
-         // GERALD -- QMESSAGE BOX
-         std::cerr << ". Menage du repertoire de calcul" << DirCompute.str() << std::endl;
-         ASSERT("Pb au menage du repertoire de calcul" == 0);
-       }
-    }
-//  On n'a pas demande de faire le menage de son contenu : on sort en erreur :
     else
     {
-       DIR *dp;
-       struct dirent *dirp;
-       dp  = opendir(DirCompute.str().c_str());
-       bool result = true;
-       while ((dirp = readdir(dp)) != NULL && result )
-       {
-            std::string file_name(dirp->d_name);
-            result = file_name.empty() || file_name == "." || file_name == ".."; //if any file - break and return false
-       }
-       closedir(dp);
-       if ( result == false)
-       {
-          SALOME::ExceptionStruct es;
-          es.type = SALOME::BAD_PARAM;
-          std::string text = "Directory : " + DirCompute.str() + "is not empty";
-          es.text = CORBA::string_dup(text.c_str());
-          throw SALOME::SALOME_Exception(es);
-          return 3;
-       }
-    }
-  }
-
-  // B.4. Le sous-repertoire de l'iteration precedente
-  const char* nomDirItPa ;
-  std::stringstream DirComputePa ;
-  if (NumeIter == 1)
-  {
-    nomDirItPa = nomDirIt;
-    DirComputePa << DirCompute.str();
-  }
-  else
-  {
-    nomDirItPa = myIterationParent->GetDirName();
-    DirComputePa << nomDirCase << "/" << nomDirItPa;
-  }
-  MESSAGE( ". nomDirItPa = " << nomDirItPa);
-  MESSAGE( ". DirComputePa = " << DirComputePa.str() );
-
-  // B.5. Le fichier des messages
-  std::string MessFile = DirCompute.str() + "/Liste." + siter + ".vers." + siterp1 ;
-  MESSAGE (". MessFile = " << MessFile);
-  myIteration->SetMessFile(MessFile.c_str());
-
-   // C. On passe dans le repertoire de l'iteration a calculer
-  MESSAGE ( ". On passe dans DirCompute = " << DirCompute.str() );
-  chdir(DirCompute.str().c_str()) ;
-
-  // D. Les donnees du calcul HOMARD
-  // D.1. Le type de conformite
-  int ConfType = myCase->GetConfType();
-  MESSAGE ( ". ConfType = " << ConfType );
-
-  // D.2. Le maillage n
-  const char* NomMeshParent = myIterationParent->GetMeshName();
-  MESSAGE ( ". NomMeshParent = " << NomMeshParent );
-  const char* MeshFileParent = myIterationParent->GetMeshFile();
-  MESSAGE ( ". MeshFileParent = " << MeshFileParent );
-
-  // D.3. Le maillage n+1
-  const char* NomMesh = myIteration->GetMeshName();
-  MESSAGE ( ". NomMesh = " << NomMesh );
-  const char* MeshFile = myIteration->GetMeshFile();
-  MESSAGE ( ". MeshFile = " << MeshFile );
-  FILE *file = fopen(MeshFile,"r");
-  if (file != NULL)
-  {
-     fclose(file);
-     if (etatMenage == 0)
-     {
-          SALOME::ExceptionStruct es;
-          es.type = SALOME::BAD_PARAM;
-          std::string text = "MeshFile : " + std::string(MeshFile) + " already exists ";
-          es.text = CORBA::string_dup(text.c_str());
-          throw SALOME::SALOME_Exception(es);
-          return 4;
-     }
-     else
-     {
-         std::string commande = "rm -f " + std::string(MeshFile);
-         codret = system(commande.c_str());
-         if (codret != 0)
-         {
+        std::string commande = "rm -f " + std::string(MeshFile);
+        codret = system(commande.c_str());
+        if (codret != 0)
+        {
           SALOME::ExceptionStruct es;
           es.type = SALOME::BAD_PARAM;
           std::string text = "PB with meshfile destruction ";
           es.text = CORBA::string_dup(text.c_str());
           throw SALOME::SALOME_Exception(es);
           return 5;
-         }
+        }
       }
   }
-  else
-  {
-     codret = 0 ;
-  };
 
   // D.4. Les types de raffinement et de deraffinement
   // Les appels corba sont lourds, il vaut mieux les grouper
@@ -1633,119 +1794,256 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   int TypeRaff = (*ListTypes)[1];
   int TypeDera = (*ListTypes)[2];
 
-  // D.5. L'option d'interpolation des champs
-  int TypeFieldInterp = myHypo->GetTypeFieldInterp();
-
   // E. Texte du fichier de configuration
   // E.1. Incontournables du texte
-  HomardDriver* myDriver = new HomardDriver(siter, siterp1);
-  myDriver->TexteInit(DirCompute.str(), DirComputePa.str(),MessFile);
+  myDriver->TexteAdap();
+  int iaux = 0 ;
+  myDriver->TexteMaillageHOMARD( DirComputePa, siter, iaux ) ;
   myDriver->TexteMaillage(NomMeshParent, MeshFileParent, 0);
-  myDriver->TexteMaillage(NomMesh, MeshFile, 1);
   myDriver->TexteConfRaffDera(ConfType, TypeAdap, TypeRaff, TypeDera);
 
   // E.2. Ajout des informations liees aux zones eventuelles
-  if (TypeAdap == 0)
+  if ( TypeAdap == 0 )
+  { DriverTexteZone(myHypo, myDriver) ; }
+
+  // E.3. Ajout des informations liees aux champs eventuels
+  if ( TypeAdap == 1 )
+  { DriverTexteField(myIteration, myHypo, myDriver) ; }
+
+  // E.4. Ajout des informations liees au filtrage eventuel par les groupes
+  HOMARD::ListGroupType* listeGroupes = myHypo->GetGroups();
+  int numberOfGroups = listeGroupes->length();
+  MESSAGE( ". Filtrage par " << numberOfGroups << " groupes");
+  if (numberOfGroups > 0)
   {
-    HOMARD::listeZonesHypo* ListZone = myHypo->GetZones();
-    int numberOfZonesx2 = ListZone->length();
-    int NumZone ;
+    for (int NumGroup = 0; NumGroup< numberOfGroups; NumGroup++)
+    {
+      std::string GroupName = std::string((*listeGroupes)[NumGroup]);
+      MESSAGE( "... GroupName = " << GroupName );
+      myDriver->TexteGroup(GroupName);
+    }
+  }
 
-    for (int iaux = 0; iaux< numberOfZonesx2; iaux++)
+  // E.5. Ajout des informations liees a l'eventuelle interpolation des champs
+  DriverTexteFieldInterp(myIteration, myHypo, myDriver) ;
+
+  // E.6. Ajout des options avancees
+  int Pyram = myCase->GetPyram();
+  MESSAGE ( ". Pyram = " << Pyram );
+  int NivMax = myHypo->GetNivMax();
+  MESSAGE ( ". NivMax = " << NivMax );
+  double DiamMin = myHypo->GetDiamMin() ;
+  MESSAGE ( ". DiamMin = " << DiamMin );
+  int AdapInit = myHypo->GetAdapInit();
+  MESSAGE ( ". AdapInit = " << AdapInit );
+  int LevelOutput = myHypo->GetLevelOutput();
+  MESSAGE ( ". LevelOutput = " << LevelOutput );
+  myDriver->TexteAdvanced(Pyram, NivMax, DiamMin, AdapInit, LevelOutput);
+
+  return codret ;
+}
+//=============================================================================
+// Calcul d'une iteration : gestion du repertoire de calcul
+//        Si le sous-repertoire existe :
+//         etatMenage =  0 : on sort en erreur si le repertoire n'est pas vide
+//         etatMenage =  1 : on fait le menage du repertoire
+//         etatMenage = -1 : on ne fait rien
+//=============================================================================
+char* HOMARD_Gen_i::ComputeDir(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage)
+{
+  MESSAGE ( "ComputeDir : repertoires pour le calcul" );
+  // B.2. Le repertoire du cas
+  const char* nomDirCase = myCase->GetDirName();
+  MESSAGE ( ". nomDirCase = " << nomDirCase );
+
+  // B.3. Le sous-repertoire de l'iteration a calculer, puis le repertoire complet a creer
+  // B.3.1. Le nom du sous-repertoire
+  const char* nomDirIt = myIteration->GetDirName();
+
+  // B.3.2. Le nom complet du sous-repertoire
+  std::stringstream DirCompute ;
+  DirCompute << nomDirCase << "/" << nomDirIt;
+  MESSAGE (". DirCompute = " << DirCompute.str() );
+
+  // B.3.3. Si le sous-repertoire n'existe pas, on le cree
+  if (chdir(DirCompute.str().c_str()) != 0)
+  {
+//  Creation du repertoire car il n'existe pas :
+    if (mkdir(DirCompute.str().c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0)
     {
-      std::string ZoneName = std::string((*ListZone)[iaux]);
-      MESSAGE ( "... ZoneName = " << ZoneName);
-      HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
-      ASSERT(!CORBA::is_nil(myZone));
-
-      int ZoneType = myZone->GetType();
-      std::string TypeUsestr = std::string((*ListZone)[iaux+1]);
-      int TypeUse = atoi( TypeUsestr.c_str() );
-      MESSAGE ( "... ZoneType = " << ZoneType << ", TypeUse = "<<TypeUse);
-      NumZone = iaux/2 + 1 ;
-      HOMARD::double_array* zone = myZone->GetCoords();
-      if ( ZoneType == 2 or ( ZoneType>=11 and ZoneType <=13 ) ) // Cas d un parallelepipede ou d'un rectangle
-      {
-        myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], 0., 0., 0.);
-      }
-      else if ( ZoneType == 4 ) // Cas d une sphere
-      {
-        myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], 0., 0., 0., 0., 0.);
-      }
-      else if ( ZoneType == 5 or ( ZoneType>=31 and ZoneType <=33 ) ) // Cas d un cylindre ou d'un disque
-      {
-        myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], 0.);
-      }
-      else if ( ZoneType == 7 or ( ZoneType>=61 and ZoneType <=63 ) ) // Cas d un tuyau ou disque perce
+       // GERALD -- QMESSAGE BOX
+       std::cerr << "Pb Creation du repertoire DirCompute = " << DirCompute.str() << std::endl;
+       ASSERT("Pb a la creation du repertoire" == 0);
+    }
+  }
+  else
+  {
+//  Le repertoire existe
+//  On demande de faire le menage de son contenu :
+    if (etatMenage == 1)
+    {
+       MESSAGE (". Menage du repertoire DirCompute = " << DirCompute.str());
+       std::string commande= "rm -rf " + DirCompute.str()+"/*" ;
+       int codret = system(commande.c_str());
+       if (codret != 0)
+       {
+         // GERALD -- QMESSAGE BOX
+         std::cerr << ". Menage du repertoire de calcul" << DirCompute.str() << std::endl;
+         ASSERT("Pb au menage du repertoire de calcul" == 0);
+       }
+    }
+//  On n'a pas demande de faire le menage de son contenu : on sort en erreur :
+    else
+    {
+      if (etatMenage == 0)
       {
-        myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], (*zone)[8]);
+        DIR *dp;
+        struct dirent *dirp;
+        dp  = opendir(DirCompute.str().c_str());
+        bool result = true;
+        while ((dirp = readdir(dp)) != NULL && result )
+        {
+              std::string file_name(dirp->d_name);
+              result = file_name.empty() || file_name == "." || file_name == ".."; //if any file - break and return false
+        }
+        closedir(dp);
+        if ( result == false)
+        {
+            SALOME::ExceptionStruct es;
+            es.type = SALOME::BAD_PARAM;
+            std::string text = "Directory : " + DirCompute.str() + "is not empty";
+            es.text = CORBA::string_dup(text.c_str());
+            throw SALOME::SALOME_Exception(es);
+            ASSERT("Directory is not empty" == 0);
+        }
       }
-      else { ASSERT("ZoneType est incorrect." == 0) ; }
-      iaux += 1 ;
     }
   }
-  // E.3. Ajout des informations liees aux champs eventuels
-  if (TypeAdap == 1)
+
+  return CORBA::string_dup( DirCompute.str().c_str() );
+}
+//=============================================================================
+// Calcul d'une iteration : gestion du repertoire de calcul de l'iteration parent
+//=============================================================================
+char* HOMARD_Gen_i::ComputeDirPa(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration)
+{
+  MESSAGE ( "ComputeDirPa : repertoires pour le calcul" );
+  // Le repertoire du cas
+  const char* nomDirCase = myCase->GetDirName();
+  MESSAGE ( ". nomDirCase = " << nomDirCase );
+
+  // Le sous-repertoire de l'iteration precedente
+
+  const char* nomIterationParent = myIteration->GetIterParentName();
+  HOMARD::HOMARD_Iteration_var myIterationParent = myContextMap[GetCurrentStudyID()]._mesIterations[nomIterationParent];
+  const char* nomDirItPa = myIterationParent->GetDirName();
+  std::stringstream DirComputePa ;
+  DirComputePa << nomDirCase << "/" << nomDirItPa;
+  MESSAGE( ". nomDirItPa = " << nomDirItPa);
+  MESSAGE( ". DirComputePa = " << DirComputePa.str() );
+
+  return CORBA::string_dup( DirComputePa.str().c_str() );
+}
+//=============================================================================
+// Calcul d'une iteration : ecriture des zones dans le fichier de configuration
+//=============================================================================
+void HOMARD_Gen_i::DriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver)
+{
+  MESSAGE ( "... DriverTexteZone" );
+  HOMARD::listeZonesHypo* ListZone = myHypo->GetZones();
+  int numberOfZonesx2 = ListZone->length();
+  int NumZone ;
+
+  for (int iaux = 0; iaux< numberOfZonesx2; iaux++)
   {
-//  Le fichier du champ
-    char* FieldFile = myIteration->GetFieldFile();
-    MESSAGE ( ". FieldFile = " << FieldFile );
-    if (strlen(FieldFile) == 0)
+    std::string ZoneName = std::string((*ListZone)[iaux]);
+    MESSAGE ( "... ZoneName = " << ZoneName);
+    HOMARD::HOMARD_Zone_var myZone = myContextMap[GetCurrentStudyID()]._mesZones[ZoneName];
+    ASSERT(!CORBA::is_nil(myZone));
+
+    int ZoneType = myZone->GetType();
+    std::string TypeUsestr = std::string((*ListZone)[iaux+1]);
+    int TypeUse = atoi( TypeUsestr.c_str() );
+    MESSAGE ( "... ZoneType = " << ZoneType << ", TypeUse = "<<TypeUse);
+    NumZone = iaux/2 + 1 ;
+    HOMARD::double_array* zone = myZone->GetCoords();
+    if ( ZoneType == 2 or ( ZoneType>=11 and ZoneType <=13 ) ) // Cas d un parallelepipede ou d'un rectangle
     {
-      // GERALD -- QMESSAGE BOX
-      std::cerr << "Le fichier du champ n'a pas ete fourni." << std::endl;
-      ASSERT("The file for the field is not given." == 0);
+      myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], 0., 0., 0.);
     }
+    else if ( ZoneType == 4 ) // Cas d une sphere
+    {
+      myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], 0., 0., 0., 0., 0.);
+    }
+    else if ( ZoneType == 5 or ( ZoneType>=31 and ZoneType <=33 ) ) // Cas d un cylindre ou d'un disque
+    {
+      myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], 0.);
+    }
+    else if ( ZoneType == 7 or ( ZoneType>=61 and ZoneType <=63 ) ) // Cas d un tuyau ou disque perce
+    {
+      myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], (*zone)[8]);
+    }
+    else { ASSERT("ZoneType est incorrect." == 0) ; }
+    iaux += 1 ;
+  }
+  return ;
+}
+//=============================================================================
+// Calcul d'une iteration : ecriture des champs dans le fichier de configuration
+//=============================================================================
+void HOMARD_Gen_i::DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver)
+{
+  MESSAGE ( "... DriverTexteField" );
+//  Le fichier du champ
+  char* FieldFile = myIteration->GetFieldFile();
+  MESSAGE ( ". FieldFile = " << FieldFile );
+  if (strlen(FieldFile) == 0)
+  {
+    // GERALD -- QMESSAGE BOX
+    std::cerr << "Le fichier du champ n'a pas ete fourni." << std::endl;
+    ASSERT("The file for the field is not given." == 0);
+  }
 //  Les caracteristiques d'instants
-    int TimeStep = myIteration->GetTimeStep();
-    MESSAGE( ". TimeStep = " << TimeStep );
-    int Rank = myIteration->GetRank();
-    MESSAGE( ". Rank = " << Rank );
+  int TimeStep = myIteration->GetTimeStep();
+  MESSAGE( ". TimeStep = " << TimeStep );
+  int Rank = myIteration->GetRank();
+  MESSAGE( ". Rank = " << Rank );
 //  Les informations sur les champ
-    HOMARD::InfosHypo* aInfosHypo = myHypo->GetField();
+  HOMARD::InfosHypo* aInfosHypo = myHypo->GetField();
 //  Le nom
-    const char* FieldName = aInfosHypo->FieldName;
+  const char* FieldName = aInfosHypo->FieldName;
 //  Les seuils
-    int TypeThR = aInfosHypo->TypeThR;
-    double ThreshR = aInfosHypo->ThreshR;
-    int TypeThC = aInfosHypo->TypeThC;
-    double ThreshC = aInfosHypo->ThreshC;
+  int TypeThR = aInfosHypo->TypeThR;
+  double ThreshR = aInfosHypo->ThreshR;
+  int TypeThC = aInfosHypo->TypeThC;
+  double ThreshC = aInfosHypo->ThreshC;
 //  Saut entre mailles ou non ?
-    int UsField = aInfosHypo->UsField;
-    MESSAGE( ". UsField = " << UsField );
+  int UsField = aInfosHypo->UsField;
+  MESSAGE( ". UsField = " << UsField );
 //  L'usage des composantes
-    int UsCmpI = aInfosHypo->UsCmpI;
-    MESSAGE( ". UsCmpI = " << UsCmpI );
+  int UsCmpI = aInfosHypo->UsCmpI;
+  MESSAGE( ". UsCmpI = " << UsCmpI );
 //
-    myDriver->TexteField(FieldName, FieldFile, TimeStep, Rank, TypeThR, ThreshR, TypeThC, ThreshC, UsField, UsCmpI);
+  myDriver->TexteField(FieldName, FieldFile, TimeStep, Rank, TypeThR, ThreshR, TypeThC, ThreshC, UsField, UsCmpI);
 //
 //  Les composantes
-    HOMARD::listeComposantsHypo* mescompo = myHypo->GetListComp();
-    int numberOfCompos = mescompo->length();
-    MESSAGE( ". numberOfCompos = " << numberOfCompos );
-    for (int NumeComp = 0; NumeComp< numberOfCompos; NumeComp++)
-    {
-      std::string nomCompo = std::string((*mescompo)[NumeComp]);
-      MESSAGE( "... nomCompo = " << nomCompo );
-      myDriver->TexteCompo(NumeComp, nomCompo);
-    }
-  }
-  // E.4. Ajout des informations liees au filtrage eventuel par les groupes
-  HOMARD::ListGroupType* listeGroupes = myHypo->GetGroups();
-  int numberOfGroups = listeGroupes->length();
-  MESSAGE( ". numberOfGroups = " << numberOfGroups );
-  if (numberOfGroups > 0)
+  HOMARD::listeComposantsHypo* mescompo = myHypo->GetListComp();
+  int numberOfCompos = mescompo->length();
+  MESSAGE( ". numberOfCompos = " << numberOfCompos );
+  for (int NumeComp = 0; NumeComp< numberOfCompos; NumeComp++)
   {
-
-    for (int NumGroup = 0; NumGroup< numberOfGroups; NumGroup++)
-    {
-      std::string GroupName = std::string((*listeGroupes)[NumGroup]);
-      MESSAGE( "... GroupName = " << GroupName );
-      myDriver->TexteGroup(GroupName);
-    }
+    std::string nomCompo = std::string((*mescompo)[NumeComp]);
+    MESSAGE( "... nomCompo = " << nomCompo );
+    myDriver->TexteCompo(NumeComp, nomCompo);
   }
-
-  // E.5. Ajout des informations liees a l'eventuel suivi de frontiere
+  return ;
+}
+//=============================================================================
+// Calcul d'une iteration : ecriture des frontieres dans le fichier de configuration
+//=============================================================================
+void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver)
+{
+  MESSAGE ( "... DriverTexteBoundary" );
   // On ecrit d'abord la definition des frontieres, puis les liens avec les groupes
   std::list<std::string>  ListeBoundaryTraitees ;
   HOMARD::ListBoundaryGroupType* ListBoundaryGroupType = myCase->GetBoundaryGroup();
@@ -1822,9 +2120,15 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
     }
   }
   myDriver->TexteBoundaryOption(BoundaryOption);
-
-  // E.6. Ajout des informations liees a l'eventuelle interpolation des champs
-  MESSAGE( "... TypeFieldInterp = " << TypeFieldInterp );
+  return ;
+}
+//=============================================================================
+// Calcul d'une iteration : ecriture des interpolations dans le fichier de configuration
+//=============================================================================
+void HOMARD_Gen_i::DriverTexteFieldInterp(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver)
+{
+  MESSAGE ( "... DriverTexteFieldInterp" );
+  int TypeFieldInterp = myHypo->GetTypeFieldInterp();
   if (TypeFieldInterp != 0)
   {
 //  Le fichier des champs
@@ -1836,14 +2140,15 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
       std::cerr << "Le fichier du champ n'a pas ete fourni." << std::endl;
       ASSERT("The file for the field is not given." == 0);
     }
-//  Les caracteristiques d'instants
+  //  Les caracteristiques d'instants
     int TimeStep = myIteration->GetTimeStep();
     MESSAGE( ". TimeStep = " << TimeStep );
     int Rank = myIteration->GetRank();
     MESSAGE( ". Rank = " << Rank );
-//
+  //
+    const char* MeshFile = myIteration->GetMeshFile();
     myDriver->TexteFieldInterp(TypeFieldInterp, FieldFile, MeshFile, TimeStep, Rank);
-//  Les champs
+  //  Les champs
     if (TypeFieldInterp == 2)
     {
       HOMARD::listFieldInterpHypo* meschamps = myHypo->GetListFieldInterp();
@@ -1857,98 +2162,11 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
       }
     }
   }
-  // E.7. Ajout des options avancees
-  int Pyram = myCase->GetPyram();
-  MESSAGE ( ". Pyram = " << Pyram );
-  int NivMax = myHypo->GetNivMax();
-  MESSAGE ( ". NivMax = " << NivMax );
-  double DiamMin = myHypo->GetDiamMin() ;
-  MESSAGE ( ". DiamMin = " << DiamMin );
-  int AdapInit = myHypo->GetAdapInit();
-  MESSAGE ( ". AdapInit = " << AdapInit );
-  int LevelOutput = myHypo->GetLevelOutput();
-  MESSAGE ( ". LevelOutput = " << LevelOutput );
-  myDriver->TexteAdvanced(Pyram, NivMax, DiamMin, AdapInit, LevelOutput);
-
-  // F. Ecriture du texte dans le fichier
-  if (codret == 0)
-  {
-    myDriver->CreeFichier();
-  }
-
-// G. Execution
-//
-  int codretexec = 12 ;
-  if (codret == 0)
-  {
-    codretexec = myDriver->ExecuteHomard();
-//
-    MESSAGE ( "Erreur en executant HOMARD : " << codretexec );
-    if (codretexec == 0)
-    {
-      SetEtatIter(NomIteration,true);
-    }
-    else
-    {
-      // GERALD -- QMESSAGE BOX
-      SetEtatIter(NomIteration,false);
-    }
-  }
-
-  // H. Gestion des resultats
-  if (codret == 0)
-  {
-    // 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());
-
-    // H.2. Si tout s'est bien passe :
-    if (codretexec == 0)
-    {
-    // H.2.1. Le fichier de bilan
-      std::stringstream saux2 ;
-      saux2 << "Summary " << NumeIter ;
-      std::string SummaryFile = DirCompute.str() + "/apad." + siterp1 + ".bilan" ;
-      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());
-      PublishResultInSmesh(MeshFile, 1);
-    }
-  // H.3 Message d'erreur en cas de probleme
-    else
-    {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      std::string text = "Error during the adaptation.\n" ;
-      try
-      {
-          ifstream fichier(MessFile.c_str(), ios::in);
-          string ligne;
-          while(getline(fichier, ligne) and (ligne != "===== HOMARD ===== STOP ====="));
-          while (getline(fichier, ligne)) { text += ligne+ "\n";};
-      }
-      catch (...) {
-        text += "no log file ....";
-      }
-      es.text = CORBA::string_dup(text.c_str());
-      throw SALOME::SALOME_Exception(es);
-    }
-  }
-
-  // I. Menage et retour dans le repertoire du cas
-  if (codret == 0)
-  {
-    delete myDriver;
-    MESSAGE ( ". On retourne dans nomDirWork = " << nomDirWork );
-    chdir(nomDirWork);
-  }
-
-  return codretexec ;
+  return ;
 }
 //===========================================================================
+//===========================================================================
+
 
 //===========================================================================
 //===========================================================================
@@ -2317,7 +2535,6 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy
            }
        }
      }
-
   }
 
 // On enregistre le fichier
@@ -2401,6 +2618,7 @@ void HOMARD_Gen_i::DeleteResultInSmesh(const char* NomFich, const char* MeshName
 //=============================================================================
 void HOMARD_Gen_i::PublishFileUnderIteration(const char* NomIter, const char* NomFich, const char* Commentaire)
 {
+//   MESSAGE (" PublishFileUnderIteration pour l'iteration " << NomIter << " du fichier " << NomFich << " avec le commentaire " << Commentaire );
   if (CORBA::is_nil(myCurrentStudy))
   {
       SALOME::ExceptionStruct es;
index 5d9033f47a2cdbc6167a6f561a9d8a6f719f9b88..20ae21359e88eaccbe890d96586ee23c5c61096b 100644 (file)
@@ -31,6 +31,7 @@
 #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
 
 #include "HOMARD_Gen.hxx"
+#include "HomardDriver.hxx"
 #include "SALOME_Component_i.hxx"
 #include "SALOME_NamingService.hxx"
 #include "Utils_CorbaException.hxx"
@@ -114,6 +115,10 @@ public:
   HOMARD::listeIterations*        GetAllIterationsName();
   HOMARD::listeZones*             GetAllZonesName();
 
+  void                            MeshInfo      (const char* nomCas,
+                                                 const char* MeshName, const char* FileName, const char* DirName,
+                                                 CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte);
+
   HOMARD::HOMARD_Iteration_ptr    LastIteration  (const char* nomCas);
 
 // L'etude
@@ -125,6 +130,7 @@ public:
   void                            InvalideBoundary(const char* nomBoundary);
   void                            InvalideHypo(const char* nomHypo);
   void                            InvalideIter(const char* nomIter);
+  void                            InvalideIterInfo(const char* nomIter);
   void                            InvalideZone(const char* nomZone);
 
   CORBA::Long                     DeleteBoundary(const char* nomBoundary);
@@ -144,7 +150,15 @@ public:
 
   void                            SetEtatIter(const char* nomIter,const CORBA::Boolean EtatCalcul);
 
-  CORBA::Long                     Compute(const char* nomIteration, CORBA::Long etatMenage);
+  CORBA::Long                     Compute(const char* nomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option);
+  CORBA::Long                     ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option);
+  char*                           ComputeDir(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage);
+  char*                           ComputeDirPa(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration);
+  void                            DriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
+  void                            DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
+  void                            DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
+  void                            DriverTexteFieldInterp(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
+
   CORBA::Boolean                  VerifieDir(const char* nomDir);
 
   void                            PublishResultInSmesh(const char* NomFich, CORBA::Long IconeType);
index a29d2b3ad0f9f1ccb4cc9b664b05fefa2d2c9b60..222dd663695f9c40b76d8917a64fb706428ce7cd 100644 (file)
@@ -210,27 +210,73 @@ CORBA::Long HOMARD_Iteration_i::GetRank()
   return  CORBA::Long( myHomardIteration->GetRank() );
 }
 //=============================================================================
-void HOMARD_Iteration_i::SetMessFile( const char* MessFile )
+void HOMARD_Iteration_i::SetLogFile( const char* LogFile )
 {
   ASSERT( myHomardIteration );
-  myHomardIteration->SetMessFile( MessFile );
+  myHomardIteration->SetLogFile( LogFile );
 }
 //=============================================================================
-char* HOMARD_Iteration_i::GetMessFile()
+char* HOMARD_Iteration_i::GetLogFile()
 {
   ASSERT( myHomardIteration );
-  return CORBA::string_dup( myHomardIteration->GetMessFile().c_str() );
+  return CORBA::string_dup( myHomardIteration->GetLogFile().c_str() );
 }
 //=============================================================================
-CORBA::Long  HOMARD_Iteration_i::Compute(CORBA::Long etatMenage)
+CORBA::Long HOMARD_Iteration_i::Compute(CORBA::Long etatMenage)
 {
   MESSAGE ( "Compute : calcul d'une iteration" );
   ASSERT( myHomardIteration );
 //
 // Nom de l'iteration
   char* IterName = GetName() ;
+  CORBA::Long modeHOMARD = 1 ;
+  CORBA::Long Option = 1 ;
   MESSAGE ( "Compute : calcul de l'teration " << IterName );
-  return _gen_i->Compute(IterName, etatMenage) ;
+  return _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option) ;
+}
+//=============================================================================
+void HOMARD_Iteration_i::MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte)
+{
+  MESSAGE ( "MeshInfo : information sur le maillage associe a une iteration" );
+  ASSERT( myHomardIteration );
+//
+  int Option = 1 ;
+  MeshInfoOption( Qual, Diam, Conn, Tail, Inte, Option ) ;
+//
+  return ;
+}
+//=============================================================================
+void HOMARD_Iteration_i::MeshInfoOption(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte, CORBA::Long Option)
+{
+  MESSAGE ( "MeshInfoOption : information sur le maillage associe a une iteration" );
+  ASSERT( myHomardIteration );
+//
+// Nom de l'iteration
+  char* IterName = GetName() ;
+  CORBA::Long etatMenage = -1 ;
+  CORBA::Long modeHOMARD = 7 ;
+  if ( Qual != 0 ) { modeHOMARD = modeHOMARD*5 ; }
+  if ( Diam != 0 ) { modeHOMARD = modeHOMARD*19 ; }
+  if ( Conn != 0 ) { modeHOMARD = modeHOMARD*11 ; }
+  if ( Tail != 0 ) { modeHOMARD = modeHOMARD*13 ; }
+  if ( Inte != 0 ) { modeHOMARD = modeHOMARD*3 ; }
+  MESSAGE ( "MeshInfoOption : information sur le maillage de l'iteration " << IterName );
+  CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option) ;
+  MESSAGE ( "MeshInfoOption : codret = " << codret );
+//
+  return ;
+}
+//=============================================================================
+void HOMARD_Iteration_i::SetFileInfo( const char* FileInfo )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetFileInfo( FileInfo );
+}
+//=============================================================================
+char* HOMARD_Iteration_i::GetFileInfo()
+{
+  ASSERT( myHomardIteration );
+  return CORBA::string_dup( myHomardIteration->GetFileInfo().c_str() );
 }
 //=============================================================================
 //=============================================================================
index 91ce9fdce1b9653b7799baadc72215594579d858..103a5163f09b65fd2dbc79cbbc216ea77afd40d0 100644 (file)
@@ -87,12 +87,19 @@ public:
   CORBA::Long            GetTimeStep();
   CORBA::Long            GetRank();
 
-  void                   SetMessFile( const char* MessFile );
-  char*                  GetMessFile();
+  void                   SetLogFile( const char* LogFile );
+  char*                  GetLogFile();
 
   CORBA::Long            Compute(CORBA::Long etatMenage);
 
-// Liens avec les autres iterations
+  void                   MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte);
+
+  void                   MeshInfoOption(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte, CORBA::Long Option);
+
+  void                   SetFileInfo( const char* FileInfo );
+  char*                  GetFileInfo();
+
+  // Liens avec les autres iterations
   HOMARD::HOMARD_Iteration_ptr NextIteration( const char* Name) ;
 
   void                   LinkNextIteration( const char* NomIteration );