Salome HOME
Suppression de la fonction SetAdapRefinUnRef et création de la fonction SetUnifRefinU...
authorGerald Nicolas <D68518@claui2t3.der.edf.fr>
Thu, 20 Mar 2014 10:44:44 +0000 (11:44 +0100)
committerGerald Nicolas <D68518@claui2t3.der.edf.fr>
Thu, 20 Mar 2014 10:44:44 +0000 (11:44 +0100)
Automatisation du décodage du type de raffinement/déraffinement

19 files changed:
doc/en/divers.rst
doc/en/tui_create_hypothese.rst
doc/en/tutorials.rst
doc/files/tutorial_1.py [changed mode: 0644->0755]
doc/files/tutorial_2.py [changed mode: 0644->0755]
doc/files/tutorial_3.py
doc/files/tutorial_4.py
doc/files/tutorial_5.py
doc/fr/divers.rst
doc/fr/tui_create_hypothese.rst
doc/fr/tutorials.rst
idl/HOMARD_Hypothesis.idl
src/HOMARD/HOMARD_Hypothesis.cxx
src/HOMARDGUI/MonCreateHypothesis.cxx
src/HOMARD_I/HOMARD_Hypothesis_i.cxx
src/HOMARD_I/HOMARD_Hypothesis_i.hxx
tests/test_1.py [changed mode: 0644->0755]
tests/test_2.py [changed mode: 0644->0755]
tests/test_3.py

index 0265637477f397f00792648bd59c83df75d83021..978bd7e3477de06ded09f5c0873ead90012c7145 100644 (file)
@@ -58,6 +58,8 @@ SALOME VERSION 7.3:
     - If error occurs into the python instructions, the program stops.
 
 SALOME VERSION 7.4 :
-    - Scroll bar for the large windows
-    - The meshes are published only if requested
-    - The torus is a new possibility for the analytical boundary
+    - Scroll bar for the large windows.
+    - The meshes are published only if requested.
+    - The torus is a new possibility for the analytical boundary.
+    - The function ``SetAdapRefinUnRef(TypeAdap, TypeRaff, TypeDera)`` is suppressed. For an adaptation by a field or by zones, the mode refinement/unrefinement is automatically set from the other parameters of the hypothesis. For a uniform refinement, the function ``SetUnifRefinUnRef(TypeRaffDera)`` is now used (see :ref:`tui_create_hypothese`).
+
index 957eadf780dc5cc3394879ba538a3129fad414e3..c4f739339cd2151a5cae78af38834c8227706324 100644 (file)
@@ -50,44 +50,30 @@ General methods
 | **GetName()**                                                 |
 |     Returns the name of the hypothesis                        |
 +---------------------------------------------------------------+
-| .. module:: SetAdapRefinUnRef                                 |
-|                                                               |
-| **SetAdapRefinUnRef(Adap, Refin, UnRef)**                     |
-|     Gives the type of adaptation to the hypothesis            |
+| .. module:: GetAdapType                                       |
 |                                                               |
-|     - ``Adap``: integer that defines the type of adaptation   |
+| **GetAdapType()**                                             |
+|     Returns the type of the adaptation                        |
 |                                                               |
 |         * -1: uniform                                         |
 |         * 0: by zones                                         |
 |         * 1: by a field                                       |
-|                                                               |
-|     - ``Refin``: integer that informs if the refinement is    |
-|       active or not                                           |
-|                                                               |
-|         * 0: unactive                                         |
-|         * 1: active                                           |
-|                                                               |
-|     - ``UnRef``: integer that informs if the refinement is    |
-|       active or not                                           |
-|                                                               |
-|         * 0: unactive                                         |
-|         * 1: active                                           |
-|                                                               |
-+---------------------------------------------------------------+
-| .. module:: GetAdapType                                       |
-|                                                               |
-| **GetAdapType()**                                             |
-|     Returns the type of the adaptation                        |
 +---------------------------------------------------------------+
 | .. module:: GetRefinType                                      |
 |                                                               |
 | **GetRefinType()**                                            |
 |     Returns the type of the refinement                        |
