]> SALOME platform Git repositories - modules/homard.git/commitdiff
Salome HOME
Fonction d'affectation d'un type externe au maillage
authorGérald NICOLAS <gerald.nicolas@edf.fr>
Tue, 15 Dec 2015 08:51:55 +0000 (09:51 +0100)
committerGérald NICOLAS <gerald.nicolas@edf.fr>
Tue, 15 Dec 2015 08:51:55 +0000 (09:51 +0100)
16 files changed:
doc/en/tui_create_case.rst
doc/fr/tui_create_case.rst
idl/HOMARD_Cas.idl
src/HOMARD/HOMARD_Cas.cxx
src/HOMARD/HOMARD_Cas.hxx
src/HOMARD/HOMARD_DriverTools.cxx
src/HOMARD/HomardDriver.cxx
src/HOMARD/HomardDriver.hxx
src/HOMARDGUI/CreateCase.h
src/HOMARDGUI/CreateCase.ui
src/HOMARDGUI/MonCreateCase.cxx
src/HOMARDGUI/MonCreateCase.h
src/HOMARDGUI/MonEditCase.cxx
src/HOMARD_I/HOMARD_Cas_i.cxx
src/HOMARD_I/HOMARD_Cas_i.hxx
src/HOMARD_I/HOMARD_Gen_i.cxx

index c532f2a593d48d80e8b7cc39f6f3c3f147ee8dac..ddb9252f6c9131ff26509116b0c3d773e360e002 100644 (file)
@@ -120,7 +120,7 @@ Methods of the class cas
 |                                                               |
 |     - ``conf_type``: integer as follows:                      |
 |                                                               |
-|         * 0: conformal                                        |
+|         * 0: conformal (default)                              |
 |         * 1: non conformal with at max 2 cut edges per element|
 |         * 2: non conformal with one hanging node per edge of  |
 |           element                                             |
@@ -133,6 +133,21 @@ Methods of the class cas
 | **GetConfType()**                                             |
 |     Returns the type of conformity                            |
 +---------------------------------------------------------------+
+| .. module:: SetExtType                                        |
+|                                                               |
+| **SetExtType(ext_type)**                                      |
+|     Defines the external type for the case                    |
+|                                                               |
+|     - ``ext_type`` : integer as follows:                      |
+|                                                               |
+|         * 0 : Standard MED (default)                          |
+|         * 1 : Saturne 2D                                      |
++---------------------------------------------------------------+
+| .. module:: GetExtType                                        |
+|                                                               |
+| **GetExtType()**                                              |
+|     Returns the external type for the case                    |
++---------------------------------------------------------------+
 | .. module:: GetIter0                                          |
 |                                                               |
 | **GetIter0()**                                                |
index 0c9d3141530e9859c16a12cee40f98e3503a4ff7..7f0d7d0a14efc76da7468a331141aac5a2891726 100644 (file)
@@ -121,7 +121,7 @@ Méthodes de la classe cas
 |                                                               |
 |     - ``conf_type`` : entier précisant le mode de conformité  |
 |                                                               |
-|         * 0 : conforme                                        |
+|         * 0 : conforme (défaut)                               |
 |         * 1 : non conforme avec au minimum 2 aretes coupees   |
 |         * 2 : non conforme avec 1 noeud par arete de maille   |
 |         * 3 : non conforme quelconque                         |
@@ -133,6 +133,21 @@ Méthodes de la classe cas
 | **GetConfType()**                                             |
 |     Retourne le type de conformité                            |
 +---------------------------------------------------------------+
+| .. module:: SetExtType                                        |
+|                                                               |
+| **SetExtType(ext_type)**                                      |
+|     Définit le type externe associé au cas                    |
+|                                                               |
+|     - ``ext_type`` : entier précisant le type externe         |
+|                                                               |
+|         * 0 : MED standard (défaut)                           |
+|         * 1 : Saturne 2D                                      |
++---------------------------------------------------------------+
+| .. module:: GetExtType                                        |
+|                                                               |
+| **GetExtType()**                                              |
+|     Retourne le type externe associé au cas                   |
++---------------------------------------------------------------+
 | .. module:: GetIter0                                          |
 |                                                               |
 | **GetIter0()**                                                |
@@ -250,11 +265,12 @@ La création de l'objet case_1 se fait ainsi : ::
 
     case_name = "CAS_1"
     mesh_name = "MAILL"
-    mesh_file = "/local00/Salome/Adapt/m0.med"
+    mesh_file = "/home/A1789/Adapt/m0.med"
     case_1 = homard.CreateCase(case_name, mesh_name, mesh_file)
-    dirname = "/local00/Salome/Adapt/resu"
+    dirname = "/home/A1789/Adapt/resu"
     case_1.SetDirName(dirname)
     case_1.SetConfType(1)
+    case_1.SetExtType(0)
     case_1.AddBoundaryGroup( 'intersection', '' )
     case_1.AddBoundaryGroup( 'cyl_1', 'T1_EXT' )
     case_1.AddBoundaryGroup( 'cyl_1', 'T2_EXT' )
index a1812e02e04c0c5b33a79337e889143a3c212ee4..eafe1bfa81f647b17f6891b9b7d7f52e18869a91 100644 (file)
@@ -65,6 +65,9 @@ module HOMARD
     void     SetConfType(in long ConfType)                 raises (SALOME::SALOME_Exception);
     long     GetConfType()                                 raises (SALOME::SALOME_Exception);
 
