Salome HOME
Remplacement de mktemp par mkdtemp ou mkstemp.
authorGerald Nicolas <D68518@claui2t3.der.edf.fr>
Thu, 15 May 2014 15:18:12 +0000 (17:18 +0200)
committerGerald Nicolas <D68518@claui2t3.der.edf.fr>
Thu, 15 May 2014 15:18:12 +0000 (17:18 +0200)
Suppression d'un groupe dans les liens avec les frontières
pour les hypothèses.
Documentation des schémas YACS.

23 files changed:
doc/en/tui_create_yacs.rst
doc/files/yacs_script.py
doc/fr/tui_create_yacs.rst
idl/HOMARD_Hypothesis.idl
resources/yacs_01.en.xml
resources/yacs_01.fr.xml
src/HOMARD/HOMARD_Cas.cxx
src/HOMARD/HOMARD_Hypothesis.cxx
src/HOMARD/HOMARD_Hypothesis.hxx
src/HOMARD/HomardDriver.cxx
src/HOMARD/YACSDriver.cxx
src/HOMARD/YACSDriver.hxx
src/HOMARD_I/HOMARD_Gen_i.cxx
src/HOMARD_I/HOMARD_Hypothesis_i.cxx
src/HOMARD_I/HOMARD_Hypothesis_i.hxx
tests/test_1.py
tests/test_11.py
tests/test_12.py
tests/test_13.py
tests/test_14.py
tests/test_15.py
tests/test_2.py
tests/test_3.py

index 5790fb86212dd529d8d5e29238b5790cfe5f82ec..b42b0325e074e65ec3b403f845c24a8fc5854bf2 100644 (file)
@@ -180,6 +180,76 @@ Informations about the schema
 +---------------------------------------------------------------+
 
 
+The options of the schema
+=========================
+The default values are defined by the preferences of the module HOMARD.
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: SetMaxIter                                        |
+|                                                               |
+| **SetMaxIter(MaxIter)**                                       |
+|     Defines the maximal number of iterations for the schema.  |
+|                                                               |
+|     - ``MaxIter`` : the maximal number of iterations of the   |
+|       schema                                                  |
++---------------------------------------------------------------+
+| .. module:: GetMaxIter                                        |
+|                                                               |
+| **GetMaxIter()**                                              |
+|     Returns the maximal number of iterations of the schema    |
++---------------------------------------------------------------+
+| .. module:: SetMaxNode                                        |
+|                                                               |
+| **SetMaxNode(MaxNode)**                                       |
+|     Defines the maximal number of nodes for the adaptation.   |
+|                                                               |
+|     - ``MaxNode`` : the maximal number of nodes for the       |
+|       adaptation. If MaxNode equals 0, no limit.              |
++---------------------------------------------------------------+
+| .. module:: GetMaxNode                                        |
+|                                                               |
+| **GetMaxNode()**                                              |
+|     Returns the maximal number of nodes for the adaptation    |
++---------------------------------------------------------------+
+| .. module:: SetMaxElem                                        |
+|                                                               |
+| **SetMaxElem(MaxElem)**                                       |
+|     Defines the maximal number of meshes for the adaptation.  |
+|                                                               |
+|     - ``MaxElem`` : the maximal number of meshes for the      |
+|       adaptation. If MaxElem equals 0, no limit.              |
++---------------------------------------------------------------+
+| .. module:: GetMaxElem                                        |
+|                                                               |
+| **GetMaxElem()**                                              |
+|     Returns the maximal number of meshes for the adaptation   |
++---------------------------------------------------------------+
+| .. module:: SetTestConvergence                                |
+|                                                               |
+| **SetTestConvergence(Type, VRef)**                            |
+|     Defines a convergence test for the schema.                |
+|                                                               |
+|     - ``Type`` : the type of convergence of the schema.       |
+|                                                               |
+|         * 0 : no test                                         |
+|         * 1 : if the test value is greater than VRef          |
+|         * 2 : if the test value is lower than VRef            |
+|                                                               |
+|     - ``VRef`` : the reference value for the test             |
++---------------------------------------------------------------+
+| .. module:: GetTestConvergenceType                            |
+|                                                               |
+| **GetTestConvergenceType()**                                  |
+|     Returns the type of convergence of the schema.            |
++---------------------------------------------------------------+
+| .. module:: GetTestConvergenceVRef                            |
+|                                                               |
+| **GetTestConvergenceVRef()**                                  |
+|     Returns the reference value for the test.                 |
++---------------------------------------------------------------+
+
+
 Example
 *******
 The creation of a schema is done as follows:
@@ -189,6 +259,7 @@ The creation of a schema is done as follows:
     DirName = "/scratch/D68518/computation"
     MeshFile = "/scratch/D68518/computation/maill.00.med"
     YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile)
+    YACS_0.SetMaxIter(4)
 
 It can be writen down in a file :
 ::
index 4a09ee4ba78a5cb1f1f230bba4a323539703c04b..8866062ba2dabbc5f32affaaee7bc32b6b94f57d 100755 (executable)
@@ -22,7 +22,7 @@
 """
 Lancement d'un calcul ASTER
 """
-__revision__ = "V5.8"
+__revision__ = "V5.9"
 #
 import sys
 import os
@@ -998,8 +998,10 @@ Lancement d'un calcul
     #if self.verbose_max :
       #print commande_base
 #
-    fic_caract   = tempfile.mktemp()
-    fic_caract_2 = tempfile.mktemp()
+    t_aux = tempfile.mkstemp()
+    fic_caract   = t_aux[1]
+    t_aux = tempfile.mkstemp()
+    fic_caract_2 = t_aux[1]
 #
 # 3. Lancement
 # 3.1. Commande finale
@@ -1091,7 +1093,8 @@ fic_caract : fichier caracteristique du job
 # 2. Commande de l'examen de l'etat du job,
 #
       fic_etat = os.path.join(self.rep_calc, self.nomjob+".etat")
-      fic_etat_2 = tempfile.mktemp()
+      t_aux = tempfile.mkstemp()
+      fic_etat_2   = t_aux[1]
       commande_base  = os.path.join(self.aster_root, "bin", "as_run")
       commande_base += " --actu " + numjob + " " + self.nomjob + " " + self.mode
       if self.verbose_max :
index ec627f7777c0aac2eb3d1e9892df379dd5be3b20..d7d25ef8ed2f87f3f767c97d73cec4eabf7ddf3d 100644 (file)
@@ -105,7 +105,7 @@ Informations sur le sch
 | .. module:: GetName                                           |
 |                                                               |
 | **GetName()**                                                 |
