Salome HOME
Filtrage des suppressions de maillage pour une suppression d'itération
authornicolas <nicolas>
Mon, 11 Mar 2013 10:00:13 +0000 (10:00 +0000)
committernicolas <nicolas>
Mon, 11 Mar 2013 10:00:13 +0000 (10:00 +0000)
19 files changed:
doc/intro.rst
doc/tui_create_case.rst
doc/tui_create_iteration.rst
idl/HOMARD_Gen.idl
idl/HOMARD_Iteration.idl
src/HOMARDGUI/CreateHypothesis.h
src/HOMARDGUI/CreateHypothesis.ui
src/HOMARDGUI/EditFile.h
src/HOMARDGUI/EditFile.ui
src/HOMARDGUI/HOMARDGUI.cxx
src/HOMARDGUI/HOMARD_msg_en.ts
src/HOMARDGUI/HOMARD_msg_fr.ts
src/HOMARDGUI/MonEditFile.cxx
src/HOMARDGUI/MonEditFile.h
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
tests/test_3.py

index 9fc5cbfce12770366933305ced4cb5bc336629f8..efc780bf4dab5ecc1b30905e606c6e65b6d6148d 100644 (file)
@@ -47,11 +47,10 @@ Des variantes de ce sch
 
 .. note::
   Pour une référence à HOMARD, utiliser :
- G. Nicolas and T. Fouquet, Adaptive Mesh Refinement for Conformal Hexahedral Meshes, Finite Elements in Analysis and Design, Vol. 67, pp. 1-12, 2013, doi:10.1016/j.finel.2012.11.008
 G. Nicolas and T. Fouquet, Adaptive Mesh Refinement for Conformal Hexahedral Meshes, Finite Elements in Analysis and Design, Vol. 67, pp. 1-12, 2013, doi:10.1016/j.finel.2012.11.008
   `Acessible en cliquant ici <http://dx.doi.org/10.1016/j.finel.2012.11.008>`_ .
 
 
-
 Quelques illustrations de maillage adaptés
 """"""""""""""""""""""""""""""""""""""""""
 .. index:: single: illustration
index f1e0c2919fb8721c1729d76137b90283867e3822..d3902d5b737378104caf045e9c3290ea85a6a041 100644 (file)
@@ -112,8 +112,9 @@ M
 | .. index:: single: Delete                                     |
 |                                                               |
 | **Delete()**                                                  |
-|     Detruit le cas et toutes les itérations associées.        |
-|     Le fichier du maillage associé est conservé.              |
+|     Detruit le cas et toutes les itérations associées ainsi   |
+|     que tous les maillages produits. Le fichier du maillage   |
+|     initial associé est conservé.                             |
 |                                                               |
 |     Retourne un entier :                                      |
 |         * 0 : destruction réussie                             |
index 96db65ffa49de51d7a946352bc59810f19ff7a10..afb8b964ff2afd4bb0730cfa07dda77ffa15e598 100644 (file)
@@ -157,9 +157,14 @@ G
 +---------------------------------------------------------------+
 | .. index:: single: Delete                                     |
 |                                                               |
-| **Delete()**                                                  |
-|     Detruit l'itération et toutes ses filles éventuelles. Les |
-|     fichiers des maillages associés sont supprimés.           |
+| **Delete(option)**                                            |
+|     Detruit l'itération et toutes ses filles éventuelles.     |
+|                                                               |
+|     - ``option`` : un entier précisant ce qui est fait des    |
+|       fichiers de maillage associés                           |
+|                                                               |
+|         * 0 : les fichiers sont conservés                     |
+|         * 1 : les fichiers sont détruits                      |
 |                                                               |
 |     Retourne un entier :                                      |
 |         * 0 : destruction réussie                             |
index 85602cdab6515939b1997950ab089b21ef383540..b91f3524b6b35002806688ef80c85b81b5fd9c42 100644 (file)
@@ -130,13 +130,16 @@ module HOMARD
     void InvalideBoundary (in string BoundaryName)         raises (SALOME::SALOME_Exception);
     void InvalideHypo (in string HypoName)                 raises (SALOME::SALOME_Exception);
     void InvalideIter (in string IterName)                 raises (SALOME::SALOME_Exception);
+    void InvalideIterOption (in string IterName, in long Option)
+                                                           raises (SALOME::SALOME_Exception);
     void InvalideZone (in string ZoneName)                 raises (SALOME::SALOME_Exception);
 
     long DeleteBoundary (in string BoundaryName)           raises (SALOME::SALOME_Exception);
     long DeleteCase(in string CaseName)                    raises (SALOME::SALOME_Exception);
     long DeleteHypo(in string HypoName)                    raises (SALOME::SALOME_Exception);
-    long DeleteIteration(in string IterName)               raises (SALOME::SALOME_Exception);
-    long DeleteIterationOption(in string IterName, in long Option)
+    long DeleteIteration(in string IterName, in long Option)
+                                                           raises (SALOME::SALOME_Exception);
+    long DeleteIterationOption(in string IterName, in long Option1, in long Option2)
                                                            raises (SALOME::SALOME_Exception);
     long DeleteZone (in string ZoneName)                   raises (SALOME::SALOME_Exception);
 //