+    void     SetExtType(in long ExtType)                   raises (SALOME::SALOME_Exception);
+    long     GetExtType()                                  raises (SALOME::SALOME_Exception);
+
     void     SetBoundingBox(in extrema LesExtremes)        raises (SALOME::SALOME_Exception);
     extrema  GetBoundingBox()                              raises (SALOME::SALOME_Exception);
 
index 9d2a5fe5e4befa7e8d6a4d4216cff8b611ec9a38..5daf49d45de3f8efa8e7bb9f0af55530a9cae53c 100644 (file)
@@ -50,7 +50,7 @@
  */
 //=============================================================================
 HOMARD_Cas::HOMARD_Cas():
-  _Name(""), _NomDir("/tmp"), _ConfType(0)
+  _Name(""), _NomDir("/tmp"), _ConfType(0), _ExtType(0)
 {
   MESSAGE("HOMARD_Cas");
 }
@@ -82,6 +82,8 @@ std::string HOMARD_Cas::GetDumpPython() const
   aScript << _NomDir << "\")\n";
   aScript << "\t" <<_Name << ".SetConfType(";
   aScript << _ConfType << ")\n";
+  aScript << "\t" <<_Name << ".SetExtType(";
+  aScript << _ExtType << ")\n";
 // Suivi de frontieres
   std::list<std::string>::const_iterator it = _ListBoundaryGroup.begin();
   while(it != _ListBoundaryGroup.end())
@@ -142,6 +144,9 @@ int HOMARD_Cas::GetNumberofIter()
 {
   return _ListIter.size();
 }
+//
+// Le type de conformite ou non conformite
+//
 //=============================================================================
 void HOMARD_Cas::SetConfType( int Conftype )
 {
@@ -154,6 +159,20 @@ const int HOMARD_Cas::GetConfType() const
   return _ConfType;
 }
 //
+// Le type exterieur
+//
+//=============================================================================
+void HOMARD_Cas::SetExtType( int ExtType )
+{
+//   VERIFICATION( (ExtType>=0) && (ExtType<=1) );
+  _ExtType = ExtType;
+}
+//=============================================================================
+const int HOMARD_Cas::GetExtType() const
+{
+  return _ExtType;
+}
+//
 // La boite englobante
 //
 //=============================================================================
index fecdda1befed60229a1a2b08b704e8ce6f4496d0..65412ca32f44946602ae541d6ee2938dace48a50 100644 (file)
@@ -65,6 +65,9 @@ public:
   void                          SetConfType( int ConfType );
   const int                     GetConfType() const;
 
+  void                          SetExtType( int ExtType );
+  const int                     GetExtType() const;
+
   void                          SetBoundingBox( const std::vector<double>& extremas );
   const std::vector<double>&    GetBoundingBox() const;
 
@@ -91,6 +94,7 @@ private:
   std::string                   _Name;
   std::string                   _NomDir;
   int                           _ConfType;
+  int                           _ExtType;
   int                           _Etat;
 
   std::vector<double>           _Boite;         // cf HomardQTCommun pour structure du vecteur
index 9633791d452143c3232480b9f57437926fd54995..dadfffa04f64f5e2fd4db57f059aedd360e4d52f 100644 (file)
@@ -112,6 +112,7 @@ namespace HOMARD
     os << cas.GetName();
     os << separator() << cas.GetDirName();
     os << separator() << cas.GetConfType();
+    os << separator() << cas.GetExtType();
 
     std::vector<double> coor = cas.GetBoundingBox();
     os << separator() << coor.size();
@@ -380,6 +381,10 @@ namespace HOMARD
     if ( !ok ) return false;
     cas.SetConfType( atoi( chunk.c_str() ) );
 
+    chunk = getNextChunk( stream, start, ok );
+    if ( !ok ) return false;
+    cas.SetExtType( atoi( chunk.c_str() ) );
+
     chunk = getNextChunk( stream, start, ok );
     if ( !ok ) return false;
 
index 7b88b385762e7fe7fbb97d62eca90845ffebaeba..253351d7a3eb5f5de25cc4eedbb87f6a1211d452 100644 (file)
@@ -75,12 +75,13 @@ void HomardDriver::TexteInit( const std::string DirCompute, const std::string Lo
 //
 }
 //===============================================================================
-void HomardDriver::TexteAdap( )
+void HomardDriver::TexteAdap( int ExtType )
 {
   MESSAGE("TexteAdap");
 //
   _Texte += "Action   homa\n" ;
-  _Texte += "CCAssoci med\n" ;
+  if ( ExtType ==  0 ) { _Texte += "CCAssoci med\n" ; }
+  else                 { _Texte += "CCAssoci saturne_2d\n" ; }
   _Texte += "ModeHOMA 1\n" ;
   _Texte += "NumeIter " + _siter + "\n" ;
 //
index 86017a354c15cae67fdd10e4004ed34c7c87aeb4..edf77fe09ecd0d5966f48d235802bf4d243d25e3 100644 (file)
@@ -36,7 +36,7 @@ public:
   void        TexteInit( const std::string DirCompute, const std::string LogFile, const std::string Langue );
   void        TexteInfo( int TypeBila, int NumeIter );
   void        CreeFichierDonn();
-  void        TexteAdap( );
+  void        TexteAdap( int ExtType );
   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 );
index dc57501a677d6718601f96a58fed3f541c69fa16..c2483658e096cb68fd00c96805f3b9f0e28b41b3 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading UI file 'CreateCase.ui'
 **
-** Created: Tue Nov 24 11:06:19 2015
+** Created: Mon Dec 14 17:01:30 2015
 **      by: Qt User Interface Compiler version 4.6.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling UI file!