+|                                                               |
+|         * 0: unactive                                         |
+|         * 1: active                                           |
 +---------------------------------------------------------------+
 | .. module:: GetUnRefType                                      |
 |                                                               |
 | **GetUnRefType()**                                            |
 |     Returns the type of the unrefinement                      |
+|                                                               |
+|         * 0: unactive                                         |
+|         * 1: active                                           |
 +---------------------------------------------------------------+
 | .. module:: Delete                                            |
 |                                                               |
@@ -99,8 +85,28 @@ General methods
 |         * other value: problem                                |
 +---------------------------------------------------------------+
 
+Uniform adaptation
+==================
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: SetUnifRefinUnRef                                 |
+|                                                               |
+| **SetUnifRefinUnRef(RefinUnRef)**                             |
+|     Defines a type of adaptation for the whole mesh           |
+|                                                               |
+|     - ``RefinUnRef``: integer that defines the                |
+|       type of adaptation                                      |
+|                                                               |
+|         * 1: refinement                                       |
+|         * -1: unrefinement                                    |
++---------------------------------------------------------------+
+
+Adaptation by a field
+=====================
+
 The driving field and the thresholds
-====================================
+------------------------------------
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -172,7 +178,7 @@ The driving field and the thresholds
 
 
 The components of the driving field
-===================================
+-----------------------------------
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -217,8 +223,8 @@ The components of the driving field
 +---------------------------------------------------------------+
 
 
-The zones
-=========
+Adaptation by zones
+===================
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -429,7 +435,6 @@ The creation of the object hypo_1 is done as follows:
 ::
 
     hypo_1 = homard.CreateHypothesis("HypoField")
-    hypo_1.SetAdapRefinUnRef(1, 1, 0)
     hypo_1.SetField("INDICATEUR")
     hypo_1.AddComp("INDX")
     hypo_1.AddComp("INDZ")
index 4de3b77a5bfb3dd233f6bb9b8f30201f8d3df601..95dea1016f88bda6de1355388e46199a73eb4c73 100644 (file)
@@ -50,10 +50,10 @@ Refinement by zones
 *******************
 .. index:: single: zone
 
-One proceeds here to refinement according to zones. To pass from the initial mesh to the mesh 'M_1', one uses a box framing the z=1 plane and a sphere centered on the origin with radius 1.05. Then to pass from the mesh 'M_1' to the mesh 'M_2', one replaces the sphere by a box framing the cube on side 0.5, pointing on the origin. It will be noted that the type of refinement was not specified; by default, it will be thus in conformity.
+One proceeds here to refinement according to zones. To pass from the initial mesh to the mesh 'M_1', one uses a box framing the z=1 plane and a sphere centered on the origin with radius 1.05. Then to pass from the mesh 'M_1' to the mesh 'M_2', one replaces the sphere by a box framing the cube on side 0.5, pointing on the origin and the meshes in the very first zone are unrefined.
 
 .. literalinclude:: ../files/tutorial_2.py
-   :lines: 57-101
+   :lines: 57-99
 
 .. note::
   Download the files
@@ -70,7 +70,7 @@ One proceeds here to refinement according to a field. The hypotheses are used to
 To adapt the H_1 mesh resulting from the Iter_1 iteration, two alternatives are applied. In the first, Iter_2, the field is a scalar field of indicators of error and one cuts out the 1.5% of elements where the error is largest. In the second alternative, Iter_2_bis, one is based on a vector field and one examines the jump of this vector between an element and its neighbors: one will cut out where the infinite standard of this jump is higher than the absolute threshold of 0.0001.
 
 .. literalinclude:: ../files/tutorial_3.py
-   :lines: 57-131
+   :lines: 57-128
 
 .. note::
   Download the files
@@ -108,7 +108,7 @@ The instructions to adapt a 2D mesh are exactly identical to those necessary to
 In the case presented here, one for the first time refines all the elements contained in a bored disk, then in one second iteration, all the elements contained in a rectangle. One will note the use of the follow-up of the circular borders of the field.
 
 .. literalinclude:: ../files/tutorial_5.py