@@ -157,7 +160,7 @@ module HOMARD
     void  PublishFileUnderIteration(in string IterName, in string FileName, in string Comment)
                                                            raises (SALOME::SALOME_Exception);
     void  PublishBoundaryUnderCase(in string CaseName, in string BoundaryName);
-    void  PublishResultInSmesh(in string FileName, in long IconeType)
+    void  PublishResultInSmesh(in string FileName, in long Option)
                                                            raises (SALOME::SALOME_Exception);
 
   };
index f5fd7ef550aba39f8b4a15008a75eaf701d7ac41..f7380483a7eeee226b933852895f8db03b36563f 100644 (file)
@@ -43,7 +43,7 @@ module HOMARD
     void     SetName(in string Name)                       raises (SALOME::SALOME_Exception);
     string   GetName()                                     raises (SALOME::SALOME_Exception);
 
-    long     Delete()                                      raises (SALOME::SALOME_Exception);
+    long     Delete(in long Option)                        raises (SALOME::SALOME_Exception);
 
     string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
 
index b3daf3969c39a51176c2811a0a39746a19750137..ef9c6164eab887dee7babb75ab352e459e0917b4 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'CreateHypothesis.ui'
 **
-** Created: Mon Jan 14 14:54:59 2013
+** Created: Thu Feb 28 13:29:51 2013
 **      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -43,7 +43,6 @@ public:
     QRadioButton *RBUniforme;
     QRadioButton *RBChamp;
     QRadioButton *RBZone;
-    QCheckBox *CBGroupe;
     QGroupBox *GBUniform;
     QGridLayout *gridLayout;
     QRadioButton *RBUniDera;
@@ -106,6 +105,7 @@ public:
     QRadioButton *RBFieldAll;
     QRadioButton *RBFieldChosen;
     QTableWidget *TWField;
+    QCheckBox *CBGroupe;
     QCheckBox *CBAdvanced;
     QGroupBox *GBAdvancedOptions;
     QGridLayout *gridLayout_1;
@@ -131,7 +131,7 @@ public:
     {
         if (CreateHypothesis->objectName().isEmpty())
             CreateHypothesis->setObjectName(QString::fromUtf8("CreateHypothesis"));
-        CreateHypothesis->resize(770, 1453);
+        CreateHypothesis->resize(794, 1481);
         QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
         sizePolicy.setHorizontalStretch(0);
         sizePolicy.setVerticalStretch(0);
@@ -177,11 +177,6 @@ public:
 
         gridLayout_3->addWidget(GBTypeAdaptation, 1, 0, 1, 2);
 
-        CBGroupe = new QCheckBox(CreateHypothesis);
-        CBGroupe->setObjectName(QString::fromUtf8("CBGroupe"));
-
-        gridLayout_3->addWidget(CBGroupe, 2, 0, 1, 2);
-
         GBUniform = new QGroupBox(CreateHypothesis);
         GBUniform->setObjectName(QString::fromUtf8("GBUniform"));
         gridLayout = new QGridLayout(GBUniform);
@@ -408,9 +403,10 @@ public:
         SpinBox_RMuSigma->setObjectName(QString::fromUtf8("SpinBox_RMuSigma"));
         SpinBox_RMuSigma->setEnabled(false);
         SpinBox_RMuSigma->setDecimals(8);
-        SpinBox_RMuSigma->setMinimum(0);
+        SpinBox_RMuSigma->setMinimum(-1e+12);
         SpinBox_RMuSigma->setMaximum(1e+12);
         SpinBox_RMuSigma->setSingleStep(0.1);
+        SpinBox_RMuSigma->setValue(3);
 
         gridLayout3->addWidget(SpinBox_RMuSigma, 3, 1, 1, 1);
 
@@ -486,9 +482,10 @@ public:
         SpinBox_CMuSigma->setObjectName(QString::fromUtf8("SpinBox_CMuSigma"));
         SpinBox_CMuSigma->setEnabled(false);
         SpinBox_CMuSigma->setDecimals(8);
-        SpinBox_CMuSigma->setMinimum(0);
+        SpinBox_CMuSigma->setMinimum(-1e+12);
         SpinBox_CMuSigma->setMaximum(1e+12);
         SpinBox_CMuSigma->setSingleStep(0.1);
+        SpinBox_CMuSigma->setValue(4);
 
         gridLayout4->addWidget(SpinBox_CMuSigma, 3, 1, 1, 1);
 
@@ -630,6 +627,11 @@ public:
 
         gridLayout_3->addWidget(GBField, 7, 0, 1, 2);
 
+        CBGroupe = new QCheckBox(CreateHypothesis);
+        CBGroupe->setObjectName(QString::fromUtf8("CBGroupe"));
+
+        gridLayout_3->addWidget(CBGroupe, 2, 0, 1, 2);
+
         CBAdvanced = new QCheckBox(CreateHypothesis);
         CBAdvanced->setObjectName(QString::fromUtf8("CBAdvanced"));
 
@@ -761,7 +763,6 @@ public:
         RBUniforme->setText(QApplication::translate("CreateHypothesis", "Uniform", 0, QApplication::UnicodeUTF8));
         RBChamp->setText(QApplication::translate("CreateHypothesis", "Driven by a field", 0, QApplication::UnicodeUTF8));
         RBZone->setText(QApplication::translate("CreateHypothesis", "With geometrical zones", 0, QApplication::UnicodeUTF8));
-        CBGroupe->setText(QApplication::translate("CreateHypothesis", "Filtering with groups", 0, QApplication::UnicodeUTF8));
         GBUniform->setTitle(QApplication::translate("CreateHypothesis", "Uniform adaptation", 0, QApplication::UnicodeUTF8));
         RBUniDera->setText(QApplication::translate("CreateHypothesis", "Coarsening", 0, QApplication::UnicodeUTF8));
         RBUniRaff->setText(QApplication::translate("CreateHypothesis", "Refinement", 0, QApplication::UnicodeUTF8));
@@ -810,6 +811,7 @@ public:
         ___qtablewidgetitem5->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8));
         QTableWidgetItem *___qtablewidgetitem6 = TWField->horizontalHeaderItem(1);
         ___qtablewidgetitem6->setText(QApplication::translate("CreateHypothesis", "Field Name", 0, QApplication::UnicodeUTF8));