@@ -35,7 +35,7 @@ QT_BEGIN_NAMESPACE
 class Ui_CreateCase
 {
 public:
-    QGridLayout *gridLayout_3;
+    QGridLayout *gridLayout_5;
     QWidget *WName;
     QGridLayout *gridLayout_2;
     QLabel *Name;
@@ -77,22 +77,29 @@ public:
     QSpacerItem *spacer;
     QCheckBox *CBAdvanced;
     QGroupBox *GBAdvancedOptions;
-    QGridLayout *gridLayout2;
+    QGridLayout *gridLayout_4;
     QCheckBox *CBPyramid;
+    QGroupBox *GBConforme;
+    QGridLayout *gridLayout_3;
+    QHBoxLayout *horizontalLayout_2;
     QRadioButton *RBStandard;
     QRadioButton *RBBox;
     QRadioButton *RBNC1NpA;
     QRadioButton *RBNCQuelconque;
+    QGroupBox *GBFormat;
+    QGridLayout *gridLayout2;
+    QRadioButton *RBMED;
+    QRadioButton *RBSaturne2D;
     QSpacerItem *spacer_3;
     QSpacerItem *spacer_4;
     QLabel *Comment;
-    QSpacerItem *verticalSpacer;
     QGroupBox *GroupButtons;
     QGridLayout *gridLayout3;
     QPushButton *buttonHelp;
     QPushButton *buttonApply;
     QPushButton *buttonOk;
     QPushButton *buttonCancel;
+    QSpacerItem *verticalSpacer;
     QSpacerItem *spacer_2;
 
     void setupUi(QDialog *CreateCase)
@@ -109,8 +116,8 @@ public:
         CreateCase->setSizeIncrement(QSize(1, 1));
         CreateCase->setBaseSize(QSize(600, 320));
         CreateCase->setAutoFillBackground(true);
-        gridLayout_3 = new QGridLayout(CreateCase);
-        gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
+        gridLayout_5 = new QGridLayout(CreateCase);
+        gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5"));
         WName = new QWidget(CreateCase);
         WName->setObjectName(QString::fromUtf8("WName"));
         gridLayout_2 = new QGridLayout(WName);
@@ -126,11 +133,11 @@ public:
         gridLayout_2->addWidget(LEName, 0, 1, 1, 1);
 
 
-        gridLayout_3->addWidget(WName, 0, 0, 1, 2);
+        gridLayout_5->addWidget(WName, 0, 0, 1, 3);
 
         horizontalSpacer = new QSpacerItem(199, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
 
-        gridLayout_3->addItem(horizontalSpacer, 0, 2, 1, 3);
+        gridLayout_5->addItem(horizontalSpacer, 0, 3, 1, 3);
 
         hboxLayout = new QHBoxLayout();
 #ifndef Q_OS_MAC
@@ -156,11 +163,11 @@ public:
         hboxLayout->addWidget(LEDirName);
 
 
-        gridLayout_3->addLayout(hboxLayout, 1, 0, 1, 6);
+        gridLayout_5->addLayout(hboxLayout, 1, 0, 1, 7);
 
         spacerItem = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding);
 
-        gridLayout_3->addItem(spacerItem, 2, 5, 1, 1);
+        gridLayout_5->addItem(spacerItem, 2, 6, 1, 1);
 
         hboxLayout1 = new QHBoxLayout();
 #ifndef Q_OS_MAC
@@ -186,11 +193,11 @@ public:
         hboxLayout1->addWidget(LEFileName);
 
 
-        gridLayout_3->addLayout(hboxLayout1, 3, 0, 1, 6);
+        gridLayout_5->addLayout(hboxLayout1, 3, 0, 1, 7);
 
         spacerItem1 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
 
-        gridLayout_3->addItem(spacerItem1, 3, 6, 1, 1);
+        gridLayout_5->addItem(spacerItem1, 3, 7, 1, 1);
 
         GBTypeConf = new QGroupBox(CreateCase);
         GBTypeConf->setObjectName(QString::fromUtf8("GBTypeConf"));
@@ -214,7 +221,7 @@ public:
         hboxLayout2->addWidget(RBNonConforme);
 
 
-        gridLayout_3->addWidget(GBTypeConf, 4, 0, 1, 3);
+        gridLayout_5->addWidget(GBTypeConf, 4, 0, 1, 4);
 
         hboxLayout3 = new QHBoxLayout();
 #ifndef Q_OS_MAC
@@ -233,15 +240,15 @@ public:
         hboxLayout3->addWidget(CBBoundaryA);
 
 
-        gridLayout_3->addLayout(hboxLayout3, 5, 0, 1, 4);
+        gridLayout_5->addLayout(hboxLayout3, 5, 0, 1, 5);
 
         spacerItem2 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding);
 
-        gridLayout_3->addItem(spacerItem2, 5, 4, 1, 1);
+        gridLayout_5->addItem(spacerItem2, 5, 5, 1, 1);
 
         spacerItem3 = new QSpacerItem(20, 2, QSizePolicy::Minimum, QSizePolicy::Expanding);
 
-        gridLayout_3->addItem(spacerItem3, 6, 3, 1, 1);
+        gridLayout_5->addItem(spacerItem3, 6, 4, 1, 1);
 
         GBBoundaryD = new QGroupBox(CreateCase);
         GBBoundaryD->setObjectName(QString::fromUtf8("GBBoundaryD"));
@@ -287,7 +294,7 @@ public:
         gridLayout->addWidget(PBBoundaryDiHelp, 0, 4, 1, 1);
 
 