-   :lines: 57-101
+   :lines: 57-99
 
 .. note::
   Download the files
old mode 100644 (file)
new mode 100755 (executable)
index b88dacb..c67c196
@@ -57,7 +57,7 @@ homard.SetCurrentStudy(salome.myStudy)
 # Hypotheses
 # ==========
 Hypo_1 = homard.CreateHypothesis('Hypo_1')
-Hypo_1.SetAdapRefinUnRef(-1, 1, 0)
+Hypo_1.SetUnifRefinUnRef(1)
 #
 # Cas
 # ===
old mode 100644 (file)
new mode 100755 (executable)
index a20e0ea..bdcafbf
@@ -68,15 +68,13 @@ Zone_2 = homard.CreateZoneBox ('Zone_2', -0.1, 0.51, -0.1, 0.51, -0.1, 0.51)
 # Hypothese "Hypo_2"
 # ==================
 Hypo_2 = homard.CreateHypothesis('Hypo_2')
-Hypo_2.SetAdapRefinUnRef(0, 1, 0)
 Hypo_2.AddZone('Zone_1', 1)
 Hypo_2.AddZone('Zone_0', 1)
 #
 # Hypothese "Hypo_2_bis"
 # ======================
 Hypo_2_bis = homard.CreateHypothesis('Hypo_2_bis')
-Hypo_2_bis.SetAdapRefinUnRef(0, 1, 0)
-Hypo_2_bis.AddZone('Zone_0', 1)
+Hypo_2_bis.AddZone('Zone_0', -1)
 Hypo_2_bis.AddZone('Zone_2', 1)
 #
 # Cas
index d56d4ffbc437fa20b1161522f99c62c8fce34ba5..922f65d09efbeecd984440e12e5926b9dd075220 100644 (file)
@@ -57,7 +57,6 @@ homard.SetCurrentStudy(salome.myStudy)
 # Hypothese "Hypo_0vers1"
 # =======================
 Hypo_0vers1 = homard.CreateHypothesis('Hypo_0vers1')
-Hypo_0vers1.SetAdapRefinUnRef(1, 1, 0)
 # Characterization of the field
 Hypo_0vers1.SetField('SOLU_0__QIRE_ELEM_SIGM__________')
 Hypo_0vers1.SetUseComp(0)
@@ -70,7 +69,6 @@ Hypo_0vers1.AddFieldInterp('SOLU_0__ERRE_ELEM_SIGM__________')
 # Hypothese "Hypo_1vers2"
 # =======================
 Hypo_1vers2 = homard.CreateHypothesis('Hypo_1vers2')
-Hypo_1vers2.SetAdapRefinUnRef(1, 1, 1)
 # Characterization of the field
 Hypo_1vers2.SetField('SOLU_1__QIRE_ELEM_SIGM__________')
 Hypo_1vers2.SetUseComp(0)
@@ -84,7 +82,6 @@ Hypo_1vers2.AddFieldInterp('SOLU_1__QIRE_ELEM_SIGM__________')
 # Hypothese "Hypo_1vers2_bis"
 # ===========================
 Hypo_1vers2_bis = homard.CreateHypothesis('Hypo_1vers2_bis')
-Hypo_1vers2_bis.SetAdapRefinUnRef(1, 1, 1)
 # Characterization of the field
 Hypo_1vers2_bis.SetField('SOLU_1__DEPL____________________')
 Hypo_1vers2_bis.SetUseComp(1)