-|     Retourne le nom du schéma                                 |
+|     Retourne le nom du schéma.                                |
 +---------------------------------------------------------------+
 | .. module:: SetType                                           |
 |                                                               |
@@ -120,12 +120,13 @@ Informations sur le sch
 | .. module:: GetType                                           |
 |                                                               |
 | **GetType()**                                                 |
-|     Retourne le type du schéma                                |
+|     Retourne le type du schéma.                               |
 +---------------------------------------------------------------+
 | .. module:: SetScriptFile                                     |
 |                                                               |
 | **SetScriptFile(script_file)**                                |
-|     Définit le fichier du script python de lancement du calcul|
+|     Définit le fichier du script python de lancement du       |
+|     calcul.                                                   |
 |                                                               |
 |     - ``script_file`` : le nom du fichier qui contient le     |
 |       le script python                                        |
@@ -134,24 +135,24 @@ Informations sur le sch
 |                                                               |
 | **GetScriptFile()**                                           |
 |     Retourne le nom du fichier MED qui contient le script     |
-|     python                                                    |
+|     python.                                                   |
 +---------------------------------------------------------------+
 | .. module:: SetDirName                                        |
 |                                                               |
 | **SetDirName(dir_name)**                                      |
-|     Définit le nom du répertoire de calcul                    |
+|     Définit le nom du répertoire de calcul.                   |
 |                                                               |
 |     - ``dir_name`` : le nom du répertoire de calcul           |
 +---------------------------------------------------------------+
 | .. module:: GetDirName                                        |
 |                                                               |
 | **GetDirName()**                                              |
-|     Retourne le nom du répertoire de calcul                   |
+|     Retourne le nom du répertoire de calcul.                  |
 +---------------------------------------------------------------+
 | .. module:: SetMeshFile                                       |
 |                                                               |
 | **SetMeshFile(mesh_file)**                                    |
-|     Définit le fichier MED du tout premier maillage           |
+|     Définit le fichier MED du tout premier maillage.          |
 |                                                               |
 |     - ``mesh_file`` : le nom du fichier MED contenant le tout |
 |       premier maillage de calcul                              |
@@ -160,19 +161,91 @@ Informations sur le sch
 |                                                               |
 | **GetMeshFile()**                                             |
 |     Retourne le nom du fichier MED du tout premier maillage   |
-|     de calcul                                                 |
+|     de calcul.                                                |
 +---------------------------------------------------------------+
 | .. module:: SetXMLFile                                        |
 |                                                               |
 | **SetXMLFile(xml_file)**                                      |
-|     Définit le fichier xml pour l'écriture                    |
+|     Définit le fichier xml pour l'écriture.                   |
 |                                                               |
 |     - ``xml_file`` : le nom du fichier xml                    |
 +---------------------------------------------------------------+
 | .. module:: GetXMLFile                                        |
 |                                                               |
 | **GetXMLFile()**                                              |
-|     Retourne le nom du fichier xml                            |
+|     Retourne le nom du fichier xml.                           |
++---------------------------------------------------------------+
+
+
+Les options du schéma
+=====================
+Les valeurs par défaut sont définies dans les préférences du module HOMARD.
+
++---------------------------------------------------------------+
++---------------------------------------------------------------+
+| .. module:: SetMaxIter                                        |
+|                                                               |
+| **SetMaxIter(MaxIter)**                                       |
+|     Définit le nombre maximal d'itérations pour le schéma.    |
+|                                                               |
+|     - ``MaxIter`` : le nombre maximal d'itérations du schéma  |
++---------------------------------------------------------------+
+| .. module:: GetMaxIter                                        |
+|                                                               |
+| **GetMaxIter()**                                              |
+|     Retourne le nombre maximal d'itérations du schéma.        |
++---------------------------------------------------------------+
+| .. module:: SetMaxNode                                        |
+|                                                               |
+| **SetMaxNode(MaxNode)**                                       |
+|     Définit le nombre maximal de noeuds pour l'adaptation.    |
+|                                                               |
+|     - ``MaxNode`` : le nombre maximal de noeuds pour          |
+|       l'adaptation. Si MaxNode est nul, aucune limite n'est   |
+|       imposée.                                                |
++---------------------------------------------------------------+
+| .. module:: GetMaxNode                                        |
+|                                                               |
+| **GetMaxNode()**                                              |
+|     Retourne le nombre maximal de noeuds pour l'adaptation.   |
++---------------------------------------------------------------+
+| .. module:: SetMaxElem                                        |
+|                                                               |
+| **SetMaxElem(MaxElem)**                                       |
+|     Définit le nombre maximal de mailles pour l'adaptation.   |
+|                                                               |
+|     - ``MaxElem`` : le nombre maximal de mailles pour         |
+|       l'adaptation. Si MaxElem est nul, aucune limite n'est   |
+|       imposée.                                                |
++---------------------------------------------------------------+
+| .. module:: GetMaxElem                                        |
+|                                                               |
+| **GetMaxElem()**                                              |
+|     Retourne le nombre maximal de mailles pour l'adaptation.  |
++---------------------------------------------------------------+
+| .. module:: SetTestConvergence                                |
+|                                                               |
+| **SetTestConvergence(Type, VRef)**                            |
+|     Précise un test de convergence pour le schéma.            |
+|                                                               |
+|     - ``Type`` : le type de convergence du schéma.            |
+|                                                               |
+|         * 0 : aucun test                                      |
+|         * 1 : quand la valeur de test est supérieure à VRef   |
+|         * 2 : quand la valeur de test est inférieure à VRef   |
+|                                                               |
+|     - ``VRef`` : la valeur de référence du test               |
++---------------------------------------------------------------+
+| .. module:: GetTestConvergenceType                            |
+|                                                               |
+| **GetTestConvergenceType()**                                  |
+|     Retourne le type de convergence du schéma.                |
++---------------------------------------------------------------+
+| .. module:: GetTestConvergenceVRef                            |
+|                                                               |
+| **GetTestConvergenceVRef()**                                  |
+|     Retourne la valeur de référence utilisée pour le test de  |
+|     convergence du schéma.                                    |
 +---------------------------------------------------------------+
 
 
@@ -185,6 +258,7 @@ La cr
     DirName = "/scratch/D68518/calcul"
     MeshFile = "/scratch/D68518/calcul/maill.00.med"
     YACS_0 = Case.CreateYACSSchema("YACS_0", ScriptFile, DirName, MeshFile)
+    YACS_0.SetMaxIter(4)
 
 On peut ensuite l'écrire dans un fichier :
 ::
index daaf0ff20de5aadf08b829671c62c227ce171d25..508c0db4a481d274a2a37244006e3ec337e00522 100644 (file)
@@ -103,6 +103,8 @@ module HOMARD
     long     GetLevelOutput()                              raises (SALOME::SALOME_Exception);
 
     void     AddGroup(in string LeGroupe)                  raises (SALOME::SALOME_Exception);