-        gridLayout_3->addWidget(GBBoundaryD, 7, 0, 1, 5);
+        gridLayout_5->addWidget(GBBoundaryD, 7, 0, 1, 6);
 
         GBBoundaryA = new QGroupBox(CreateCase);
         GBBoundaryA->setObjectName(QString::fromUtf8("GBBoundaryA"));
@@ -335,67 +342,93 @@ public:
         formLayout->setLayout(0, QFormLayout::FieldRole, gridLayout1);
 
 
-        gridLayout_3->addWidget(GBBoundaryA, 8, 0, 1, 7);
+        gridLayout_5->addWidget(GBBoundaryA, 8, 0, 1, 8);
 
         spacer = new QSpacerItem(239, 41, QSizePolicy::Minimum, QSizePolicy::Expanding);
 
-        gridLayout_3->addItem(spacer, 9, 0, 1, 3);
+        gridLayout_5->addItem(spacer, 9, 0, 1, 4);
 
         CBAdvanced = new QCheckBox(CreateCase);
         CBAdvanced->setObjectName(QString::fromUtf8("CBAdvanced"));
 
-        gridLayout_3->addWidget(CBAdvanced, 10, 0, 1, 2);
+        gridLayout_5->addWidget(CBAdvanced, 10, 0, 1, 3);
 
         GBAdvancedOptions = new QGroupBox(CreateCase);
         GBAdvancedOptions->setObjectName(QString::fromUtf8("GBAdvancedOptions"));
-        gridLayout2 = new QGridLayout(GBAdvancedOptions);
-        gridLayout2->setObjectName(QString::fromUtf8("gridLayout2"));
+        gridLayout_4 = new QGridLayout(GBAdvancedOptions);
+        gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4"));
         CBPyramid = new QCheckBox(GBAdvancedOptions);
         CBPyramid->setObjectName(QString::fromUtf8("CBPyramid"));
 
-        gridLayout2->addWidget(CBPyramid, 0, 0, 1, 2);
+        gridLayout_4->addWidget(CBPyramid, 0, 0, 1, 1);
 
-        RBStandard = new QRadioButton(GBAdvancedOptions);
+        GBConforme = new QGroupBox(GBAdvancedOptions);
+        GBConforme->setObjectName(QString::fromUtf8("GBConforme"));
+        gridLayout_3 = new QGridLayout(GBConforme);
+        gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
+        horizontalLayout_2 = new QHBoxLayout();
+        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
+        RBStandard = new QRadioButton(GBConforme);
         RBStandard->setObjectName(QString::fromUtf8("RBStandard"));
         RBStandard->setChecked(true);
 
-        gridLayout2->addWidget(RBStandard, 1, 0, 1, 1);
+        horizontalLayout_2->addWidget(RBStandard);
 
-        RBBox = new QRadioButton(GBAdvancedOptions);
+        RBBox = new QRadioButton(GBConforme);
         RBBox->setObjectName(QString::fromUtf8("RBBox"));
         RBBox->setChecked(false);
 
-        gridLayout2->addWidget(RBBox, 1, 1, 1, 1);
+        horizontalLayout_2->addWidget(RBBox);
 
-        RBNC1NpA = new QRadioButton(GBAdvancedOptions);
+        RBNC1NpA = new QRadioButton(GBConforme);
         RBNC1NpA->setObjectName(QString::fromUtf8("RBNC1NpA"));
 
-        gridLayout2->addWidget(RBNC1NpA, 1, 2, 1, 1);
+        horizontalLayout_2->addWidget(RBNC1NpA);
 
-        RBNCQuelconque = new QRadioButton(GBAdvancedOptions);
+        RBNCQuelconque = new QRadioButton(GBConforme);
         RBNCQuelconque->setObjectName(QString::fromUtf8("RBNCQuelconque"));
 
-        gridLayout2->addWidget(RBNCQuelconque, 1, 3, 1, 1);
+        horizontalLayout_2->addWidget(RBNCQuelconque);
+
+
+        gridLayout_3->addLayout(horizontalLayout_2, 0, 0, 1, 1);
+
+
+        gridLayout_4->addWidget(GBConforme, 1, 0, 1, 1);
+
+        GBFormat = new QGroupBox(GBAdvancedOptions);
+        GBFormat->setObjectName(QString::fromUtf8("GBFormat"));
+        gridLayout2 = new QGridLayout(GBFormat);
+        gridLayout2->setObjectName(QString::fromUtf8("gridLayout2"));
+        RBMED = new QRadioButton(GBFormat);
+        RBMED->setObjectName(QString::fromUtf8("RBMED"));
+        RBMED->setChecked(true);
+
+        gridLayout2->addWidget(RBMED, 0, 0, 1, 1);
+
+        RBSaturne2D = new QRadioButton(GBFormat);
+        RBSaturne2D->setObjectName(QString::fromUtf8("RBSaturne2D"));
+
+        gridLayout2->addWidget(RBSaturne2D, 0, 1, 1, 1);
+
+
+        gridLayout_4->addWidget(GBFormat, 2, 0, 1, 1);
 
 
-        gridLayout_3->addWidget(GBAdvancedOptions, 11, 0, 1, 5);
+        gridLayout_5->addWidget(GBAdvancedOptions, 11, 0, 1, 6);
 
         spacer_3 = new QSpacerItem(128, 13, QSizePolicy::Fixed, QSizePolicy::Minimum);
 