index 9da5d464349381c5fccba769609c6571b1d2968c..0ff9e7414415c49b8d1f2172137035aa980349a9 100644 (file)
@@ -70,13 +70,13 @@ Boun_4_5 = homard.CreateBoundaryCylinder('cyl_2_int', 17.5, -2.5, -12.5, -100.,
 # ==========
 # Creation of the hypothesis Hypo_4
 Hypo_4 = homard.CreateHypothesis('Hypo_4')
-Hypo_4.SetAdapRefinUnRef(-1, 1, 0)
+Hypo_4.SetUnifRefinUnRef(1)
 Hypo_4.AddGroup('T1_INT_I')
 Hypo_4.AddGroup('T1_INT_O')
 Hypo_4.AddGroup('T2_INT')
 # Creation of the hypothesis Hypo_4_bis
 Hypo_4_bis = homard.CreateHypothesis('Hypo_4_bis')
-Hypo_4_bis.SetAdapRefinUnRef(-1, 1, 0)
+Hypo_4_bis.SetUnifRefinUnRef(1)
 Hypo_4_bis.AddGroup('T1_EXT_I')
 Hypo_4_bis.AddGroup('T1_EXT_O')
 Hypo_4_bis.AddGroup('T2_EXT')
index aee1e6088cdffe55b459658e23b5ea6950227f20..494eec29e956312121f094bdede67e3e477e2934 100644 (file)
@@ -70,11 +70,9 @@ quart_sup = homard.CreateZoneBox2D( 'quart_sup', 0., 250., 0., 250., 1 )
 # ==========
 # Creation of the hypothesis Hypo_5
 Hypo_5 = homard.CreateHypothesis('Hypo_5')
-Hypo_5.SetAdapRefinUnRef(0, 1, 0)
 Hypo_5.AddZone('enveloppe', 1)
 # Creation of the hypothesis Hypo_5_bis
 Hypo_5_bis = homard.CreateHypothesis('Hypo_5_bis')
-Hypo_5_bis.SetAdapRefinUnRef(0, 1, 0)
 Hypo_5_bis.AddZone('quart_sup', 1)
 #
 # Cas
index 55874d24738882ccf6af61f4cfcd76c093be7f1d..7f07ae9f0d4bbe621ce5330a590745536694ee93 100644 (file)
@@ -58,8 +58,9 @@ SALOME VERSION 7.3 :
     - Arrêt en cas d'erreur dans les données des instructions python
 
 SALOME VERSION 7.4 :
-    - Grandes fenêtres avec ascenseur
-    - Publication des maillages à la demande
-    - Suivi de frontière analytique torique
+    - Grandes fenêtres avec ascenseur.
+    - Publication des maillages à la demande.
+    - Suivi de frontière analytique torique.
+    - La fonction ``SetAdapRefinUnRef(TypeAdap, TypeRaff, TypeDera)`` est supprimée. Pour une adaptation selon un champ ou des zones, le mode raffinement/déraffinement est automatiquement déduit des autres paramètres de l'hypothèse. Pour un raffinement uniforme, on utilisera ``SetUnifRefinUnRef(TypeRaffDera)`` (voir :ref:`tui_create_hypothese`).
 
 
index 2b5d03030b4ab8803e6c2b42a4541b677b7ab03a..bfa4cf93c5bd9c87f78b552059996118e57eb88e 100644 (file)
@@ -56,42 +56,30 @@ G
 | **GetName()**                                                 |
 |     Retourne le nom de l'hypothèse                            |
 +---------------------------------------------------------------+
-| .. module:: SetAdapRefinUnRef                                 |
-|                                                               |
-| **SetAdapRefinUnRef(Adap, Refin, UnRef)**                     |
-|     Affecte le mode d'adaptation associé à l'hypothèse        |
+| .. module:: GetAdapType                                       |
 |                                                               |
-|     - ``Adap`` : entier précisant le type d'adaptation        |
+| **GetAdapType()**                                             |
+|     Retourne le type d'adaptation                             |
 |                                                               |
 |         * -1 : uniforme                                       |
 |         * 0 : selon des zones                                 |
 |         * 1 : selon un champ                                  |
-|                                                               |
-|     - ``Refin`` : entier précisant si le raffinement est actif|
-|                                                               |
-|         * 0 : inactif                                         |
-|         * 1 : actif                                           |
-|                                                               |
-|     - ``UnRef`` : entier précisant si déraffinement est actif |
-|                                                               |
-|         * 0 : inactif                                         |
-|         * 1 : actif                                           |
-|                                                               |
-+---------------------------------------------------------------+
-| .. module:: GetAdapType                                       |
-|                                                               |
-| **GetAdapType()**                                             |
-|     Retourne le type d'adaptation                             |
 +---------------------------------------------------------------+
 | .. module:: GetRefinType                                      |
 |                                                               |
 | **GetRefinType()**                                            |
 |     Retourne le type de raffinement                           |
+|                                                               |
+|         * 0 : inactif                                         |
+|         * 1 : actif                                           |
 +---------------------------------------------------------------+
 | .. module:: GetUnRefType                                      |
 |                                                               |
 | **GetUnRefType()**                                            |
 |     Retourne le type de déraffinement                         |
+|                                                               |
+|         * 0 : inactif                                         |
+|         * 1 : actif                                           |
 +---------------------------------------------------------------+
 | .. module:: Delete                                            |
 |                                                               |
@@ -103,8 +91,27 @@ G
 |         * autre valeur : problème                             |
 +---------------------------------------------------------------+
 
+Adaptation uniforme
+===================
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: SetUnifRefinUnRef                                 |
+|                                                               |
+| **SetUnifRefinUnRef(RefinUnRef)**                             |
+|     Définit un mode d'adaptation uniforme à tout le maillage  |
+|                                                               |
+|     - ``RefinUnRef`` : entier précisant le type d'adaptation  |
+|                                                               |
+|         * 1 : raffinement                                     |
+|         * -1 : déraffinement                                  |
++---------------------------------------------------------------+
+
+Adaptation selon un champ
+=========================
+
 Le champ de pilotage de l'adaptation et les seuils
-==================================================
+--------------------------------------------------
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -174,7 +181,7 @@ Le champ de pilotage de l'adaptation et les seuils
 
 
 Les composantes du champ de pilotage
-====================================
+------------------------------------
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -219,8 +226,8 @@ Les composantes du champ de pilotage
 +---------------------------------------------------------------+
 
 
-Les zones
-=========
+Adaptation selon des zones
+==========================
 
 +---------------------------------------------------------------+
 +---------------------------------------------------------------+
@@ -430,7 +437,6 @@ Exemple
 La création de l'objet hypo_1 se fait ainsi : ::
 
     hypo_1 = homard.CreateHypothesis("HypoField")
-    hypo_1.SetAdapRefinUnRef(1, 1, 0)
     hypo_1.SetField("INDICATEUR")
     hypo_1.AddComp("INDX")
     hypo_1.AddComp("INDZ")
index 1f040f8137b9661b3892c97399236977c2789728..46ae9688482594953267a69d1d046321b2980202 100644 (file)
@@ -49,10 +49,10 @@ Raffinement par des zones
 *************************
 .. index:: single: zone
 
-On procède ici au raffinement selon des zones. Pour passer du maillage initial au maillage 'M_1', on utilise une boîte encadrant le plan z=1 et une sphère centrée sur l'origine de rayon 1.05. Puis pour passer du maillage 'M_1' au maillage 'M_2', on remplace la sphère par une boîte encadrant le cube de côté 0.5, pointant sur l'origine. On notera que le type de raffinement n'a pas été précisé ; par défaut, il sera donc conforme.
+On procède ici au raffinement selon des zones. Pour passer du maillage initial au maillage 'M_1', on utilise une boîte encadrant le plan z=1 et une sphère centrée sur l'origine de rayon 1.05. Puis pour passer du maillage 'M_1' au maillage 'M_2', on remplace la sphère par une boîte encadrant le cube de côté 0.5, pointant sur l'origine et on déraffine les mailles contenues dans la toute première zone.
 
 .. literalinclude:: ../files/tutorial_2.py
-   :lines: 57-101
+   :lines: 57-99
 
 .. note::
   Téléchargement des fichiers
@@ -69,7 +69,7 @@ On proc
 Pour adapter le maillage H_1 issu de l'itération Iter_1, deux variantes sont appliquées. Dans la première, Iter_2, le champ est un champ scalaire d'indicateurs d'erreur et on découpe les 1.5% de mailles où l'erreur est la plus grande. Dans la seconde variante, Iter_2_bis, on se base sur un champ vectoriel et on examine le saut de ce vecteur entre une maille et ses voisines : on découpera là où la norme infinie de ce saut est supérieure au seuil absolu de 0.0001.
 
 .. literalinclude:: ../files/tutorial_3.py
-   :lines: 57-131
+   :lines: 57-128
 
 .. note::
   Téléchargement des fichiers
@@ -107,7 +107,7 @@ Les instructions pour adapter un maillage 2D sont exactement identiques 
 Dans le cas présenté ici, on raffine une première fois toutes les mailles contenues dans un disque percé, puis dans une seconde itération, toutes les mailles contenues dans un rectangle. On notera l'utilisation du suivi des frontières circulaires du domaine.
 
 .. literalinclude:: ../files/tutorial_5.py
-   :lines: 57-101
+   :lines: 57-99
 
 .. note::
   Téléchargement des fichiers
index a9ec768d9aaa806600b63c741415fa3fde0a4e03..daaf0ff20de5aadf08b829671c62c227ce171d25 100644 (file)
@@ -66,8 +66,7 @@ module HOMARD
     string   GetDumpPython()                               raises (SALOME::SALOME_Exception);
 
 // Caracteristiques
-    void     SetAdapRefinUnRef(in long Adap, in long Raff, in long Dera)
-                                                           raises (SALOME::SALOME_Exception);
+    void     SetUnifRefinUnRef(in long RaffDera)           raises (SALOME::SALOME_Exception);
     listeTypes GetAdapRefinUnRef()                         raises (SALOME::SALOME_Exception);
     long     GetAdapType()                                 raises (SALOME::SALOME_Exception);
     long     GetRefinType()                                raises (SALOME::SALOME_Exception);
index c7f6236ab9f76632547416ea23cba241dd0970bf..8c0652d84447e3fa984f089782f5c7da956f63ea 100644 (file)
@@ -79,7 +79,13 @@ std::string HOMARD_Hypothesis::GetDumpPython() const
   std::ostringstream aScript;
   aScript << "\n# Creation of the hypothesis " << _Name << "\n" ;
   aScript << "\t" << _Name << " = homard.CreateHypothesis(\"" << _Name << "\")\n";
-  aScript << "\t" << _Name << ".SetAdapRefinUnRef(" << _TypeAdap << ", " << _TypeRaff << ", " << _TypeDera << ")\n";
+  if ( _TypeAdap == -1 )
+  {
+    int TypeRaffDera ;
+    if ( _TypeRaff == 1 ) { TypeRaffDera = 1 ; }
+    else                  { TypeRaffDera = -1 ; }
+    aScript << "\t" << _Name << ".SetUnifRefinUnRef(" << TypeRaffDera << ")\n";
+  }
 
 // Raffinement selon des zones geometriques
   std::list<std::string>::const_iterator it = _ListZone.begin();
index d0ec929529b46266d155bd6e014a2cf9ad2f30da..8b63d9ab557ed6439bbab2f9ece2a5b9ffd8d4a9 100644 (file)
@@ -165,7 +165,13 @@ bool MonCreateHypothesis::PushOnApply()
   }
 
 // Mise en place des attributs