+        CBGroupe->setText(QApplication::translate("CreateHypothesis", "Filtering with groups", 0, QApplication::UnicodeUTF8));
         CBAdvanced->setText(QApplication::translate("CreateHypothesis", "Advanced options", 0, QApplication::UnicodeUTF8));
         GBAdvancedOptions->setTitle(QApplication::translate("CreateHypothesis", "Advanced options", 0, QApplication::UnicodeUTF8));
         TLMinimalDiameter->setText(QApplication::translate("CreateHypothesis", "Minimal diameter", 0, QApplication::UnicodeUTF8));
index 177c5074bc4ec1eebbeea0eabe4cead5a19a70e5..e7ac9dae2f9d5ce9fa81b85b49028eeb27cc7c8a 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>770</width>
-    <height>1453</height>
+    <width>794</width>
+    <height>1481</height>
    </rect>
   </property>
   <property name="sizePolicy">
      </layout>
     </widget>
    </item>
-   <item row="2" column="0" colspan="2">
-    <widget class="QCheckBox" name="CBGroupe">
-     <property name="text">
-      <string>Filtering with groups</string>
-     </property>
-    </widget>
-   </item>
    <item row="3" column="0" colspan="2">
     <widget class="QGroupBox" name="GBUniform">
      <property name="title">
               <number>8</number>
              </property>
              <property name="minimum">
-              <double>0.000000000000000</double>
+              <double>-1000000000000.000000000000000</double>
              </property>
              <property name="maximum">
               <double>1000000000000.000000000000000</double>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
+             <property name="value">
+              <double>3.000000000000000</double>
+             </property>
             </widget>
            </item>
            <item row="4" column="0">
               <number>8</number>
              </property>
              <property name="minimum">
-              <double>0.000000000000000</double>
+              <double>-1000000000000.000000000000000</double>
              </property>
              <property name="maximum">
               <double>1000000000000.000000000000000</double>
              <property name="singleStep">
               <double>0.100000000000000</double>
              </property>
+             <property name="value">
+              <double>4.000000000000000</double>
+             </property>
             </widget>
            </item>
            <item row="4" column="0">
      </layout>
     </widget>
    </item>
+   <item row="2" column="0" colspan="2">
+    <widget class="QCheckBox" name="CBGroupe">
+     <property name="text">
+      <string>Filtering with groups</string>
+     </property>
+    </widget>
+   </item>
    <item row="8" column="0" colspan="2">
     <widget class="QCheckBox" name="CBAdvanced">
      <property name="text">
index 4248dd5139923de5565729ad421da9a7b4ed26ea..66500c6b4165963f490f034281b259f0c06e983d 100644 (file)
@@ -1,10 +1,10 @@
 /********************************************************************************
-** Form generated from reading ui file 'EditFile.ui'
+** Form generated from reading UI file 'EditFile.ui'
 **
-** Created: Tue Mar 15 10:38:58 2011
-**      by: Qt User Interface Compiler version 4.2.1
+** Created: Thu Feb 28 13:53:13 2013
+**      by: Qt User Interface Compiler version 4.6.3
 **
-** WARNING! All changes made in this file will be lost when recompiling ui file!
+** WARNING! All changes made in this file will be lost when recompiling UI file!
 ********************************************************************************/
 
 #ifndef EDITFILE_H
 #include <QtGui/QButtonGroup>
 #include <QtGui/QGridLayout>
 #include <QtGui/QGroupBox>
+#include <QtGui/QHeaderView>
 #include <QtGui/QPushButton>
 #include <QtGui/QSpacerItem>
 #include <QtGui/QTextBrowser>
 #include <QtGui/QWidget>
 