-        gridLayout_3->addItem(spacer_3, 11, 6, 1, 1);
+        gridLayout_5->addItem(spacer_3, 11, 7, 1, 1);
 
         spacer_4 = new QSpacerItem(239, 41, QSizePolicy::Minimum, QSizePolicy::Expanding);
 
-        gridLayout_3->addItem(spacer_4, 12, 0, 1, 3);
+        gridLayout_5->addItem(spacer_4, 12, 0, 1, 5);
 
         Comment = new QLabel(CreateCase);
         Comment->setObjectName(QString::fromUtf8("Comment"));
 
-        gridLayout_3->addWidget(Comment, 13, 0, 1, 1);
-
-        verticalSpacer = new QSpacerItem(20, 35, QSizePolicy::Minimum, QSizePolicy::Expanding);
-
-        gridLayout_3->addItem(verticalSpacer, 14, 1, 1, 1);
+        gridLayout_5->addWidget(Comment, 13, 0, 1, 2);
 
         GroupButtons = new QGroupBox(CreateCase);
         GroupButtons->setObjectName(QString::fromUtf8("GroupButtons"));
@@ -432,12 +465,27 @@ public:
         gridLayout3->addWidget(buttonCancel, 0, 2, 1, 1);
 
 
-        gridLayout_3->addWidget(GroupButtons, 15, 0, 1, 5);
+        gridLayout_5->addWidget(GroupButtons, 14, 0, 1, 1);
+
+        verticalSpacer = new QSpacerItem(20, 35, QSizePolicy::Minimum, QSizePolicy::Expanding);
+
+        gridLayout_5->addItem(verticalSpacer, 14, 1, 1, 1);
 
         spacer_2 = new QSpacerItem(128, 25, QSizePolicy::Fixed, QSizePolicy::Minimum);
 
-        gridLayout_3->addItem(spacer_2, 15, 5, 1, 2);
+        gridLayout_5->addItem(spacer_2, 14, 6, 1, 2);
 
+        WName->raise();
+        GBTypeConf->raise();
+        GBBoundaryD->raise();
+        GBBoundaryA->raise();
+        CBAdvanced->raise();
+        GBAdvancedOptions->raise();
+        Comment->raise();
+        GroupButtons->raise();
+        RBSaturne2D->raise();
+        RBSaturne2D->raise();
+        RBSaturne2D->raise();
 
         retranslateUi(CreateCase);
 
@@ -473,10 +521,14 @@ public:
         CBAdvanced->setText(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8));
         GBAdvancedOptions->setTitle(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8));
         CBPyramid->setText(QApplication::translate("CreateCase", "Authorized pyramids", 0, QApplication::UnicodeUTF8));
+        GBConforme->setTitle(QApplication::translate("CreateCase", "Conformit\303\251", 0, QApplication::UnicodeUTF8));
         RBStandard->setText(QApplication::translate("CreateCase", "Standard", 0, QApplication::UnicodeUTF8));
         RBBox->setText(QApplication::translate("CreateCase", "Box", 0, QApplication::UnicodeUTF8));
         RBNC1NpA->setText(QApplication::translate("CreateCase", "1 node per edge", 0, QApplication::UnicodeUTF8));
         RBNCQuelconque->setText(QApplication::translate("CreateCase", "Free", 0, QApplication::UnicodeUTF8));
+        GBFormat->setTitle(QApplication::translate("CreateCase", "Format", 0, QApplication::UnicodeUTF8));
+        RBMED->setText(QApplication::translate("CreateCase", "MED", 0, QApplication::UnicodeUTF8));
+        RBSaturne2D->setText(QApplication::translate("CreateCase", "Saturne 2D", 0, QApplication::UnicodeUTF8));
         Comment->setText(QApplication::translate("CreateCase", " No comment.", 0, QApplication::UnicodeUTF8));
         GroupButtons->setTitle(QString());
         buttonHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8));
index a4857b0eb20731d9ebb48c50661e12fddd6d6616..7541936458d2479fe2e55e5732f4233febc50c4a 100644 (file)
@@ -40,8 +40,8 @@
   <property name="autoFillBackground">
    <bool>true</bool>
   </property>
-  <layout class="QGridLayout" name="gridLayout_3">
-   <item row="0" column="0" colspan="2">
+  <layout class="QGridLayout" name="gridLayout_5">
+   <item row="0" column="0" colspan="3">
     <widget class="QWidget" name="WName" native="true">
      <layout class="QGridLayout" name="gridLayout_2">
       <item row="0" column="0">
@@ -57,7 +57,7 @@
      </layout>
     </widget>
    </item>
-   <item row="0" column="2" colspan="3">
+   <item row="0" column="3" colspan="3">
     <spacer name="horizontalSpacer">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
@@ -70,7 +70,7 @@
      </property>
     </spacer>
    </item>
-   <item row="1" column="0" colspan="6">
+   <item row="1" column="0" colspan="7">
     <layout class="QHBoxLayout">
      <property name="spacing">
       <number>6</number>
      </item>
     </layout>
    </item>
-   <item row="2" column="5">
+   <item row="2" column="6">
     <spacer>
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="3" column="0" colspan="6">
+   <item row="3" column="0" colspan="7">
     <layout class="QHBoxLayout">
      <property name="spacing">
       <number>6</number>
      </item>
     </layout>
    </item>
-   <item row="3" column="6">
+   <item row="3" column="7">
     <spacer>
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="4" column="0" colspan="3">
+   <item row="4" column="0" colspan="4">
     <widget class="QGroupBox" name="GBTypeConf">
      <property name="title">
       <string>Conformity type</string>
      </layout>
     </widget>
    </item>