-  aHypothesis->SetAdapRefinUnRef(_aTypeAdap,_aTypeRaff,_aTypeDera);
+  if ( _aTypeAdap == -1 )
+  {
+    int TypeRaffDera ;
+    if ( _aTypeRaff == 1 ) { TypeRaffDera = 1 ; }
+    else                   { TypeRaffDera = -1 ; }
+    aHypothesis->SetUnifRefinUnRef(TypeRaffDera);
+  }
   aHypothesis->SetTypeFieldInterp(_TypeFieldInterp);
   aHypothesis->SetCaseCreation(_aCaseName.toStdString().c_str());
 
index fe8123f637a2f0ffe00f45c3072837e086e2d46c..f2dd91817b2d4e93de1833d145cb31119a1fb12c 100644 (file)
@@ -113,10 +113,21 @@ bool HOMARD_Hypothesis_i::Restore( const std::string& stream )
 // Caracteristiques
 //=============================================================================
 //=============================================================================
-void HOMARD_Hypothesis_i::SetAdapRefinUnRef( CORBA::Long TypeAdap,CORBA::Long TypeRaff, CORBA::Long TypeDera )
+void HOMARD_Hypothesis_i::SetUnifRefinUnRef( CORBA::Long TypeRaffDera )
 {
   ASSERT( myHomardHypothesis );
-  myHomardHypothesis->SetAdapType( TypeAdap );
+  int TypeRaff, TypeDera ;
+  if ( TypeRaffDera == 1 )
+  {
+    TypeRaff = 1 ;
+    TypeDera = 0 ;
+  }
+  else
+  {
+    TypeRaff = 0 ;
+    TypeDera = 1 ;
+  }
+  myHomardHypothesis->SetAdapType( -1 );
   myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera );
 }
 //=============================================================================