+QT_BEGIN_NAMESPACE
+
 class Ui_EditFile
 {
 public:
@@ -35,68 +38,75 @@ public:
 
     void setupUi(QWidget *EditFile)
     {
-    EditFile->setObjectName(QString::fromUtf8("EditFile"));
-    gridLayout = new QGridLayout(EditFile);
-    gridLayout->setSpacing(6);
-    gridLayout->setMargin(9);
-    gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
-    spacerItem = new QSpacerItem(331, 49, QSizePolicy::Expanding, QSizePolicy::Minimum);
-
-    gridLayout->addItem(spacerItem, 2, 1, 1, 1);
-
-    GroupButtons = new QGroupBox(EditFile);
-    GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
-    gridLayout1 = new QGridLayout(GroupButtons);
-    gridLayout1->setSpacing(6);
-    gridLayout1->setMargin(9);
-    gridLayout1->setObjectName(QString::fromUtf8("gridLayout1"));
-    buttonPrint = new QPushButton(GroupButtons);
-    buttonPrint->setObjectName(QString::fromUtf8("buttonPrint"));
-
-    gridLayout1->addWidget(buttonPrint, 0, 1, 1, 1);
-
-    buttonQuit = new QPushButton(GroupButtons);
-    buttonQuit->setObjectName(QString::fromUtf8("buttonQuit"));
-    buttonQuit->setAutoDefault(true);
-    buttonQuit->setDefault(true);
-    buttonQuit->setFlat(true);
-
-    gridLayout1->addWidget(buttonQuit, 0, 0, 1, 1);
-
-
-    gridLayout->addWidget(GroupButtons, 2, 0, 1, 1);
-
-    spacerItem1 = new QSpacerItem(20, 14, QSizePolicy::Minimum, QSizePolicy::Expanding);
-
-    gridLayout->addItem(spacerItem1, 1, 0, 1, 2);
-
-    QTBEditFile = new QTextBrowser(EditFile);
-    QTBEditFile->setObjectName(QString::fromUtf8("QTBEditFile"));
-    QTBEditFile->setMinimumSize(QSize(530, 800));
-    QFont font;
-    font.setFamily(QString::fromUtf8("Courier New"));
-    QTBEditFile->setFont(font);
-
-    gridLayout->addWidget(QTBEditFile, 0, 0, 1, 2);
-
-
-    retranslateUi(EditFile);
-
-    QSize size(675, 901);
-    size = size.expandedTo(EditFile->minimumSizeHint());
-    EditFile->resize(size);
-
-
-    QMetaObject::connectSlotsByName(EditFile);
+        if (EditFile->objectName().isEmpty())
+            EditFile->setObjectName(QString::fromUtf8("EditFile"));
+        EditFile->resize(675, 901);
+        gridLayout = new QGridLayout(EditFile);
+#ifndef Q_OS_MAC
+        gridLayout->setSpacing(6);
+#endif
+#ifndef Q_OS_MAC
+        gridLayout->setContentsMargins(9, 9, 9, 9);
+#endif
+        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+        spacerItem = new QSpacerItem(331, 49, QSizePolicy::Expanding, QSizePolicy::Minimum);
+
+        gridLayout->addItem(spacerItem, 2, 1, 1, 1);
+
+        GroupButtons = new QGroupBox(EditFile);
+        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"));
+        buttonPrint = new QPushButton(GroupButtons);
+        buttonPrint->setObjectName(QString::fromUtf8("buttonPrint"));
+        buttonPrint->setAutoDefault(false);
+        buttonPrint->setDefault(false);
+        buttonPrint->setFlat(false);
+
+        gridLayout1->addWidget(buttonPrint, 0, 1, 1, 1);
+
+        buttonQuit = new QPushButton(GroupButtons);
+        buttonQuit->setObjectName(QString::fromUtf8("buttonQuit"));
+        buttonQuit->setAutoDefault(false);
+        buttonQuit->setDefault(true);
+        buttonQuit->setFlat(false);
+
+        gridLayout1->addWidget(buttonQuit, 0, 0, 1, 1);
+
+
+        gridLayout->addWidget(GroupButtons, 2, 0, 1, 1);
+
+        spacerItem1 = new QSpacerItem(20, 14, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        gridLayout->addItem(spacerItem1, 1, 0, 1, 2);
+
+        QTBEditFile = new QTextBrowser(EditFile);
+        QTBEditFile->setObjectName(QString::fromUtf8("QTBEditFile"));
+        QTBEditFile->setMinimumSize(QSize(530, 800));
+        QFont font;
+        font.setFamily(QString::fromUtf8("Courier New"));
+        QTBEditFile->setFont(font);
+
+        gridLayout->addWidget(QTBEditFile, 0, 0, 1, 2);
+
+
+        retranslateUi(EditFile);
+
+        QMetaObject::connectSlotsByName(EditFile);
     } // setupUi
 
     void retranslateUi(QWidget *EditFile)
     {
-    EditFile->setWindowTitle(QApplication::translate("EditFile", "Edit a file", 0, QApplication::UnicodeUTF8));
-    GroupButtons->setTitle(QString());
-    buttonPrint->setText(QApplication::translate("EditFile", "Print", 0, QApplication::UnicodeUTF8));
-    buttonQuit->setText(QApplication::translate("EditFile", "Quit", 0, QApplication::UnicodeUTF8));
-    Q_UNUSED(EditFile);
+        EditFile->setWindowTitle(QApplication::translate("EditFile", "Edit a file", 0, QApplication::UnicodeUTF8));
+        GroupButtons->setTitle(QString());
+        buttonPrint->setText(QApplication::translate("EditFile", "Print", 0, QApplication::UnicodeUTF8));
+        buttonQuit->setText(QApplication::translate("EditFile", "Quit", 0, QApplication::UnicodeUTF8));
     } // retranslateUi
 
 };
@@ -105,4 +115,6 @@ namespace Ui {
     class EditFile: public Ui_EditFile {};
 } // namespace Ui
 
+QT_END_NAMESPACE
+
 #endif // EDITFILE_H
index 266c3d35f39a06ea24a1d9f43f6e280144b20e68..bfccdc17845de2a052d2aad5e98bb1474a9ce6f7 100644 (file)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>EditFile</class>
- <widget class="QWidget" name="EditFile" >
-  <property name="geometry" >
+ <widget class="QWidget" name="EditFile">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <height>901</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Edit a file</string>
   </property>
-  <layout class="QGridLayout" >
-   <property name="margin" >
+  <layout class="QGridLayout">
+   <property name="margin">
     <number>9</number>
    </property>
-   <property name="spacing" >
+   <property name="spacing">
     <number>6</number>
    </property>
-   <item row="2" column="1" >
+   <item row="2" column="1">
     <spacer>
-     <property name="orientation" >
+     <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="sizeHint" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>331</width>
        <height>49</height>
      </property>
     </spacer>
    </item>
-   <item row="2" column="0" >
-    <widget class="QGroupBox" name="GroupButtons" >
-     <property name="title" >
+   <item row="2" column="0">
+    <widget class="QGroupBox" name="GroupButtons">
+     <property name="title">
       <string/>
      </property>
-     <layout class="QGridLayout" >
-      <property name="margin" >
+     <layout class="QGridLayout">
+      <property name="margin">
        <number>9</number>
       </property>
-      <property name="spacing" >
+      <property name="spacing">
        <number>6</number>
       </property>
-      <item row="0" column="1" >
-       <widget class="QPushButton" name="buttonPrint" >
-        <property name="text" >
+      <item row="0" column="1">
+       <widget class="QPushButton" name="buttonPrint">
+        <property name="text">
          <string>Print</string>
         </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+        <property name="default">
+         <bool>false</bool>
+        </property>
+        <property name="flat">
+         <bool>false</bool>
+        </property>
        </widget>
       </item>
-      <item row="0" column="0" >
-       <widget class="QPushButton" name="buttonQuit" >
-        <property name="text" >
+      <item row="0" column="0">
+       <widget class="QPushButton" name="buttonQuit">
+        <property name="text">
          <string>Quit</string>
         </property>
-        <property name="autoDefault" >
-         <bool>true</bool>
+        <property name="autoDefault">
+         <bool>false</bool>
         </property>
-        <property name="default" >
+        <property name="default">
          <bool>true</bool>
         </property>
-        <property name="flat" >
-         <bool>true</bool>
+        <property name="flat">
+         <bool>false</bool>
         </property>
        </widget>
       </item>
      </layout>
     </widget>
    </item>
-   <item row="1" column="0" colspan="2" >
+   <item row="1" column="0" colspan="2">
     <spacer>
-     <property name="orientation" >
+     <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="sizeHint" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>20</width>
        <height>14</height>
      </property>
     </spacer>
    </item>
-   <item row="0" column="0" colspan="2" >
-    <widget class="QTextBrowser" name="QTBEditFile" >
-     <property name="minimumSize" >
+   <item row="0" column="0" colspan="2">
+    <widget class="QTextBrowser" name="QTBEditFile">
+     <property name="minimumSize">
       <size>
        <width>530</width>
        <height>800</height>
       </size>
      </property>
-     <property name="font" >
+     <property name="font">
       <font>
        <family>Courier New</family>
       </font>
index 3125a90a6eb3ac8c0f8cc42bd7e6e48c3b80175f..610157b38507251869b45cc9f288e872e283556a 100644 (file)
@@ -379,7 +379,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
         else if (HOMARD_UTILS::isIter(obj))
         {
           try
-          { homardGen->DeleteIteration(_ObjectName.toStdString().c_str()); }
+          { homardGen->DeleteIteration(_ObjectName.toStdString().c_str(), 1); }
           catch( SALOME::SALOME_Exception& S_ex )
           {
             QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
@@ -447,7 +447,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       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();
+          if ( aDlg->_codret == 0 ) { aDlg->show(); }
       }
       break;
      }
index 89aca2f5bbc4c0db4797dd065cb3f9ace932e028..d646b82f3302236153ffa61111971b594e3da323 100644 (file)
         <source>HOM_SELECT_FILE_2</source>
         <translation>Select only one file.</translation>
     </message>
+    <message>
+        <source>HOM_SELECT_FILE_3</source>
+        <translation>This file cannot be opened.</translation>
+    </message>
     <message>
         <source>HOM_MED_FILE_1</source>
         <translation>This MED file cannot be read.</translation>
index 3a63a413fa6aa5f7b3b5e02bf7aef7df28d86223..4d0509b9b05e489c04b0900bbf03394971b94d1b 100644 (file)
         <source>HOM_SELECT_FILE_2</source>
         <translation>Sélectionner un seul fichier.</translation>
     </message>
+    <message>
+        <source>HOM_SELECT_FILE_3</source>
+        <translation>Impossible d'ouvrir ce fichier.</translation>
+    </message>
     <message>
         <source>HOM_MED_FILE_1</source>
         <translation>Ce fichier MED est illisible.</translation>
index d399466fb805af1ae3d72a3a9c82a66dd5062463..4ec9252cd0305f6eb7f31075949349b4d69ec341 100644 (file)
@@ -47,7 +47,8 @@ MonEditFile::MonEditFile( QWidget* parent,  bool modal,
                           QString aFileName):
 //    QWidget(0),
     Ui_EditFile(),
-    _aFileName (aFileName)
+    _aFileName (aFileName),
+    _codret (0)
 {
   MESSAGE("Debut de MonEditFile " << aFileName.toStdString().c_str());
   setupUi(this);
@@ -94,7 +95,10 @@ void MonEditFile::EditText()
   else
   {
      // GERALD -- QMESSAGE BOX
-     MESSAGE( "EditText " << _aFileName.toStdString().c_str() << "est impossible a ouvrir ");
+     MESSAGE( "EditText " << _aFileName.toStdString().c_str() << " est impossible a ouvrir ");
+    QMessageBox::warning( 0, QObject::tr("HOM_WARNING"),
+                              QObject::tr("HOM_SELECT_FILE_3") );
+    _codret = 1 ;
   }
 }
 // ------------------------------------------------------------------------
index d6e36501a3ef8f6131952fce36532d6f26a4b8d3..e11f22864afac315163be172577d0d61146dfcdc 100644 (file)
@@ -44,6 +44,7 @@ public:
                  HOMARD::HOMARD_Gen_var myHomardGen,
                  QString FileName );
     ~MonEditFile();