-   <item row="5" column="0" colspan="4">
+   <item row="5" column="0" colspan="5">
     <layout class="QHBoxLayout">
      <property name="spacing">
       <number>6</number>
      </item>
     </layout>
    </item>
-   <item row="5" column="4">
+   <item row="5" column="5">
     <spacer>
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="6" column="3">
+   <item row="6" column="4">
     <spacer>
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="7" column="0" colspan="5">
+   <item row="7" column="0" colspan="6">
     <widget class="QGroupBox" name="GBBoundaryD">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
      </layout>
     </widget>
    </item>
-   <item row="8" column="0" colspan="7">
+   <item row="8" column="0" colspan="8">
     <widget class="QGroupBox" name="GBBoundaryA">
      <property name="minimumSize">
       <size>
      </layout>
     </widget>
    </item>
-   <item row="9" column="0" colspan="3">
+   <item row="9" column="0" colspan="4">
     <spacer name="spacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="10" column="0" colspan="2">
+   <item row="10" column="0" colspan="3">
     <widget class="QCheckBox" name="CBAdvanced">
      <property name="text">
       <string>Advanced options</string>
      </property>
     </widget>
    </item>
-   <item row="11" column="0" colspan="5">
+   <item row="11" column="0" colspan="6">
     <widget class="QGroupBox" name="GBAdvancedOptions">
      <property name="title">
       <string>Advanced options</string>
      </property>
-     <layout class="QGridLayout" name="gridLayout">
-      <item row="0" column="0" colspan="2">
+     <layout class="QGridLayout" name="gridLayout_4">
+      <item row="0" column="0">
        <widget class="QCheckBox" name="CBPyramid">
         <property name="text">
          <string>Authorized pyramids</string>
        </widget>
       </item>
       <item row="1" column="0">
-       <widget class="QRadioButton" name="RBStandard">
-        <property name="text">
-         <string>Standard</string>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
+       <widget class="QGroupBox" name="GBConforme">
+        <property name="title">
+         <string>Conformité</string>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_3">
+         <item row="0" column="0">
+          <layout class="QHBoxLayout" name="horizontalLayout_2">
+           <item>
+            <widget class="QRadioButton" name="RBStandard">
+             <property name="text">
+              <string>Standard</string>
+             </property>
+             <property name="checked">
+              <bool>true</bool>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QRadioButton" name="RBBox">
+             <property name="text">
+              <string>Box</string>
+             </property>
+             <property name="checked">
+              <bool>false</bool>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QRadioButton" name="RBNC1NpA">
+             <property name="text">
+              <string>1 node per edge</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QRadioButton" name="RBNCQuelconque">
+             <property name="text">
+              <string>Free</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </item>
+        </layout>
        </widget>
       </item>
-      <item row="1" column="1">
-       <widget class="QRadioButton" name="RBBox">
-        <property name="text">
-         <string>Box</string>
-        </property>
-        <property name="checked">
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="2">
-       <widget class="QRadioButton" name="RBNC1NpA">
-        <property name="text">
-         <string>1 node per edge</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="3">
-       <widget class="QRadioButton" name="RBNCQuelconque">
-        <property name="text">
-         <string>Free</string>
-        </property>
+      <item row="2" column="0">
+       <widget class="QGroupBox" name="GBFormat">
+        <property name="title">
+         <string>Format</string>
+        </property>
+        <layout class="QGridLayout" name="gridLayout">
+         <item row="0" column="0">
+          <widget class="QRadioButton" name="RBMED">
+           <property name="text">
+            <string>MED</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QRadioButton" name="RBSaturne2D">
+           <property name="text">
+            <string>Saturne 2D</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </widget>
       </item>
      </layout>
     </widget>
    </item>
-   <item row="11" column="6">
+   <item row="11" column="7">
     <spacer name="spacer_3">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
     </spacer>
    </item>
-   <item row="12" column="0" colspan="3">
+   <item row="12" column="0" colspan="5">
     <spacer name="spacer_4">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="13" column="0">
+   <item row="13" column="0" colspan="2">
     <widget class="QLabel" name="Comment">
      <property name="text">
       <string> No comment.</string>
      </property>
     </widget>
    </item>
-   <item row="14" column="1">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>35</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="15" column="0" colspan="5">
+   <item row="14" column="0">
     <widget class="QGroupBox" name="GroupButtons">
      <property name="title">
       <string/>
      </layout>
     </widget>
    </item>
-   <item row="15" column="5" colspan="2">
+   <item row="14" column="1">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>35</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="14" column="6" colspan="2">
     <spacer name="spacer_2">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
     </spacer>
    </item>
   </layout>
+  <zorder>WName</zorder>
+  <zorder>GBTypeConf</zorder>
+  <zorder>GBBoundaryD</zorder>
+  <zorder>GBBoundaryA</zorder>
+  <zorder>CBAdvanced</zorder>
+  <zorder>GBAdvancedOptions</zorder>
+  <zorder>Comment</zorder>
+  <zorder>GroupButtons</zorder>
+  <zorder>RBSaturne2D</zorder>
+  <zorder>RBSaturne2D</zorder>
+  <zorder>RBSaturne2D</zorder>
  </widget>
  <resources/>
  <connections/>
index 82adec493cc5cbc36b529cae62d8f4314a11acf5..87892c7ae90e7ba31c8551e5af7e6d81eb3248a9 100644 (file)
@@ -49,6 +49,7 @@ MonCreateCase::MonCreateCase( bool modal, HOMARD::HOMARD_Gen_var myHomardGen0 )
     Ui_CreateCase(),
     _aCaseName(""),_aDirName(""),
     _ConfType(0),