@@ -219,6 +230,9 @@ HOMARD::listeComposantsHypo* HOMARD_Hypothesis_i::GetComps()
 //=============================================================================
 void HOMARD_Hypothesis_i::SetRefinThr( CORBA::Long TypeThR, CORBA::Double ThreshR )
 {
+  myHomardHypothesis->SetAdapType( 1 );
+  int TypeDera = myHomardHypothesis->GetUnRefType() ;
+  myHomardHypothesis->SetRefinTypeDera( 1, TypeDera );
   myHomardHypothesis->SetRefinThr( TypeThR, ThreshR );
 }
 //=============================================================================
@@ -230,6 +244,9 @@ CORBA::Long HOMARD_Hypothesis_i::GetRefinThrType()
 //=============================================================================
 void HOMARD_Hypothesis_i::SetUnRefThr( CORBA::Long TypeThC, CORBA::Double ThreshC )
 {
+  myHomardHypothesis->SetAdapType( 1 );
+  int TypeRaff = myHomardHypothesis->GetRefinType() ;
+  myHomardHypothesis->SetRefinTypeDera( TypeRaff, 1 );
   myHomardHypothesis->SetUnRefThr( TypeThC, ThreshC );
 }
 //=============================================================================
@@ -415,8 +432,25 @@ HOMARD::listeIters* HOMARD_Hypothesis_i::GetIterations()
 //=============================================================================
 void HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse )
 {
-  MESSAGE ("Dans AddZone pour " << NomZone) ;
+  MESSAGE ("Dans AddZone pour " << NomZone << " et TypeUse = " << TypeUse ) ;
   ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SetAdapType( 0 );
+  int TypeRaff, TypeDera ;
+  if ( TypeUse == 1 )
+  {
+    TypeRaff = 1 ;
+    TypeDera = myHomardHypothesis->GetUnRefType() ;
+  }
+  else if ( TypeUse == -1 )
+  {
+    TypeRaff = myHomardHypothesis->GetRefinType() ;
+    TypeDera = 1 ;
+  }
+  else
+  {
+    ASSERT( "TypeUse should be 1 or -1" == 0 );
+  }
+  myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera );
   char* NomHypo = GetName() ;
   return _gen_i->AssociateHypoZone(NomHypo, NomZone, TypeUse) ;
 }