+    int _codret ;
 
 protected :
 
index 6aba5456e9cb528e553ad3325321e16f4b80d32b..19835e13c63b5fc030282ad3fc914d4356a1521a 100755 (executable)
@@ -169,7 +169,7 @@ CORBA::Long HOMARD_Gen_i::GetCurrentStudyID()
 void HOMARD_Gen_i::SetEtatIter(const char* nomIter, const CORBA::Boolean EtatCalcul)
 //=====================================================================================
 {
-  MESSAGE( "SetEtatIter : affectation de l etat " << EtatCalcul << " a l iteration " << nomIter );
+  MESSAGE( "SetEtatIter : affectation de l'etat '" << EtatCalcul << "' a l'iteration " << nomIter );
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
   if (CORBA::is_nil(myIteration))
   {
@@ -276,8 +276,9 @@ CORBA::Long HOMARD_Gen_i::DeleteCase(const char* nomCas)
   };
   // On commence par detruire toutes les iterations en partant de l'initiale et y compris elle
   CORBA::String_var nomIter = myCase->GetIter0Name();
-  CORBA::Long Option = 0 ;
-  if ( DeleteIterationOption(nomIter, Option) != 0 )
+  CORBA::Long Option1 = 0 ;
+  CORBA::Long Option2 = 1 ;
+  if ( DeleteIterationOption(nomIter, Option1, Option2) != 0 )
   {
     return 2;
   };
@@ -339,19 +340,25 @@ CORBA::Long HOMARD_Gen_i::DeleteHypo(const char* nomHypo)
   return 0 ;
 }
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::DeleteIteration(const char* nomIter)
+CORBA::Long HOMARD_Gen_i::DeleteIteration(const char* nomIter, CORBA::Long Option)
 {
+  //  Option = 0 : On ne supprime pas le fichier du maillage associe
+  //  Option = 1 : On supprime le fichier du maillage associe
+  //  Option = 2 : On supprime le fichier du maillage associe, sauf si c'est la derniere iteration
   // Pour detruire une iteration courante
-  MESSAGE ( "DeleteIteration : nomIter = " << nomIter );
-  CORBA::Long Option = 1 ;
-  return DeleteIterationOption(nomIter, Option);
+  MESSAGE ( "DeleteIteration : nomIter = " << nomIter << ", avec option = " << Option );
+  CORBA::Long Option1 = 1 ;
+  return DeleteIterationOption(nomIter, Option1, Option);
 }
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::DeleteIterationOption(const char* nomIter, CORBA::Long Option)
+CORBA::Long HOMARD_Gen_i::DeleteIterationOption(const char* nomIter, CORBA::Long Option1, CORBA::Long Option2)
 {
-  //  Option = 0 : On autorise la destruction de l'iteration 0
-  //  Option = 1 : On interdit la destruction de l'iteration 0
-  MESSAGE ( "DeleteIterationOption : nomIter = " << nomIter << ", avec option = " << Option );
+  //  Option1 = 0 : On autorise la destruction de l'iteration 0
+  //  Option1 = 1 : On interdit la destruction de l'iteration 0
+
+  //  Option2 = 0 : On ne supprime pas le fichier du maillage associe
+  //  Option2 = 1 : On supprime le fichier du maillage associe
+  MESSAGE ( "DeleteIterationOption : nomIter = " << nomIter << ", avec options = " << Option1<< ", " << Option2 );
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
   if (CORBA::is_nil(myIteration))
   {
@@ -364,7 +371,7 @@ CORBA::Long HOMARD_Gen_i::DeleteIterationOption(const char* nomIter, CORBA::Long
 
   int numero = myIteration->GetNumber();
   MESSAGE ( "DeleteIterationOption : numero = " << numero );
-  if ( numero == 0 and Option == 1 )
+  if ( numero == 0 and Option1 == 1 )
   {
     SALOME::ExceptionStruct es;
     es.type = SALOME::BAD_PARAM;
@@ -380,14 +387,14 @@ CORBA::Long HOMARD_Gen_i::DeleteIterationOption(const char* nomIter, CORBA::Long
   {
     std::string nomIterFille = std::string((*maListe)[NumeIter]);
     MESSAGE ( ".. appel recursif de DeleteIterationOption pour nomIter = " << nomIterFille.c_str() );
-    DeleteIterationOption(nomIterFille.c_str(), Option);
+    DeleteIterationOption(nomIterFille.c_str(), Option1, Option2);
   }
 
   // On arrive ici pour une iteration sans fille
   MESSAGE ( "Destruction effective de " << nomIter );
   // On commence par invalider l'iteration pour faire le menage des dependances
-  // et des publications dans SMESH
-  InvalideIter(nomIter) ;
+  // et eventeullement du maillage associe
+  InvalideIterOption(nomIter, Option2) ;
 
   // Retrait dans la descendance de l'iteration parent
   if ( numero > 0 )
@@ -525,6 +532,16 @@ void HOMARD_Gen_i::InvalideHypo(const char* nomHypo)
 void HOMARD_Gen_i::InvalideIter(const char* nomIter)
 {
   MESSAGE("InvalideIter : nomIter = " << nomIter);
+  // Pour invalider totalement une iteration courante
+  CORBA::Long Option = 1 ;
+  return InvalideIterOption(nomIter, Option);
+}
+//=============================================================================
+void HOMARD_Gen_i::InvalideIterOption(const char* nomIter, CORBA::Long Option)
+{
+  //  Option = 0 : On ne supprime pas le fichier du maillage associe
+  //  Option = 1 : On supprime le fichier du maillage associe
+  MESSAGE ( "InvalideIterOption : nomIter = " << nomIter << ", avec option = " << Option );
   HOMARD::HOMARD_Iteration_var myIteration = myContextMap[GetCurrentStudyID()]._mesIterations[nomIter];
   if (CORBA::is_nil(myIteration))
   {
@@ -578,7 +595,7 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter)
     const char* nomDir     = myIteration->GetDirName();
     const char* nomFichier = myIteration->GetMeshFile();
     std::string commande= "rm -rf " + std::string(dirCase) + "/" + std::string(nomDir);
-    commande = commande + ";rm -rf " + std::string(nomFichier);
+    if ( Option == 1 ) { commande = commande + ";rm -rf " + std::string(nomFichier) ; }
     MESSAGE ( "commande = " << commande );
     if ((system(commande.c_str())) != 0)
     {
@@ -589,7 +606,7 @@ void HOMARD_Gen_i::InvalideIter(const char* nomIter)
           return ;
     }
   // Suppression du maillage publie dans SMESH
-    const char* MeshName = myIteration->GetMeshName();
+    const char* MeshName = myIteration->GetMeshName() ;
     DeleteResultInSmesh(nomFichier, MeshName) ;
   };
 
@@ -2500,9 +2517,11 @@ void HOMARD_Gen_i::PublishBoundaryUnderCase(const char* CaseName, const char* Bo
 
 };
 //=============================================================================
-void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeType)
+void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long Option)
+//  Option = 0 : fichier issu d'une importation
+//  Option = 1 : fichier issu d'une execution HOMARD
 {
-  MESSAGE( "PublishResultInSmesh " << NomFich);
+  MESSAGE( "PublishResultInSmesh " << NomFich << ", avec Option = " << Option);
   if (CORBA::is_nil(myCurrentStudy))
   {
       SALOME::ExceptionStruct es;
@@ -2529,9 +2548,22 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy
            CORBA::String_var value=anAttr->Value();
            if (strcmp((const char*)value,NomFich) == 0)
            {
-                // GERALD -- QMESSAGE BOX
-                std::cerr << "fichier : "<< NomFich << " deja publie "<< std::endl;
+             MESSAGE ( "PublishResultInSmesh : le fichier " << NomFich << " est deja publie." );
+             // Pour un fichier importe, on ne republie pas
+             if ( Option == 0 )
+             {
                 return;
+             }
+             // Pour un fichier calcule, on commence par faire la depublication
+             else
+             {
+                MESSAGE ( "PublishResultInSmesh : depublication" );
+                SALOMEDS::AttributeName_var anAttr2 = SALOMEDS::AttributeName::_narrow(aGAttr);
+                CORBA::String_var value2=anAttr2->Value();
+                const char* MeshName = value2 ;
+                MESSAGE ( "PublishResultInSmesh : depublication de " << MeshName );
+                DeleteResultInSmesh(NomFich, MeshName) ;
+             }
            }
        }
      }
@@ -2559,11 +2591,9 @@ void HOMARD_Gen_i::PublishResultInSmesh(const char* NomFich, CORBA::Long IconeTy
     anAttr->SetValue(NomFich);
     SALOMEDS::GenericAttribute_var aPixMap = aStudyBuilder->FindOrCreateAttribute(aSO, "AttributePixMap" );
     SALOMEDS::AttributePixMap_var anAttr2 = SALOMEDS::AttributePixMap::_narrow(aPixMap);
-//  IconeType = 0 : fichier issu d'une importation
-//  IconeType = 1 : fichier issu d'une execution HOMARD
     const char* icone ;
-    if ( IconeType == 0 ) { icone = "mesh_tree_importedmesh.png" ; }
-    else                  { icone = "mesh_tree_mesh.png" ; }
+    if ( Option == 0 ) { icone = "mesh_tree_importedmesh.png" ; }
+    else               { icone = "mesh_tree_mesh.png" ; }
     anAttr2->SetPixMap( icone );
   }
 
index 20ae21359e88eaccbe890d96586ee23c5c61096b..72d74caf2dc580027e860a3fcd8d26de27d335d8 100644 (file)
@@ -130,14 +130,15 @@ public:
   void                            InvalideBoundary(const char* nomBoundary);
   void                            InvalideHypo(const char* nomHypo);
   void                            InvalideIter(const char* nomIter);
+  void                            InvalideIterOption(const char* nomIter, CORBA::Long Option);
   void                            InvalideIterInfo(const char* nomIter);
   void                            InvalideZone(const char* nomZone);
 
   CORBA::Long                     DeleteBoundary(const char* nomBoundary);
   CORBA::Long                     DeleteCase(const char* nomCas);
   CORBA::Long                     DeleteHypo(const char* nomHypothesis);
-  CORBA::Long                     DeleteIteration(const char* nomIter);
-  CORBA::Long                     DeleteIterationOption(const char* nomIter, CORBA::Long Option);
+  CORBA::Long                     DeleteIteration(const char* nomIter, CORBA::Long Option);
+  CORBA::Long                     DeleteIterationOption(const char* nomIter, CORBA::Long Option1, CORBA::Long Option2);
   CORBA::Long                     DeleteZone(const char* nomZone);
 
   void                            AssociateIterHypo(const char* nomIter, const char* nomHypothesis);
@@ -161,7 +162,7 @@ public:
 
   CORBA::Boolean                  VerifieDir(const char* nomDir);
 
-  void                            PublishResultInSmesh(const char* NomFich, CORBA::Long IconeType);
+  void                            PublishResultInSmesh(const char* NomFich, CORBA::Long Option);
   void                            DeleteResultInSmesh(const char* NomFich, const char* MeshName);
   void                            PublishFileUnderIteration(const char* NomIter, const char* NomFich,
                                                             const char* Commentaire);
index 222dd663695f9c40b76d8917a64fb706428ce7cd..72a593e0cd0b1f741029984c7365b55eda87f0ef 100644 (file)
@@ -86,12 +86,12 @@ char* HOMARD_Iteration_i::GetName()
   return CORBA::string_dup( myHomardIteration->GetName().c_str() );
 }
 //=============================================================================
-CORBA::Long  HOMARD_Iteration_i::Delete()
+CORBA::Long  HOMARD_Iteration_i::Delete( CORBA::Long Option )
 {
   ASSERT( myHomardIteration );
   char* IterName = GetName() ;
-  MESSAGE ( "Delete : destruction de l'iteration " << IterName );
-  return _gen_i->DeleteIteration(IterName) ;
+  MESSAGE ( "Delete : destruction de l'iteration " << IterName << ", Option = " << Option );
+  return _gen_i->DeleteIteration(IterName, Option) ;
 }
 //=============================================================================
 char* HOMARD_Iteration_i::GetDumpPython()
index 103a5163f09b65fd2dbc79cbbc216ea77afd40d0..740eab5f0263ab075eb406abda46755e186c390c 100644 (file)
@@ -57,7 +57,7 @@ public:
   void                   SetName( const char* Name );
   char*                  GetName();
 
-  CORBA::Long            Delete();
+  CORBA::Long            Delete( CORBA::Long Option );
 
   char*                  GetDumpPython();
 
index e977157c711e7d860650d80af73177e54dfcae31..33047438cf1b4b4c0ba352e9a8284084096c4ee2 100644 (file)
@@ -139,7 +139,7 @@ Copyright EDF-R&D 2010, 2013
   # Destruction
       if ( iaux < n_boucle ) :
   # Recursive destruction of the iterations
-        error = Iter_1.Delete()
+        error = Iter_1.Delete(1)
         if error :
           error = 10*iaux + 3
           break