+    void     SupprGroup(in string LeGroupe)                raises (SALOME::SALOME_Exception);
+    void     SupprGroups()                                 raises (SALOME::SALOME_Exception);
     void     SetGroups(in ListGroupType ListGroup)         raises (SALOME::SALOME_Exception);
     ListGroupType GetGroups()                              raises (SALOME::SALOME_Exception);
 
index dad1bf3409c332ef26f460f6686a78d044b52fc2..da766f0343ed9f1621f45d941c21ae8ac5dd11e3 100644 (file)
@@ -219,7 +219,6 @@ Iter_1_Case_Options
 # Associated iteration #0
 Iter0 = Case.GetIter0()
 ]]></code></script>
-                              <load container="DefaultContainer"/>
                               <inport name="Case" type="HOMARD_Cas"/>
                               <outport name="Iter0" type="HOMARD_Iteration"/>
                            </inline>
@@ -302,7 +301,6 @@ else :
     OK = 1
     MessInfo = " "
 ]]></code></script>
-                     <load container="DefaultContainer"/>
                      <inport name="NumAdapt" type="int"/>
                      <inport name="LastIter" type="HOMARD_Iteration"/>
                      <inport name="Hypo" type="HOMARD_Hypothesis"/>
index 1c14561d3635dbf8f4808dd7d9b470910d74eb06..a05d16453c7d60edd60768838bc86cc704b36a57 100644 (file)
@@ -219,7 +219,6 @@ Iter_1_Case_Options
 # Iteration 0 associee
 Iter0 = Case.GetIter0()
 ]]></code></script>
-                              <load container="DefaultContainer"/>
                               <inport name="Case" type="HOMARD_Cas"/>
                               <outport name="Iter0" type="HOMARD_Iteration"/>
                            </inline>
@@ -302,7 +301,6 @@ else :
     OK = 1
     MessInfo = " "
 ]]></code></script>
-                     <load container="DefaultContainer"/>
                      <inport name="NumAdapt" type="int"/>
                      <inport name="LastIter" type="HOMARD_Iteration"/>
                      <inport name="Hypo" type="HOMARD_Hypothesis"/>
index afde91b0c6bee9deebfa6a1eabda905d757a55ec..68a9b8bc1c2a27953233df6605a7db47740ffe45 100644 (file)
@@ -203,6 +203,8 @@ void HOMARD_Cas::SupprGroups()
 //=============================================================================
 void HOMARD_Cas::AddBoundaryGroup( const char* Boundary, const char* Group )
 {
+//  MESSAGE ( ". AddBoundaryGroup : Boundary = " << Boundary );
+//   MESSAGE ( ". AddBoundaryGroup : Group = " << Group );
   _ListBoundaryGroup.push_back( Boundary );
   _ListBoundaryGroup.push_back( Group    );
 }