index 34c7d846d9b07a42ad8d130801b2ddaf36761b82..d39a891284bb879d99d25a650cb9a9ceaf0df2b3 100644 (file)
@@ -66,7 +66,7 @@ public:
   bool                   Restore( const std::string& stream );
 
 // Caracteristiques
-  void                   SetAdapRefinUnRef( CORBA::Long TypeAdap, CORBA::Long TypeRaff, CORBA::Long TypeDera );
+  void                   SetUnifRefinUnRef( CORBA::Long TypeRaffDera );
   HOMARD::listeTypes*    GetAdapRefinUnRef();
   CORBA::Long            GetAdapType();
   CORBA::Long            GetRefinType();
old mode 100644 (file)
new mode 100755 (executable)
index 067e391..5b160bc
@@ -75,7 +75,6 @@ Copyright EDF-R&D 2010, 2013
     HypoName_1 = "a10_1pc_de_mailles_a_raffiner_sur_ERRE_ELEM_SIGM"
     print "-------- Creation of the hypothesis", HypoName_1
     Hypo_1_1 = homard.CreateHypothesis(HypoName_1)
-    Hypo_1_1.SetAdapRefinUnRef(1, 1, 0)
     Hypo_1_1.SetField('RESU____ERRE_ELEM_SIGM__________')
     Hypo_1_1.SetUseComp(0)
     Hypo_1_1.AddComp('ERREST')