+    _ExtType(0),
     _Pyram(0)
 {
   MESSAGE("Debut du constructeur de MonCreateCase");
@@ -100,6 +101,9 @@ void MonCreateCase::InitConnect()
     connect( RBNC1NpA,       SIGNAL(clicked()), this, SLOT(SetNC1NpA()));
     connect( RBNCQuelconque, SIGNAL(clicked()), this, SLOT(SetNCQuelconque()));
 
+    connect( RBMED,          SIGNAL(clicked()), this, SLOT(SetMED()));
+    connect( RBSaturne2D,    SIGNAL(clicked()), this, SLOT(SetSaturne2D()));
+
     connect( buttonOk,       SIGNAL(pressed()), this, SLOT(PushOnOK()));
     connect( buttonApply,    SIGNAL(pressed()), this, SLOT(PushOnApply(0)));
     connect( buttonCancel,   SIGNAL(pressed()), this, SLOT(close()));
@@ -252,6 +256,7 @@ bool MonCreateCase::PushOnApply(int option)
   aCase->SetDirName(aDirName.toStdString().c_str());
   _aDirName=aDirName;
   aCase->SetConfType(_ConfType);
+  aCase->SetExtType(_ExtType);
 
 //   Menage des eventuelles frontieres deja enregistrees
   aCase->SupprBoundaryGroup() ;
@@ -407,6 +412,20 @@ void MonCreateCase::SetNCQuelconque()
   _ConfType = 3;
 }
 // ------------------------------------------------------------------------