index f27051da278cf2fabde5cf760beec7354068f163..cfccb10e6c453cb6e0c0e89037e499a64176d778 100644 (file)
@@ -231,7 +231,7 @@ int HOMARD_Hypothesis::GetUseComp() const
 //=============================================================================
 void HOMARD_Hypothesis::AddComp( const char* NomComp )
 {
-// On commence par la supprimer au cas ou elle aurait deja ete inseree
+// On commence par supprimer la composante au cas ou elle aurait deja ete inseree
 // Cela peut se produire dans un schema YACS quand on repasse plusieurs fois par la
 // definition de l'hypothese
   SupprComp( NomComp ) ;
@@ -341,9 +341,26 @@ const int HOMARD_Hypothesis::GetLevelOutput() const
 //=============================================================================
 void HOMARD_Hypothesis::AddGroup( const char* Group)
 {
+// On commence par supprimer le groupe au cas ou il aurait deja ete insere
+// Cela peut se produire dans un schema YACS quand on repasse plusieurs fois par la
+// definition de l'hypothese
+  SupprGroup( Group ) ;
+// Insertion veritable
   _ListGroupSelected.push_back(Group);
 }
 //=============================================================================
+void HOMARD_Hypothesis::SupprGroup( const char* Group )
+{
+  MESSAGE ("SupprGroup pour "<<Group) ;
+  std::list<std::string>::iterator it = find( _ListGroupSelected.begin(), _ListGroupSelected.end(), Group );
+  if ( it != _ListGroupSelected.end() ) { it = _ListGroupSelected.erase( it ); }
+}
+//=============================================================================
+void HOMARD_Hypothesis::SupprGroups()
+{
+  _ListGroupSelected.clear();
+}
+//=============================================================================
 void HOMARD_Hypothesis::SetGroups( const std::list<std::string>& ListGroup )
 {
   _ListGroupSelected.clear();
index fe2ec51d8cc01419225622d2365c89f507a8e320..33650da11949e4b61d1dcbed254d5982286fe318 100644 (file)
@@ -93,7 +93,9 @@ public:
   void                          SetLevelOutput( int LevelOutput );
   const int                     GetLevelOutput() const;
 
-  void                          AddGroup( const char* LeGroupe);
+  void                          AddGroup( const char* Group);
+  void                          SupprGroup( const char* Group );
+  void                          SupprGroups();
   void                          SetGroups(const std::list<std::string>& ListGroup );
   const std::list<std::string>& GetGroups() const;
 
index e72821155ca8c66eb4815a21efd605288c35e047..4a9e7fd31ed5c97dde22deae7c8ffa3c64ec7a70 100644 (file)
@@ -114,7 +114,9 @@ void HomardDriver::TexteInfo( int TypeBila, int NumeIter )
 //===============================================================================
 void HomardDriver::TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres )
 {
-  MESSAGE("TexteMaillage, NomMesh ="<<NomMesh<<", MeshFile ="<<MeshFile<<", apres ="<<apres);
+  MESSAGE("TexteMaillage, NomMesh  = "<<NomMesh);
+  MESSAGE("TexteMaillage, MeshFile = "<<MeshFile);
+  MESSAGE("TexteMaillage, apres = "<<apres);
   std::string saux ;
   saux = "P1" ;
   if ( apres < 1 ) { saux = "__" ; }
@@ -623,6 +625,7 @@ void HomardDriver::TexteBoundaryDi(  const std::string MeshName, const std::stri
   MESSAGE("TexteBoundaryDi, MeshName  = "<<MeshName);
   MESSAGE("TexteBoundaryDi, MeshFile  = "<<MeshFile);
 //
+  _Texte += "#\n# Frontiere discrete\n" ;
   _Texte += "CCNoMFro \"" + MeshName + "\"\n" ;
   _Texte += "CCFronti \"" + MeshFile + "\"\n" ;
 //
index df73992e7b394fa5a0cf29ea5620c50bedc57914..ac0ae6d6163c4437b09094ac05226a38fc96bc96 100644 (file)
@@ -274,11 +274,14 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho
 // pythonStructure : le python correspondant a la frontiere
 // methode : methode associee a la creation de la frontiere
 // BoundaryName : nom de la frontiere
+// MeshName : nom du maillage dans le cas d'une frontiere discrete
+// MeshFile : nom du fichier du maillage dans le cas d'une frontiere discrete
 //===============================================================================
-std::string YACSDriver::Texte_Iter_1_Boundary( int BoundaryType, const std::string pythonStructure, const std::string methode, const std::string BoundaryName )
+std::string YACSDriver::Texte_Iter_1_Boundary( int BoundaryType, const std::string pythonStructure, const std::string methode, const std::string BoundaryName, const std::string MeshName, const std::string MeshFile )
 {
   MESSAGE("Texte_Iter_1_Boundary, BoundaryType = "<<BoundaryType<<", pythonStructure = "<<pythonStructure);
   MESSAGE("methode = "<<methode<<", BoundaryName = "<<BoundaryName );
+  if (BoundaryType == 0) { MESSAGE("MeshName = "<<MeshName<<", MeshFile = "<<MeshFile ); }
 //
 // 1. Le nom du noeud
   std::string noeud_2 = methode + "_" + BoundaryName ;
@@ -293,144 +296,146 @@ std::string YACSDriver::Texte_Iter_1_Boundary( int BoundaryType, const std::stri
   _Texte += "                              <node>Etude_Initialisation.SetCurrentStudy</node>\n" ;
   _Texte += "                              <method>" + methode + "</method>\n" ;
 // 4. Les inports
-// 4.1. Le nom de la zone
+//    ATTENTION : les noms doivent etre les memes que dans Gen.xml, donc HOMARD_Gen.idl
+// 4.1. Le nom de la frontiere
   _Texte += Texte_inport( "string", "BoundaryName" ) ;
   TexteParametre( node, "BoundaryName", "string", BoundaryName ) ;
-// 4.2. Les valeurs numeriques
-//      ATTENTION : les noms doivent etre les memes que dans Gen.xml, donc HOMARD_Gen.idl
-// 4.2.1. Decodage des valeurs
+// 4.2. Cas d une frontiere discrete
+  if (BoundaryType == 0)
+  {
+    _Texte += Texte_inport( "string", "MeshName" ) ;
+    TexteParametre( node, "MeshName", "string", MeshName ) ;
+    _Texte += Texte_inport( "string", "FileName" ) ;
+    TexteParametre( node, "FileName", "string", MeshFile ) ;
+  }
+// 4.3. Cas d'une frontiere analytique : les valeurs numeriques
+  else
+  {
+// 4.3.1. Decodage des valeurs
 // La chaine pythonStructure est de ce genre :
 //   CreateBoundaryCylinder('cyl_2', 17.5, -2.5, -12.5, -100., -75., -25., 50.)
 //   CreateBoundaryDi("intersection", "PIQUAGE", "/scratch/D68518/Salome/script/sfr_2d_piquage.fr.med")
-  std::string ligne = pythonStructure ;
+    std::string ligne = pythonStructure ;
 // On commence par ne garder que ce qui suit la premiere virgule
-  ligne = GetStringInTexte( ligne, ",", 1 );
+    ligne = GetStringInTexte( ligne, ",", 1 );
 // On boucle pour isoler toutes les chaines dans les virgules
-  std::string lignebis ;
-  std::string x0, x1, x2, x3, x4, x5, x6, x7  ;
-  int iaux = 0  ;
-  while ( ligne != lignebis )
-  {
-    lignebis = GetStringInTexte ( ligne, ",", 0 ) ;
+    std::string lignebis ;
+    std::string x0, x1, x2, x3, x4, x5, x6, x7  ;
+    int iaux = 0  ;
+    while ( ligne != lignebis )
+    {
+      lignebis = GetStringInTexte ( ligne, ",", 0 ) ;
 //     MESSAGE("lignebis = "<<lignebis );
-    if      ( iaux == 0 ) { x0 = lignebis ; }
-    else if ( iaux == 1 ) { x1 = lignebis ; }
-    else if ( iaux == 2 ) { x2 = lignebis ; }
-    else if ( iaux == 3 ) { x3 = lignebis ; }
-    else if ( iaux == 4 ) { x4 = lignebis ; }
-    else if ( iaux == 5 ) { x5 = lignebis ; }
-    else if ( iaux == 6 ) { x6 = lignebis ; }
-    ligne = GetStringInTexte( ligne, ",", 1 );
-    iaux += 1 ;
-  }
+      if      ( iaux == 0 ) { x0 = lignebis ; }
+      else if ( iaux == 1 ) { x1 = lignebis ; }
+      else if ( iaux == 2 ) { x2 = lignebis ; }
+      else if ( iaux == 3 ) { x3 = lignebis ; }
+      else if ( iaux == 4 ) { x4 = lignebis ; }
+      else if ( iaux == 5 ) { x5 = lignebis ; }
+      else if ( iaux == 6 ) { x6 = lignebis ; }
+      ligne = GetStringInTexte( ligne, ",", 1 );
+      iaux += 1 ;
+    }
 // La derniere valeur est toujours mise dans x7
-  x7 = GetStringInTexte ( ligne, ")", 0 ) ;
-  MESSAGE("Valeurs = "<< x0<<", "<<x1<< ", "<< x2<< ", "<< x3<<", "<<x4<<", "<<x5<<", "<<x6<<", x7"<<x7);
+    x7 = GetStringInTexte ( ligne, ")", 0 ) ;
+    MESSAGE("Valeurs = "<< x0<<", "<<x1<< ", "<< x2<< ", "<< x3<<", "<<x4<<", "<<x5<<", "<<x6<<", x7"<<x7);
 //
-// 4.2. Cas d une frontiere discrete (0)
-  if (BoundaryType == 0) // Cas d une frontiere discrete
-  {
-    _Texte += Texte_inport( "string", "MeshName" ) ;
-    TexteParametre( node, "MeshName", "string", x0 ) ;
-    _Texte += Texte_inport( "string", "FileName" ) ;
-    TexteParametre( node, "FileName", "string", x7 ) ;
-  }
-// 4.2. Cas du cylindre (1)
-  else if ( BoundaryType == 1 )
-  {
-    _Texte += Texte_inport( "double", "Xcentre" ) ;
-    _Texte += Texte_inport( "double", "Ycentre" ) ;
-    _Texte += Texte_inport( "double", "Zcentre" ) ;
-    _Texte += Texte_inport( "double", "Xaxis" ) ;
-    _Texte += Texte_inport( "double", "Yaxis" ) ;
-    _Texte += Texte_inport( "double", "Zaxis" ) ;
-    _Texte += Texte_inport( "double", "Radius" ) ;
-    TexteParametre( node, "Xcentre", "double", x0 ) ;
-    TexteParametre( node, "Ycentre", "double", x1 ) ;
-    TexteParametre( node, "Zcentre", "double", x2 ) ;
-    TexteParametre( node, "Xaxis", "double", x3 ) ;
-    TexteParametre( node, "Yaxis", "double", x4 ) ;
-    TexteParametre( node, "Zaxis", "double", x5 ) ;
-    TexteParametre( node, "Radius", "double", x7 ) ;
-  }
+// 4.3.2. Cas du cylindre (1)
+    if ( BoundaryType == 1 )
+    {
+      _Texte += Texte_inport( "double", "Xcentre" ) ;
+      _Texte += Texte_inport( "double", "Ycentre" ) ;
+      _Texte += Texte_inport( "double", "Zcentre" ) ;
+      _Texte += Texte_inport( "double", "Xaxis" ) ;
+      _Texte += Texte_inport( "double", "Yaxis" ) ;
+      _Texte += Texte_inport( "double", "Zaxis" ) ;
+      _Texte += Texte_inport( "double", "Radius" ) ;
+      TexteParametre( node, "Xcentre", "double", x0 ) ;
+      TexteParametre( node, "Ycentre", "double", x1 ) ;
+      TexteParametre( node, "Zcentre", "double", x2 ) ;
+      TexteParametre( node, "Xaxis", "double", x3 ) ;
+      TexteParametre( node, "Yaxis", "double", x4 ) ;
+      TexteParametre( node, "Zaxis", "double", x5 ) ;
+      TexteParametre( node, "Radius", "double", x7 ) ;
+    }
 //
-// 4.2. Cas de la sphere (2)
-  else if ( BoundaryType == 2 )
-  {
-    _Texte += Texte_inport( "double", "Xcentre" ) ;
-    _Texte += Texte_inport( "double", "Ycentre" ) ;
-    _Texte += Texte_inport( "double", "Zcentre" ) ;
-    _Texte += Texte_inport( "double", "Radius" ) ;
-    TexteParametre( node, "Xcentre", "double", x0 ) ;
-    TexteParametre( node, "Ycentre", "double", x1 ) ;
-    TexteParametre( node, "Zcentre", "double", x2 ) ;
-    TexteParametre( node, "Radius", "double", x7 ) ;
-  }
+// 4.3.3. Cas de la sphere (2)
+    else if ( BoundaryType == 2 )
+    {
+      _Texte += Texte_inport( "double", "Xcentre" ) ;
+      _Texte += Texte_inport( "double", "Ycentre" ) ;
+      _Texte += Texte_inport( "double", "Zcentre" ) ;
+      _Texte += Texte_inport( "double", "Radius" ) ;
+      TexteParametre( node, "Xcentre", "double", x0 ) ;
+      TexteParametre( node, "Ycentre", "double", x1 ) ;
+      TexteParametre( node, "Zcentre", "double", x2 ) ;
+      TexteParametre( node, "Radius", "double", x7 ) ;
+    }
 //
-// 4.3. Cas d un cone defini par un axe et un angle
-  else if ( BoundaryType == 3 )
-  {
-    _Texte += Texte_inport( "double", "Xaxis" ) ;
-    _Texte += Texte_inport( "double", "Yaxis" ) ;
-    _Texte += Texte_inport( "double", "Zaxis" ) ;
-    _Texte += Texte_inport( "double", "Angle" ) ;
-    _Texte += Texte_inport( "double", "Xcentre" ) ;
-    _Texte += Texte_inport( "double", "Ycentre" ) ;
-    _Texte += Texte_inport( "double", "Zcentre" ) ;
-    TexteParametre( node, "Xaxis", "double", x0 ) ;
-    TexteParametre( node, "Yaxis", "double", x1 ) ;
-    TexteParametre( node, "Zaxis", "double", x2 ) ;
-    TexteParametre( node, "Angle", "double", x3 ) ;
-    TexteParametre( node, "Xcentre", "double", x4 ) ;
-    TexteParametre( node, "Ycentre", "double", x5 ) ;
-    TexteParametre( node, "Zcentre", "double", x7 ) ;
-  }
+// 4.3.4. Cas d un cone defini par un axe et un angle
+    else if ( BoundaryType == 3 )
+    {
+      _Texte += Texte_inport( "double", "Xaxis" ) ;
+      _Texte += Texte_inport( "double", "Yaxis" ) ;
+      _Texte += Texte_inport( "double", "Zaxis" ) ;
+      _Texte += Texte_inport( "double", "Angle" ) ;
+      _Texte += Texte_inport( "double", "Xcentre" ) ;
+      _Texte += Texte_inport( "double", "Ycentre" ) ;
+      _Texte += Texte_inport( "double", "Zcentre" ) ;
+      TexteParametre( node, "Xaxis", "double", x0 ) ;
+      TexteParametre( node, "Yaxis", "double", x1 ) ;
+      TexteParametre( node, "Zaxis", "double", x2 ) ;
+      TexteParametre( node, "Angle", "double", x3 ) ;
+      TexteParametre( node, "Xcentre", "double", x4 ) ;
+      TexteParametre( node, "Ycentre", "double", x5 ) ;
+      TexteParametre( node, "Zcentre", "double", x7 ) ;
+    }
 //
-// 4.4. Cas d un cone defini par les 2 rayons
-  else if ( BoundaryType == 4 )
-  {
-    _Texte += Texte_inport( "double", "Xcentre1" ) ;
-    _Texte += Texte_inport( "double", "Ycentre1" ) ;
-    _Texte += Texte_inport( "double", "Zcentre1" ) ;
-    _Texte += Texte_inport( "double", "Radius1" ) ;
-    _Texte += Texte_inport( "double", "Xcentre2" ) ;
-    _Texte += Texte_inport( "double", "Ycentre2" ) ;
-    _Texte += Texte_inport( "double", "Zcentre2" ) ;
-    _Texte += Texte_inport( "double", "Radius2" ) ;
-    TexteParametre( node, "Xcentre1", "double", x0 ) ;
-    TexteParametre( node, "Ycentre1", "double", x1 ) ;
-    TexteParametre( node, "Zcentre1", "double", x2 ) ;
-    TexteParametre( node, "Radius1", "double", x3 ) ;
-    TexteParametre( node, "Xcentre2", "double", x4 ) ;
-    TexteParametre( node, "Ycentre2", "double", x5 ) ;
-    TexteParametre( node, "Zcentre2", "double", x6 ) ;
-    TexteParametre( node, "Radius2", "double", x7 ) ;
-  }
-// 4.5. Cas du tore (5)
-  else if ( BoundaryType == 5 )
-  {
-    _Texte += Texte_inport( "double", "Xcentre" ) ;
-    _Texte += Texte_inport( "double", "Ycentre" ) ;
-    _Texte += Texte_inport( "double", "Zcentre" ) ;
-    _Texte += Texte_inport( "double", "Xaxis" ) ;
-    _Texte += Texte_inport( "double", "Yaxis" ) ;
-    _Texte += Texte_inport( "double", "Zaxis" ) ;
-    _Texte += Texte_inport( "double", "RRev" ) ;
-    _Texte += Texte_inport( "double", "RPri" ) ;
-    TexteParametre( node, "Xcentre", "double", x0 ) ;
-    TexteParametre( node, "Ycentre", "double", x1 ) ;
-    TexteParametre( node, "Zcentre", "double", x2 ) ;
-    TexteParametre( node, "Xaxis", "double", x3 ) ;
-    TexteParametre( node, "Yaxis", "double", x4 ) ;
-    TexteParametre( node, "Zaxis", "double", x5 ) ;
-    TexteParametre( node, "RRev", "double", x6 ) ;
-    TexteParametre( node, "RPri", "double", x7 ) ;
-  }
+// 4.3.5. Cas d un cone defini par les 2 rayons
+    else if ( BoundaryType == 4 )
+    {
+      _Texte += Texte_inport( "double", "Xcentre1" ) ;
+      _Texte += Texte_inport( "double", "Ycentre1" ) ;
+      _Texte += Texte_inport( "double", "Zcentre1" ) ;
+      _Texte += Texte_inport( "double", "Radius1" ) ;
+      _Texte += Texte_inport( "double", "Xcentre2" ) ;
+      _Texte += Texte_inport( "double", "Ycentre2" ) ;
+      _Texte += Texte_inport( "double", "Zcentre2" ) ;
+      _Texte += Texte_inport( "double", "Radius2" ) ;
+      TexteParametre( node, "Xcentre1", "double", x0 ) ;
+      TexteParametre( node, "Ycentre1", "double", x1 ) ;
+      TexteParametre( node, "Zcentre1", "double", x2 ) ;
+      TexteParametre( node, "Radius1", "double", x3 ) ;
+      TexteParametre( node, "Xcentre2", "double", x4 ) ;
+      TexteParametre( node, "Ycentre2", "double", x5 ) ;
+      TexteParametre( node, "Zcentre2", "double", x6 ) ;
+      TexteParametre( node, "Radius2", "double", x7 ) ;
+    }
+// 4.3.6. Cas du tore (5)
+    else if ( BoundaryType == 5 )
+    {
+      _Texte += Texte_inport( "double", "Xcentre" ) ;
+      _Texte += Texte_inport( "double", "Ycentre" ) ;
+      _Texte += Texte_inport( "double", "Zcentre" ) ;
+      _Texte += Texte_inport( "double", "Xaxis" ) ;
+      _Texte += Texte_inport( "double", "Yaxis" ) ;
+      _Texte += Texte_inport( "double", "Zaxis" ) ;
+      _Texte += Texte_inport( "double", "RRev" ) ;
+      _Texte += Texte_inport( "double", "RPri" ) ;
+      TexteParametre( node, "Xcentre", "double", x0 ) ;
+      TexteParametre( node, "Ycentre", "double", x1 ) ;
+      TexteParametre( node, "Zcentre", "double", x2 ) ;
+      TexteParametre( node, "Xaxis", "double", x3 ) ;
+      TexteParametre( node, "Yaxis", "double", x4 ) ;
+      TexteParametre( node, "Zaxis", "double", x5 ) ;
+      TexteParametre( node, "RRev", "double", x6 ) ;
+      TexteParametre( node, "RPri", "double", x7 ) ;
+    }
 //
-// 4.2. Erreur
-  else
-  { VERIFICATION("Type de frontiere inconnu." == 0); }
-
+// 4.3.7. Erreur
+    else
+    { VERIFICATION("Type de frontiere inconnu." == 0); }
+  }
 //
 // 5. La fin
   _Texte += "                              <outport name=\"return\" type=\"HOMARD_Boundary\"/>\n" ;
index d708dda0db94ffad0a074ec67d76404f1026ba1c..b716696cc37ec6e5e38171b9a449158aee6c82a0 100644 (file)
@@ -37,7 +37,7 @@ public:
   void        Texte_DataInit_MeshFile( const std::string Meshfile ) ;
   void        Texte_Alternance_Calcul_HOMARD_Calcul( const std::string FileName ) ;
   void        Texte_Iter_1_Case_Options( const std::string pythonCas ) ;
-  std::string Texte_Iter_1_Boundary( int BoundaryType, const std::string pythonStructure, const std::string methode, const std::string BoundaryName ) ;
+  std::string Texte_Iter_1_Boundary( int BoundaryType, const std::string pythonStructure, const std::string methode, const std::string BoundaryName, const std::string MeshName, const std::string MeshFile ) ;
   std::string Texte_Iter_1_Zone( int ZoneType, const std::string pythonStructure, const std::string methode, const std::string ZoneName ) ;
   std::string Texte_Iter_1_control() ;
   std::string Texte_control( const std::string noeud_1, const std::string noeud_2, int option ) ;
index 3f12a7906edb0d7d9ab82edaf94ed9eb0171fa3e..e66f02ff48897ba9e420739bf207ce026a2c9665 100755 (executable)
@@ -1933,7 +1933,7 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryNam
 //=============================================================================
 HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryDi(const char* BoundaryName, const char* MeshName, const char* MeshFile)
 {
-  INFOS ("CreateBoundaryDi : BoundaryName  = " << BoundaryName << "MeshName = " << MeshName );
+  INFOS ("CreateBoundaryDi : BoundaryName  = " << BoundaryName << "MeshName = " << MeshName );
   HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 0);
   myBoundary->SetMeshFile( MeshFile ) ;
   myBoundary->SetMeshName( MeshName ) ;
@@ -3105,7 +3105,7 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
     std::string BoundaryName = std::string((*ListBoundaryGroupType)[NumBoundary]);
     MESSAGE ( "... BoundaryName = " << BoundaryName);
     // 2.1. La frontiere a-t-elle deja ete ecrite ?
-    //      Cela arrive quand elle estliéé a plusieurs groupes. Il ne faut l'ecrire que la premiere fois
+    //      Cela arrive quand elle est liee a plusieurs groupes. Il ne faut l'ecrire que la premiere fois
     int A_faire = 1 ;
     std::list<std::string>::const_iterator it = ListeBoundaryTraitees.begin();
     while (it != ListeBoundaryTraitees.end())
@@ -3127,7 +3127,9 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
       if (BoundaryType == 0)
       {
         const char* MeshName = myBoundary->GetMeshName() ;
+        MESSAGE ( ". MeshName = " << MeshName );
         const char* MeshFile = myBoundary->GetMeshFile() ;
+        MESSAGE ( ". MeshFile = " << MeshFile );
         myDriver->TexteBoundaryDi( MeshName, MeshFile);
         if ( BoundaryOption % 2 != 0 ) { BoundaryOption = BoundaryOption*2 ; }
       }
@@ -4299,8 +4301,17 @@ std::string HOMARD_Gen_i::YACSDriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase,
       // 4. Mise en place des instructions
       int BoundaryType = myBoundary->GetType();
       MESSAGE ( "... BoundaryType = " << BoundaryType);
+      const char* MeshName ;
+      const char* MeshFile ;
+      if (BoundaryType == 0)
+      {
+        MeshName = myBoundary->GetMeshName() ;
+        MESSAGE ( ". MeshName = " << MeshName );
+        MeshFile = myBoundary->GetMeshFile() ;
+        MESSAGE ( ". MeshFile = " << MeshFile );
+      }
       std::string texte_control_0 ;
-      texte_control_0 = myDriver->Texte_Iter_1_Boundary(BoundaryType, pythonStructure, methode, BoundaryName );
+      texte_control_0 = myDriver->Texte_Iter_1_Boundary(BoundaryType, pythonStructure, methode, BoundaryName, MeshName, MeshFile );
       texte_control += texte_control_0 ;
       // 5. Memorisation du traitement
       ListeBoundaryTraitees.push_back( BoundaryName );
index c9850946a42dad14b9146d293905340a748853ed..5e688c1e98871f6be570efd26e932b94f5fc47bf 100644 (file)
@@ -317,6 +317,18 @@ void HOMARD_Hypothesis_i::AddGroup( const char* Group)
   myHomardHypothesis->AddGroup( Group );
 }
 //=============================================================================
+void HOMARD_Hypothesis_i::SupprGroup( const char* Group )
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SupprGroup(Group);
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SupprGroups()
+{
+  ASSERT( myHomardHypothesis );
+  myHomardHypothesis->SupprGroups();
+}
+//=============================================================================
 void HOMARD_Hypothesis_i::SetGroups(const HOMARD::ListGroupType& ListGroup)
 {
   ASSERT( myHomardHypothesis );
index d39a891284bb879d99d25a650cb9a9ceaf0df2b3..734bb041b5a24d0492459f4e57cdfcd10187cc8c 100644 (file)
@@ -101,6 +101,8 @@ public:
   CORBA::Long            GetLevelOutput();
 
   void                   AddGroup( const char* Group);
+  void                   SupprGroup( const char* Group );
+  void                   SupprGroups();
   void                   SetGroups(const HOMARD::ListGroupType& ListGroup);
   HOMARD::ListGroupType* GetGroups();
 
index 196524c433e444dfbd1c246f3d17ffe363931bb0..3849bd806aa7637c22b6eafcc1230cf277bb4cbc 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2014
 Test test_1
 """
-__revision__ = "V2.3"
+__revision__ = "V2.4"
 
 #========================================================================
 Test_Name = "test_1"
@@ -42,11 +42,9 @@ Rep_Test = os.path.normpath(Rep_Test)
 sys.path.append(Rep_Test)
 from test_util import test_results
 # Repertoire des resultats
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
+dircase = tempfile.mkdtemp()
 # ==================================
 
-
 salome.salome_init()
 import iparameters
 ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
index eab14b501a44fd650bf38fb1ba9e83b4abf655c7..ee55ac495a65c66daa5667d9e655833e12ad03d1 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2014
 Test test_11 associe au tutorial 1
 """
-__revision__ = "V2.1"
+__revision__ = "V2.2"
 
 #========================================================================
 Test_Name = "test_11"
@@ -42,8 +42,7 @@ Rep_Test = os.path.normpath(Rep_Test)
 sys.path.append(Rep_Test)
 from test_util import test_results
 # Repertoire des resultats
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
+dircase = tempfile.mkdtemp()
 # Repertoire des donnees du tutorial
 data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 data_dir = os.path.normpath(data_dir)
index 0164c33fe1d529eb73bb3b5a7ecb9b10da28a64d..d0b2f1833496150c48e7b5ef9f87d3cf999fed4f 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2014
 Test test_11 associe au tutorial 2
 """
-__revision__ = "V2.1"
+__revision__ = "V2.2"
 
 #========================================================================
 Test_Name = "test_12"
@@ -42,8 +42,7 @@ Rep_Test = os.path.normpath(Rep_Test)
 sys.path.append(Rep_Test)
 from test_util import test_results
 # Repertoire des resultats
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
+dircase = tempfile.mkdtemp()
 # Repertoire des donnees du tutorial
 data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 data_dir = os.path.normpath(data_dir)
index b75e25ec2bf106a94e8c8f4e185b8923a0f354bc..bba1f254d4a9679e6b33c1b38abc224542d6c935 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2014
 Test test_11 associe au tutorial 3
 """
-__revision__ = "V2.1"
+__revision__ = "V2.2"
 
 #========================================================================
 Test_Name = "test_13"
@@ -42,8 +42,7 @@ Rep_Test = os.path.normpath(Rep_Test)
 sys.path.append(Rep_Test)
 from test_util import test_results
 # Repertoire des resultats
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
+dircase = tempfile.mkdtemp()
 # Repertoire des donnees du tutorial
 data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 data_dir = os.path.normpath(data_dir)
index 8a24a3b5e507662e0f9b36a345a2300d1ce0c836..fd84c8abbfd5111509af2e9ddcdbcfdec111de62 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2014
 Test test_11 associe au tutorial 4
 """
-__revision__ = "V2.1"
+__revision__ = "V2.2"
 
 #========================================================================
 Test_Name = "test_14"
@@ -42,8 +42,7 @@ Rep_Test = os.path.normpath(Rep_Test)
 sys.path.append(Rep_Test)
 from test_util import test_results
 # Repertoire des resultats
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
+dircase = tempfile.mkdtemp()
 # Repertoire des donnees du tutorial
 data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 data_dir = os.path.normpath(data_dir)
index d75bb4445253c53fa44b26628e7f83aaa1f9364b..25f389d651fe9d44c611e8f34616eaf5ae515544 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2014
 Test test_11 associe au tutorial 5
 """
-__revision__ = "V2.1"
+__revision__ = "V2.2"
 
 #========================================================================
 Test_Name = "test_15"
@@ -42,8 +42,7 @@ Rep_Test = os.path.normpath(Rep_Test)
 sys.path.append(Rep_Test)
 from test_util import test_results
 # Repertoire des resultats
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
+dircase = tempfile.mkdtemp()
 # Repertoire des donnees du tutorial
 data_dir = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
 data_dir = os.path.normpath(data_dir)
index 4d9dd18da87eea061a93788c74779eb159583d59..10f7fde10ab55a8bb777a22e170f86eed2b232a8 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2010, 2014
 Test test_2
 """
-__revision__ = "V2.3"
+__revision__ = "V2.4"
 
 #========================================================================
 Test_Name = "test_2"
@@ -42,11 +42,9 @@ Rep_Test = os.path.normpath(Rep_Test)
 sys.path.append(Rep_Test)
 from test_util import test_results
 # Repertoire des resultats
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
+dircase = tempfile.mkdtemp()
 # ==================================
 
-
 salome.salome_init()
 import iparameters
 ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
@@ -147,6 +145,7 @@ Python script for HOMARD
     ScriptFile = os.path.normpath(ScriptFile)
     DirName = dircase
     YACS_test_2 = Case_test_2.CreateYACSSchema("YACS_test_2", ScriptFile, DirName, MeshFile)
+    YACS_test_2.SetMaxIter(4)
     YACS_test_2.SetType(1)
     filexml = os.path.join(dircase, 'YACS_test_2.xml')
     error = YACS_test_2.WriteOnFile(filexml)
index 02df6ef8c46e043089f66a33ecafd1dbdceb7e02..09d1d87b2a4d810e6c46efbdcf6fec5cc1321540 100755 (executable)
@@ -22,7 +22,7 @@ Python script for HOMARD
 Copyright EDF-R&D 2011, 2013
 Test test_3
 """
-__revision__ = "V2.2"
+__revision__ = "V2.3"
 
 #========================================================================
 Test_Name = "test_3"
@@ -35,14 +35,16 @@ import sys
 import HOMARD
 import salome
 #
+# ==================================
 pathHomard = os.getenv('HOMARD_ROOT_DIR')
+# Repertoire des donnees du test
 Rep_Test = os.path.join(pathHomard, "share", "salome", "resources", "homard")
 Rep_Test = os.path.normpath(Rep_Test)
-dircase = tempfile.mktemp()
-os.mkdir(dircase)
-
 sys.path.append(Rep_Test)
 from test_util import test_results
+# Repertoire des resultats
+dircase = tempfile.mkdtemp()
+# ==================================
 
 salome.salome_init()
 import iparameters
@@ -54,34 +56,33 @@ ipar.append("AP_MODULES_LIST", "Homard")
 def homard_exec(theStudy):
   """
 Python script for HOMARD
-Copyright EDF-R&D 2010, 2013
   """
   error = 0
 #
   while not error :
 #
     homard.SetCurrentStudy(theStudy)
-#
-# Creation of the boundaries
-# ==========================
-# Creation of the discrete boundary
+  #
+  # Creation of the boundaries
+  # ==========================
+  # Creation of the discrete boundary
     Boundary_3_1 = homard.CreateBoundaryDi('courbes', 'COURBES', os.path.join(Rep_Test, Test_Name + '.fr.med'))
-#
-# Creation of the external cylinder
+  #
+  # Creation of the external cylinder
     Boundary_3_2 = homard.CreateBoundaryCylinder('cyl_ext', 50.0, 25., -25., 1., 0., 0., 100.)
-#
-# Creation of the internal cylinder
+  #
+  # Creation of the internal cylinder
     Boundary_3_3 = homard.CreateBoundaryCylinder('cyl_int', 50.0, 25., -25., 1., 0., 0., 50.)
-#
-# Creation of the first sphere
+  #
+  # Creation of the first sphere
     Boundary_3_4 = homard.CreateBoundarySphere('sphere_1', 50.0, 25., -25., 100.)
-#
-# Creation of the second sphere
+  #
+  # Creation of the second sphere
     Boundary_3_5 = homard.CreateBoundarySphere('sphere_2', 450.0, 25., -25., 100.)
-#
-# Creation of the hypotheses
-# ==========================
-# Uniform refinement
+  #
+  # Creation of the hypotheses
+  # ==========================
+  # Uniform refinement
     HypoName = "Hypo_" + Test_Name
     print "-------- Creation of the hypothesis", HypoName
     Hypo_test_3 = homard.CreateHypothesis(HypoName)
@@ -89,13 +90,13 @@ Copyright EDF-R&D 2010, 2013
     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()
-#
+  #
     for num in range (n_boucle+1) :
-#
+  #
       print "-------- num =", num, "--------"
-#
-# Creation of the case Case_test_3
-# ===========================
+  #
+  # Creation of the case Case_test_3
+  # ===========================
       if ( num <= 1 ) :
         CaseName = "Case_" + Test_Name
         print "-------- Creation of the case", CaseName
@@ -108,10 +109,10 @@ Copyright EDF-R&D 2010, 2013
         Case_test_3.AddBoundaryGroup('cyl_int', 'INT')
         Case_test_3.AddBoundaryGroup('sphere_1', 'END_1')
         Case_test_3.AddBoundaryGroup('sphere_2', 'END_2')
-#
-# Creation of the iterations
-# ==========================
-  # Creation of the iteration  1
+  #
+  # Creation of the iterations
+  # ==========================
+  # Creation of the iteration 1
       IterName = "I_" + Test_Name + "_1"
       print "-------- Creation of the iteration", IterName
       Iter_test_3_1 = Case_test_3.NextIteration(IterName)
@@ -144,6 +145,7 @@ Copyright EDF-R&D 2010, 2013
       print "-------- Creation of the schema", YACSName
       YACS_test_3 = Case_test_3.CreateYACSSchema(YACSName, ScriptFile, DirName, MeshFile)
       YACS_test_3.SetType(2)
+      YACS_test_3.SetMaxIter(2)
       error = YACS_test_3.Write()
       if error :
         error = 10*num + 5
@@ -184,9 +186,9 @@ Copyright EDF-R&D 2010, 2013
           print "-------- Creation of the hypothesis", HypoName
           Hypo_test_3 = homard.CreateHypothesis(HypoName)
           Hypo_test_3.SetUnifRefinUnRef(1)
-#
+  #
     break
-#
+  #
   return error
 
 #========================================================================