@@ -92,7 +91,6 @@ Copyright EDF-R&D 2010, 2013
     HypoName_2 = "Zones_1_et_2"
     print "-------- Creation of the hypothesis", HypoName_2
     Zones_1_et_2 = homard.CreateHypothesis(HypoName_2)
-    Zones_1_et_2.SetAdapRefinUnRef(0, 1, 0)
     Zones_1_et_2.AddZone('Zone_1_1', 1)
     Zones_1_et_2.AddZone('Zone_1_2', 1)
     print HypoName_2, " : zones utilisées :", Zones_1_et_2.GetZones()
old mode 100644 (file)
new mode 100755 (executable)
index dfe9b1b..f4f5c24
@@ -72,7 +72,7 @@ Copyright EDF-R&D 2010, 2013
     HypoName_1 = "Hypo_" + Test_Name + "_1"
     print "-------- Creation of the hypothesis", HypoName_1
     Hypo_test_2_1 = homard.CreateHypothesis(HypoName_1)
-    Hypo_test_2_1.SetAdapRefinUnRef(-1, 1, 0)
+    Hypo_test_2_1.SetUnifRefinUnRef(1)
     Hypo_test_2_1.AddGroup('EG')
     Hypo_test_2_1.AddGroup('BANDE')
     print HypoName_1, " : zones utilisées :", Hypo_test_2_1.GetZones()
@@ -85,7 +85,7 @@ Copyright EDF-R&D 2010, 2013
     HypoName_2 = "Hypo_" + Test_Name + "_2"
     print "-------- Creation of the hypothesis", HypoName_2
     Hypo_test_2_2 = homard.CreateHypothesis(HypoName_2)
-    Hypo_test_2_2.SetAdapRefinUnRef(-1, 1, 0)
+    Hypo_test_2_2.SetUnifRefinUnRef(1)
     Hypo_test_2_2.AddGroup('M_D')
     print HypoName_2, " : zones utilisées :", Hypo_test_2_2.GetZones()
     print HypoName_2, " : champ utilisé :", Hypo_test_2_2.GetFieldName()
index 704ff4488d479b4829f400852d1fb7f2e43b24e4..3f55458e8f4e6eabde53d99323f7ef2388112ab5 100644 (file)
@@ -85,7 +85,7 @@ Copyright EDF-R&D 2010, 2013
     HypoName = "Hypo_" + Test_Name
     print "-------- Creation of the hypothesis", HypoName
     Hypo_test_3 = homard.CreateHypothesis(HypoName)
-    Hypo_test_3.SetAdapRefinUnRef(-1, 1, 0)
+    Hypo_test_3.SetUnifRefinUnRef(1)
     print HypoName, " : zones utilisées :", Hypo_test_3.GetZones()
     print HypoName, " : champ utilisé :", Hypo_test_3.GetFieldName()
     print HypoName, " : composantes utilisées :", Hypo_test_3.GetComps()
@@ -183,7 +183,7 @@ Copyright EDF-R&D 2010, 2013
           HypoName = "Hypo_test_3"
           print "-------- Creation of the hypothesis", HypoName
           Hypo_test_3 = homard.CreateHypothesis(HypoName)
-          Hypo_test_3.SetAdapRefinUnRef(-1, 1, 0)
+          Hypo_test_3.SetUnifRefinUnRef(1)
 #
     break
 #