+void MonCreateCase::SetMED()
+// ------------------------------------------------------------------------
+{
+  _ExtType = 0 ;
+  RBMED->setChecked(true);
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetSaturne2D()
+// ------------------------------------------------------------------------
+{
+  _ExtType = 1 ;
+  RBSaturne2D->setChecked(true);
+}
+// ------------------------------------------------------------------------
 void MonCreateCase::SetBoundaryD()
 // ------------------------------------------------------------------------
 {
@@ -551,6 +570,7 @@ void MonCreateCase::SetAdvanced()
   MESSAGE("Debut de SetAdvanced ");
   if (CBAdvanced->isChecked())
   { GBAdvancedOptions->setVisible(1);
+    GBConforme->setVisible(1);
     RBStandard->setVisible(1);
     RBBox->setVisible(1);
     if ( ( _ConfType == 0 ) || ( _ConfType == -1 ) )
@@ -559,12 +579,16 @@ void MonCreateCase::SetAdvanced()
     else
     { RBNC1NpA->setVisible(1);
       RBNCQuelconque->setVisible(1);}
+    GBFormat->setVisible(1);
+    RBMED->setVisible(1);
+    RBSaturne2D->setVisible(1);
   }
   else
   { GBAdvancedOptions->setVisible(0);
     CBPyramid->setChecked(false);
     _Pyram = 0 ;
     SetStandard() ;
+    SetMED() ;
  }
 //
   adjustSize();
index c7e4cca1bf5989bef2afc14731faeb8d0be2d8ca..c175d98db074db8b42e6fa571482cd4e1031a02b 100644 (file)
@@ -48,6 +48,7 @@ protected :
     QString _aDirName;
 
     int _ConfType;
+    int _ExtType;
 
     int _Pyram;
 
@@ -69,6 +70,9 @@ public slots:
     virtual void SetNC1NpA();
     virtual void SetNCQuelconque();
 
+    virtual void SetMED();
+    virtual void SetSaturne2D();
+
     virtual void SetBoundaryD();
     virtual void PushBoundaryDiNew();
     virtual void PushBoundaryDiEdit();
index 7fcc792f345cc8afc18b6c04ed3ead4818d97fa3..8824d61f5a67b195f535ce81e90ffb2329533705 100644 (file)
@@ -72,6 +72,7 @@ void MonEditCase::InitValEdit()
   else                                           { RBNonConforme->setChecked(true); };
   RBConforme->setEnabled(false);
   RBNonConforme->setEnabled(false);
+  int ExtType=aCase->GetExtType();
 
 //    Non affichage du mode de suivi de frontiere
   CBBoundaryA->setVisible(0);
@@ -166,16 +167,19 @@ void MonEditCase::InitValEdit()
   CBAdvanced->setEnabled(false) ;
   int Pyram = aCase->GetPyram();
   MESSAGE("Pyram "<<Pyram);
-  if ( ( Pyram > 0 ) || ( ConfType < 0 ) || ( ConfType > 1 ) )
+  if ( ( Pyram > 0 ) || ( ConfType < 0 ) || ( ConfType > 1 ) || ( ExtType > 0 ) )
   { GBAdvancedOptions->setVisible(1);
+//
     if ( Pyram > 0 )
     { CBPyramid->setChecked(true);
-      CBPyramid->setEnabled(false);
+      CBPyramid->setVisible(1);
     }
     else
     { CBPyramid->setChecked(false);
       CBPyramid->setVisible(0);
     }
+    CBPyramid->setEnabled(false);
+//
     if ( ( ConfType == 0 ) || ( ConfType == -1 ) )
     { if ( ConfType == 0 ) { RBStandard->setChecked(true); }
       else                 { RBBox->setChecked(true); }
@@ -183,8 +187,6 @@ void MonEditCase::InitValEdit()
       RBBox->setVisible(1);
       RBNC1NpA->setVisible(0);
       RBNCQuelconque->setVisible(0);
-      RBStandard->setEnabled(false);
-      RBBox->setEnabled(false);
     }
     else
     { if (ConfType==-2) { RBBox->setChecked(true);};
@@ -195,15 +197,30 @@ void MonEditCase::InitValEdit()
       RBBox->setVisible(1);
       RBNC1NpA->setVisible(1);
       RBNCQuelconque->setVisible(1);
-      RBStandard->setEnabled(false);
-      RBBox->setEnabled(false);
-      RBNC1NpA->setEnabled(false);
-      RBNCQuelconque->setEnabled(false);
     }
+    RBStandard->setEnabled(false);
+    RBBox->setEnabled(false);
+    RBNC1NpA->setEnabled(false);
+    RBNCQuelconque->setEnabled(false);
+//
+    if ( ExtType == 0 )
+    { GBFormat->setVisible(0);
+      RBMED->setChecked(true);
+    }
+    else
+    { GBFormat->setVisible(1);
+      RBMED->setVisible(1);
+      RBSaturne2D->setVisible(1);
+      RBSaturne2D->setChecked(true);
+    }
+    RBMED->setEnabled(false);
+    RBSaturne2D->setEnabled(false);
   }
   else
   { GBAdvancedOptions->setVisible(0);
     CBPyramid->setChecked(false);
+    RBStandard->setChecked(true);
+    RBMED->setChecked(true);
   }
 //
 // L'etat
index 8bba6822dfe5be417b240fea9439dc9521427bd4..2fe200627326dc5b8d5de72cbe867d57099c791f 100755 (executable)
@@ -247,6 +247,19 @@ CORBA::Long HOMARD_Cas_i::GetConfType()
   return myHomardCas->GetConfType();
 }
 //=============================================================================
+void HOMARD_Cas_i::SetExtType( CORBA::Long ExtType )
+{
+  ASSERT( myHomardCas );
+//   VERIFICATION( (ExtType>=0) && (ExtType<=1) );
+  myHomardCas->SetExtType( ExtType );
+}
+//=============================================================================
+CORBA::Long HOMARD_Cas_i::GetExtType()
+{
+  ASSERT( myHomardCas );
+  return myHomardCas->GetExtType();
+}
+//=============================================================================
 void HOMARD_Cas_i::SetBoundingBox( const HOMARD::extrema& LesExtrema )
 {
   ASSERT( myHomardCas );
index a6d12c9f3dde08550a58c7c5e6df7367eacb1f3d..3b61059285409e381d64d4de0718c84f08b881db 100644 (file)
@@ -76,6 +76,9 @@ public:
   void                   SetConfType( CORBA::Long ConfType );
   CORBA::Long            GetConfType();
 
+  void                   SetExtType( CORBA::Long ExtType );
+  CORBA::Long            GetExtType();
+
   void                   SetBoundingBox( const HOMARD::extrema& LesExtremes );
   HOMARD::extrema*       GetBoundingBox();
 
index 44ae3827f0830b5c273cf1206a8b2e82ca0f0d24..d5d1fda59a45dca2a5c4c16dc1ac28e6275701f4 100644 (file)
@@ -1316,6 +1316,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
   // B. Lecture du fichier de configuration
   // ATTENTION : on doit veiller a la coherence entre HomardDriver et CreateCaseFromIteration
   int NumeIter ;
+  int TypeExt = 0 ;
   int TypeConf = 0 ;
   int Pyram = 0 ;
   char* MeshName ;
@@ -1405,6 +1406,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
   // D. Parametrages lus dans le fichier de configuration
 
   myCase->SetConfType (TypeConf) ;
+  myCase->SetExtType (TypeExt) ;
   myCase->SetPyram (Pyram) ;
 
   // E. Copie du fichier de maillage homard
@@ -2696,13 +2698,17 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
   int ConfType = myCase->GetConfType();
   MESSAGE ( ". ConfType = " << ConfType );
 
-  // D.2. Le maillage de depart
+  // D.1. Le type externe
+  int ExtType = myCase->GetExtType();
+  MESSAGE ( ". ExtType = " << ExtType );
+
+  // D.3. Le maillage de depart
   const char* NomMeshParent = myIterationParent->GetMeshName();
   MESSAGE ( ". NomMeshParent = " << NomMeshParent );
   const char* MeshFileParent = myIterationParent->GetMeshFile();
   MESSAGE ( ". MeshFileParent = " << MeshFileParent );
 
-  // D.3. Le maillage associe a l'iteration
+  // D.4. Le maillage associe a l'iteration
   const char* MeshFile = myIteration->GetMeshFile();
   MESSAGE ( ". MeshFile = " << MeshFile );
   FILE *file = fopen(MeshFile,"r");
@@ -2733,7 +2739,7 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
     }
   }
 
-  // D.4. Les types de raffinement et de deraffinement
+  // D.5. Les types de raffinement et de deraffinement
   // Les appels corba sont lourds, il vaut mieux les grouper
   HOMARD::listeTypes* ListTypes = myHypo->GetAdapRefinUnRef();
   ASSERT(ListTypes->length() == 3);
@@ -2744,7 +2750,7 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
 
   // E. Texte du fichier de configuration
   // E.1. Incontournables du texte
-  myDriver->TexteAdap();
+  myDriver->TexteAdap(ExtType);
   int iaux = 0 ;
   myDriver->TexteMaillageHOMARD( DirComputePa, siter, iaux ) ;
   myDriver->TexteMaillage(NomMeshParent, MeshFileParent, 0);