Salome HOME
Reduce code
authorjfa <jfa@opencascade.com>
Fri, 24 Dec 2021 16:58:09 +0000 (19:58 +0300)
committerjfa <jfa@opencascade.com>
Fri, 24 Dec 2021 16:58:09 +0000 (19:58 +0300)
idl/SMESH_Homard.idl
src/SMESH/SMESH_Homard.cxx
src/SMESH/SMESH_Homard.hxx
src/SMESHGUI/SMESHGUI_HomardAdaptDlg.cxx
src/SMESHGUI/SMESHGUI_HomardBoundaryDlg.cxx
src/SMESHGUI/SMESHGUI_HomardBoundaryDlg.h
src/SMESHGUI/SMESHGUI_HomardListGroup.cxx
src/SMESH_I/SMESH_Homard_i.cxx
src/SMESH_I/SMESH_Homard_i.hxx

index 7c41d56c62a3591650d006d8d281a83347330aff..2c4de9c7859d36c1c7f3bfd4de95d0e97042cf24 100644 (file)
@@ -118,19 +118,6 @@ module SMESHHOMARD
     void     SetFileInfo(in string FileInfo) raises (SALOME::SALOME_Exception);
     string   GetFileInfo()                   raises (SALOME::SALOME_Exception);
 
-    // Liens avec les autres iterations
-    void     LinkNextIteration(in string NomIter)          raises (SALOME::SALOME_Exception);
-    void     UnLinkNextIteration(in string NomIter)        raises (SALOME::SALOME_Exception);
-
-    void     SetIterParentName(in string NomIterParent)    raises (SALOME::SALOME_Exception);
-    string   GetIterParentName()                           raises (SALOME::SALOME_Exception);
-
-    // Liens avec les autres structures
-    void     SetCaseName(in string NomCas)                 raises (SALOME::SALOME_Exception);
-    string   GetCaseName()                                 raises (SALOME::SALOME_Exception);
-
-    void     SetHypoName(in string NomHypo)                raises (SALOME::SALOME_Exception);
-
     // Drivers
     void     SetInfoCompute(in long MessInfo)              raises (SALOME::SALOME_Exception);
     long     GetInfoCompute()                              raises (SALOME::SALOME_Exception);
@@ -164,16 +151,6 @@ module SMESHHOMARD
     void AddIteration (in string IterName) raises (SALOME::SALOME_Exception);
   };
 
-  interface HOMARD_Hypothesis : SALOME::GenericObj
-  {
-    // Generalites
-    void     SetExtraOutput(in long ExtraOutput)           raises (SALOME::SALOME_Exception);
-    long     GetExtraOutput()                              raises (SALOME::SALOME_Exception);
-
-    void     LinkIteration(in string NomIteration)         raises (SALOME::SALOME_Exception);
-    void     UnLinkIteration(in string NomIteration)       raises (SALOME::SALOME_Exception);
-  };
-
   interface HOMARD_Gen : SALOME::GenericObj
   {
     HOMARD_Boundary CreateBoundaryCAO (in string BoundaryName, in string FileName)
@@ -228,6 +205,7 @@ module SMESHHOMARD
 
     long DeleteBoundary (in string BoundaryName) raises (SALOME::SALOME_Exception);
     long DeleteCase() raises (SALOME::SALOME_Exception);
+    void CleanCase() raises (SALOME::SALOME_Exception);
 
     long Compute() raises (SALOME::SALOME_Exception);
 
index e02ea2ffeb7232225c66efbe6271c20e52408894..8a1527c6f56780152eda6e6e8be413f446a981d6 100644 (file)
 #include <direct.h>
 #endif
 
+// La gestion des repertoires
+#ifndef CHDIR
+  #ifdef WIN32
+    #define CHDIR _chdir
+  #else
+    #define CHDIR chdir
+  #endif
+#endif
+
 namespace SMESHHOMARDImpl
 {
 
-  std::string SEPARATOR = "|" ;
-
-  /*!
-    \brief Read next chunk of data from the string
-    \internal
-
-    The function tries to read next chunk of the data from the input string \a str.
-    The parameter \a start specifies the start position of next chunk. If the operation
-    read the chunk successfully, after its completion this parameter will refer to the
-    start position of the next chunk. The function returns resulting chunk as a string.
-    The status of the operation is returned via \a ok parameter.
-
-    \param str source data stream string
-    \param start start position to get next chunk
-    \param ok in this variable the status of the chunk reading operation is returned
-    \return next chunk read from the string
-  */
-  static std::string getNextChunk( const std::string& str, std::string::size_type& start, bool& ok )
-  {
-    std::string chunk = "";
-    ok = false;
-    if ( start <= str.size() ) {
-      std::string::size_type end = str.find( separator(), start );
-      chunk = str.substr( start, end == std::string::npos ? std::string::npos : end-start );
-      start = end == std::string::npos ? str.size()+1 : end + separator().size();
-      ok = true;
-    }
-    return chunk;
-  }
-
-  /*!
-    \brief Get persistence signature
-    \param type persistence entity type
-    \return persistence signature
-  */
-  std::string GetSignature( SignatureType type )
-  {
-    std::string signature = "";
-    switch ( type ) {
-    case Case:       signature = "CASE"; break;
-    case Zone:       signature = "ZONE"; break;
-    case Hypothesis: signature = "HYPO"; break;
-    case Iteration:  signature = "ITER"; break;
-    case Boundary:   signature = "BOUNDARY"; break;
-    default: break;
-    }
-    signature += separator();
-    return signature;
-  }
-
-  /*!
-    \brief Get data separator
-    \return string that is used to separate data entities in the stream
-  */
-  std::string separator()
-  {
-    return SEPARATOR ;
-  }
-
-// =======================
-// 1.1. Case
-// =======================
-  /*!
-    \brief Dump case to the string
-    \param cas case being dumped
-    \return string representation of the case
-  */
-  std::string Dump( const HOMARD_Cas& cas )
-  {
-    std::stringstream os;
-    std::string saux ;
-    // ...
-    MESSAGE( ". Sauvegarde du cas "<<cas.GetName());
-    os << cas.GetName();
-    os << separator() << cas.GetDirName();
-    os << separator() << cas.GetConfType();
-
-    std::vector<double> coor = cas.GetBoundingBox();
-    os << separator() << coor.size();
-    for ( unsigned int i = 0; i < coor.size(); i++ )
-          os << separator() << coor[i];
-
-    std::list<std::string> ListString = cas.GetIterations();
-    os << separator() << ListString.size();
-    std::list<std::string>::const_iterator it;
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-          os << separator() << *it;
-
-    ListString = cas.GetGroups();
-    os << separator() << ListString.size();
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-         os << separator() << *it;
-    ListString = cas.GetBoundaryGroup();
-    os << separator() << ListString.size();
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-         os << separator() << *it;
-
-    os << separator() << 0; //cas.GetPyram()
-
-    saux = os.str();
-//     MESSAGE( ". Fin avec "<<saux);
-    return saux ;
-  }
-//
-// ==============
-// 1.2. Iteration
-// ==============
-//
-  /*!
-    \brief Dump iteration to the string
-    \param iteration iteration being dumped
-    \return string representation of the iteration
-  */
-  std::string Dump( const HOMARD_Iteration& iteration )
-  {
-    std::stringstream os;
-    std::string saux ;
-    // ...
-    MESSAGE( ". Sauvegarde de l'iteration "<<iteration.GetName());
-    os << iteration.GetName();
-    os << separator() << iteration.GetState();
-    os << separator() << iteration.GetNumber();
-    os << separator() << iteration.GetMeshFile();
-    os << separator() << iteration.GetLogFile();
-    os << separator() << iteration.GetMeshName();
-    os << separator() << iteration.GetFieldFile();
-    os << separator() << iteration.GetTimeStep();
-    os << separator() << iteration.GetRank();
-    os << separator() << iteration.GetIterParentName();
-    //
-    std::list<std::string> ListString = iteration.GetIterations();
-    os << separator() << ListString.size();
-    std::list<std::string>::const_iterator it;
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-      os << separator() << *it;
-
-    os << separator() << iteration.GetHypoName();
-    os << separator() << iteration.GetCaseName();
-    os << separator() << iteration.GetDirNameLoc();
-
-    saux = os.str();
-//     MESSAGE( ". Fin avec "<<saux);
-    return saux ;
-  }
-//
-// ==============
-// 1.3. hypothese
-// ==============
-  /*!
-    \brief Dump hypothesis to the string
-    \param hypothesis hypothesis being dumped
-    \return string representation of the hypothesis
-  */
-  std::string Dump( const HOMARD_Hypothesis& hypothesis )
-  {
-    std::stringstream os;
-    std::string saux ;
-    // ...
-    MESSAGE( ". Sauvegarde de l'hypothese "<<hypothesis.GetName());
-    os << hypothesis.GetName();
-    os << separator() << hypothesis.GetCaseCreation();
-    os << separator() << hypothesis.GetAdapType();
-    os << separator() << hypothesis.GetRefinType();
-    os << separator() << hypothesis.GetUnRefType();
-    os << separator() << hypothesis.GetFieldName();
-    os << separator() << hypothesis.GetRefinThrType();
-    os << separator() << hypothesis.GetThreshR();
-    os << separator() << hypothesis.GetUnRefThrType();
-    os << separator() << hypothesis.GetThreshC();
-    os << separator() << hypothesis.GetUseField();
-    os << separator() << hypothesis.GetUseComp();
-    os << separator() << hypothesis.GetTypeFieldInterp();
-
-    std::list<std::string> ListString = hypothesis.GetIterations();
-    std::list<std::string>::const_iterator it;
-    os << separator() << ListString.size();
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-         os << separator() << *it;
-
-    ListString = hypothesis.GetZones();
-    os << separator() << ListString.size();
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-          os << separator() << *it;
-
-    ListString = hypothesis.GetComps();
-    os << separator() << ListString.size();
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-         os << separator() << *it;
-
-    ListString = hypothesis.GetGroups();
-    os << separator() << ListString.size();
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-          os << separator() << *it;
-
-    ListString = hypothesis.GetFieldInterps();
-    os << separator() << ListString.size();
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-          os << separator() << *it;
-
-    os << separator() << hypothesis.GetNivMax();
-    os << separator() << hypothesis.GetDiamMin();
-    os << separator() << hypothesis.GetAdapInit();
-    os << separator() << hypothesis.GetExtraOutput();
-
-    saux = os.str();
-//     MESSAGE( ". Fin avec "<<saux);
-    return saux ;
-  }
-//
-// ==============================
-// 1.5. Archivage d'une frontiere
-// ==============================
-
-  /*!
-    \brief Dump boundary to the string
-    \param boundary boundary being dumped
-    \return string representation of the boundary
-  */
-  std::string Dump( const HOMARD_Boundary& boundary )
-  {
-    std::stringstream os;
-    std::string saux ;
-    MESSAGE( ". Sauvegarde de la frontiere "<<boundary.GetName());
-
-    int BoundaryType = boundary.GetType() ;
-
-    os << boundary.GetName() ;
-    os << separator() << BoundaryType ;
-    os << separator() << boundary.GetCaseCreation() ;
-
-    if ( BoundaryType == -1 )
-    {
-      os << separator() << boundary.GetDataFile();
-    }
-    else if ( BoundaryType == 0 )
-    {
-      os << separator() << boundary.GetMeshName();
-      os << separator() << boundary.GetDataFile();
-    }
-    else {
-      std::vector<double> coor = boundary.GetCoords() ;
-      for ( unsigned int i = 0; i < coor.size(); i++ )
-            os << separator() << coor[i];
-      std::vector<double> limit = boundary.GetLimit();
-      for ( unsigned int i = 0; i < limit.size(); i++ )
-            os << separator() << limit[i];
-    }
-
-    std::list<std::string> ListString = boundary.GetGroups();
-    std::list<std::string>::const_iterator it;
-    os << separator() << ListString.size();
-    for ( it = ListString.begin(); it != ListString.end(); ++it )
-          os << separator() << *it;
-
-    saux = os.str();
-//     MESSAGE( ". Fin avec "<<saux);
-    return saux ;
-  }
-
-//
-// 2. Restauration des objets
-// ==========================
-// 2.1. Case
-// ==========================
-//
-  /*!
-    \brief Restore case from the string
-    \param cas case being restored
-    \param stream string representation of the case
-    \return \c true if case is correctly restored or \c false otherwise
-  */
-  bool Restore( HOMARD_Cas& cas, const std::string& stream )
-  {
-    MESSAGE( ". Restoration du cas ");
-    std::string::size_type start = 0;
-    std::string chunk, chunkNext;
-    bool ok;
-    // ...
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    cas.SetName( chunk.c_str() );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    cas.SetDirName( chunk.c_str() );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    cas.SetConfType( atoi( chunk.c_str() ) );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-
-    int size = atoi( chunk.c_str() );
-    std::vector<double> boite;
-    boite.resize( size );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      boite[i] = strtod( chunk.c_str(), 0 );
-    }
-    cas.SetBoundingBox( boite );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-
-    size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      cas.AddIteration( chunk.c_str() );
-    }
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ )
-    {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      cas.AddGroup( chunk.c_str() );
-    }
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      i++;
-      chunkNext = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      cas.AddBoundaryGroup( chunk.c_str(), chunkNext.c_str() );
-    }
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    //cas.SetPyram( atoi( chunk.c_str() ) );
-
-    return true;
-  }
-//
-// ==============
-// 2.2. Iteration
-// ==============
-  /*!
-    \brief Restore iteration from the string
-    \param iteration iteration being restored
-    \param stream string representation of the iteration
-    \return \c true if iteration is correctly restored or \c false otherwise
-  */
-  bool Restore( HOMARD_Iteration& iteration, const std::string& stream )
-  {
-    std::string::size_type start = 0;
-    std::string chunk;
-    bool ok;
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-
-    iteration.SetName( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetState( atoi( chunk.c_str() ) );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetNumber( atoi( chunk.c_str() ) );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetMeshFile( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetLogFile( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetMeshName( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetFieldFile( chunk.c_str() );
-    // .
-    int timestep, rank;
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    timestep = atoi( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    rank = atoi( chunk.c_str() );
-    iteration.SetTimeStepRank( timestep, rank );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetIterParentName( chunk.c_str() );
-    //
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    int size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      iteration.LinkNextIteration( chunk.c_str() );
-    }
-    //
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetHypoName( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetCaseName( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    iteration.SetDirNameLoc( chunk.c_str() );
-    return true;
-  }
-
-//
-// ==============
-// 2.3. hypothese
-// ==============
-  /*!
-    \brief Restore hypothesis from the string
-    \param hypothesis hypothesis being restored
-    \param stream string representation of the hypothesis
-    \return \c true if hypothesis is correctly restored or \c false otherwise
-  */
-  bool Restore( HOMARD_Hypothesis& hypothesis, const std::string& stream )
-  {
-    std::string::size_type start = 0;
-    std::string chunk, chunkNext;
-    bool ok;
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetName( chunk.c_str() );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetCaseCreation( chunk.c_str() );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetAdapType( atoi( chunk.c_str() ) );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    int typeraff = atoi( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    int typedera = atoi( chunk.c_str() );
-    hypothesis.SetRefinTypeDera( typeraff, typedera );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetField( chunk.c_str() );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    int typethr = atoi( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    double threshr = strtod( chunk.c_str(), 0 );
-    hypothesis.SetRefinThr( typethr, threshr );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    int typethc = atoi( chunk.c_str() );
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    double threshc = strtod( chunk.c_str(), 0 );
-    hypothesis.SetUnRefThr( typethc, threshc );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetUseField(atoi(chunk.c_str()));
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetUseComp(atoi(chunk.c_str()));
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetTypeFieldInterp(atoi(chunk.c_str()));
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    int size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      hypothesis.LinkIteration( chunk.c_str() );
-    }
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      i++;
-      chunkNext = getNextChunk( stream, start, ok );
-      int typeuse = atoi( chunkNext.c_str() );
-      if ( !ok ) return false;
-      hypothesis.AddZone( chunk.c_str(), typeuse );
-    }
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      hypothesis.AddComp( chunk.c_str() );
-    }
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      hypothesis.AddGroup( chunk.c_str() );
-    }
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      i++;
-      chunkNext = getNextChunk( stream, start, ok );
-      int TypeInterp = atoi( chunkNext.c_str() );
-      if ( !ok ) return false;
-      hypothesis.AddFieldInterpType( chunk.c_str(), TypeInterp );
-    }
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetNivMax( atoi( chunk.c_str() ) );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetDiamMin( strtod( chunk.c_str(), 0 ) );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetAdapInit( strtod( chunk.c_str(), 0 ) );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    hypothesis.SetExtraOutput( strtod( chunk.c_str(), 0 ) );
-
-    return true;
-  }
-
-//
-// =================================
-// 2.5. Restauration d'une frontiere
-// =================================
-
-  /*!
-    \brief Restore boundary from the string
-    \param boundary boundary being restored
-    \param stream string representation of the boundary
-    \return \c true if the boundary is correctly restored or \c false otherwise
-  */
-  bool Restore( HOMARD_Boundary& boundary, const std::string& stream )
-  {
-    std::string::size_type start = 0;
-    std::string chunk;
-    bool ok;
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    boundary.SetName( chunk.c_str() );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    int BoundaryType = atoi( chunk.c_str() ) ;
-    boundary.SetType( BoundaryType );
-
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    boundary.SetCaseCreation( chunk.c_str() );
-
-    // Si analytique, les coordonnees des frontieres : le nombre depend du type
-    // Si discret, le maillage
-    // Si CAO, la géométrie
-    int lgcoords ;
-    if ( BoundaryType == -1 ) { lgcoords = -1 ; }
-    else if ( BoundaryType == 1 ) { lgcoords = 7 ; }
-    else if ( BoundaryType == 2 ) { lgcoords = 4 ; }
-    else { lgcoords = 0 ; }
-//
-    if ( lgcoords == -1 )
-    {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      boundary.SetDataFile( chunk.c_str() );
-    }
-    else if ( lgcoords == 0 )
-    {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      boundary.SetMeshName( chunk.c_str() );
-
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      boundary.SetDataFile( chunk.c_str() );
-    }
-    else
-    { std::vector<double> coords;
-      coords.resize( lgcoords );
-      for ( int i = 0; i < lgcoords; i++ ) {
-        chunk = getNextChunk( stream, start, ok );
-        if ( !ok ) return false;
-        coords[i] = strtod( chunk.c_str(), 0 );
-      }
-      if ( BoundaryType == 1 )
-      { boundary.SetCylinder(coords[0],coords[1],coords[2],coords[3],coords[4],coords[5],coords[6]); }
-      else if ( BoundaryType == 2 )
-      { boundary.SetSphere( coords[0], coords[1], coords[2], coords[3]); }
-      else if ( BoundaryType == 3 )
-      { boundary.SetConeA( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6]); }
-      else if ( BoundaryType == 4 )
-      { boundary.SetConeR( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7]); }
-      // Remarque : la taille de coords est suffisante pour les limites
-      for ( int i = 0; i < 3; i++ ) {
-        chunk = getNextChunk( stream, start, ok );
-        if ( !ok ) return false;
-        coords[i] = strtod( chunk.c_str(), 0 );
-      }
-      boundary.SetLimit( coords[0], coords[1], coords[2]);
-    }
-    // Les groupes
-    chunk = getNextChunk( stream, start, ok );
-    if ( !ok ) return false;
-    int size = atoi( chunk.c_str() );
-    for ( int i = 0; i < size; i++ ) {
-      chunk = getNextChunk( stream, start, ok );
-      if ( !ok ) return false;
-      boundary.AddGroup( chunk.c_str() );
-    }
-
-    return true;
-  }
-
 //=============================================================================
 /*!
  *  default constructor:
@@ -846,10 +211,9 @@ void HOMARD_Boundary::SetTorus( double X0, double X1, double X2,
 std::vector<double> HOMARD_Boundary::GetCoords() const
 {
   std::vector<double> mesCoor;
-//
   switch (_Type)
   {
-//  Cylindre
+    //  Cylindre
     case 1:
     {
       mesCoor.push_back( _Xcentre );
@@ -861,7 +225,7 @@ std::vector<double> HOMARD_Boundary::GetCoords() const
       mesCoor.push_back( _rayon );
       break ;
     }
-//  Sphere
+    //  Sphere
     case 2:
     {
       mesCoor.push_back( _Xcentre );
@@ -870,7 +234,7 @@ std::vector<double> HOMARD_Boundary::GetCoords() const
       mesCoor.push_back( _rayon );
       break ;
     }
-//  Cone defini par un axe et un angle
+    //  Cone defini par un axe et un angle
     case 3:
     {
       mesCoor.push_back( _Xaxe );
@@ -882,7 +246,7 @@ std::vector<double> HOMARD_Boundary::GetCoords() const
       mesCoor.push_back( _Zcentre );
       break ;
     }
-//  Cone defini par les 2 rayons
+    //  Cone defini par les 2 rayons
     case 4:
     {
       mesCoor.push_back( _Xcentre1 );
@@ -895,7 +259,7 @@ std::vector<double> HOMARD_Boundary::GetCoords() const
       mesCoor.push_back( _Rayon2 );
       break ;
     }
-//  Tore
+    //  Tore
     case 5:
     {
       mesCoor.push_back( _Xcentre );
@@ -908,7 +272,8 @@ std::vector<double> HOMARD_Boundary::GetCoords() const
       mesCoor.push_back( _Rayon2 );
       break ;
     }
-    VERIFICATION( (_Type>=1) && (_Type<=5) ) ;
+    default:
+      break ;
   }
   return mesCoor;
 }
@@ -1015,18 +380,14 @@ std::string HOMARD_Cas::GetDumpPython() const
 //=============================================================================
 int HOMARD_Cas::SetDirName( const char* NomDir )
 {
-//   MESSAGE("SetDirName,  NomDir : "<<NomDir);
-//   MESSAGE("SetDirName, _NomDir : "<<_NomDir);
   int erreur = 0 ;
   // On vérifie qu'aucun calcul n'a eu lieu pour ce cas
-//   MESSAGE("SetDirName, _ListIter.size() : "<<_ListIter.size());
   if ( _ListIter.size() > 1 ) { erreur = 1 ; }
   // Creation
-  if ( CHDIR(NomDir) == 0 )
-  { _NomDir = std::string( NomDir ); }
-  else
-  {
-
+  if ( CHDIR(NomDir) == 0 ) {
+    _NomDir = std::string( NomDir );
+  }
+  else {
 #ifndef WIN32
     if ( mkdir(NomDir, S_IRWXU|S_IRGRP|S_IXGRP) == 0 )
 #else
@@ -1037,26 +398,20 @@ int HOMARD_Cas::SetDirName( const char* NomDir )
       else                      { erreur = 2 ; }
     }
     else { erreur = 2 ; }
-  };
-  return erreur ;
+  }
+  return erreur;
 }
 //=============================================================================
 std::string HOMARD_Cas::GetDirName() const
 {
   return _NomDir;
 }
-//=============================================================================
-int HOMARD_Cas::GetNumberofIter()
-{
-  return _ListIter.size();
-}
 //
 // Le type de conformite ou non conformite
 //
 //=============================================================================
 void HOMARD_Cas::SetConfType( int Conftype )
 {
-//   VERIFICATION( (Conftype>=-2) && (Conftype<=3) );
   _ConfType = Conftype;
 }
 //=============================================================================
@@ -1141,26 +496,10 @@ void HOMARD_Cas::SupprBoundaryGroup()
 // Liens avec les autres structures
 //=============================================================================
 //=============================================================================
-std::string HOMARD_Cas::GetIter0Name() const
-{
-// Par construction de la liste, l'iteration a ete mise en tete.
-  return (*(_ListIter.begin()));
-}
-//=============================================================================
 void HOMARD_Cas::AddIteration( const char* NomIteration )
 {
   _ListIter.push_back( std::string( NomIteration ) );
 }
-//=============================================================================
-const std::list<std::string>& HOMARD_Cas::GetIterations() const
-{
-  return _ListIter;
-}
-//=============================================================================
-void HOMARD_Cas::SupprIterations()
-{
-  _ListIter.clear();
-}
 
 //=============================================================================
 //=============================================================================
@@ -1285,14 +624,13 @@ void HomardDriver::TexteMaillageHOMARD( const std::string Dir, const std::string
 //===============================================================================
 // C. Le pilotage de l'adaptation
 //===============================================================================
-void HomardDriver::TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff, int TypeDera )
+void HomardDriver::TexteConfRaffDera( int ConfType )
 {
-  MESSAGE("TexteConfRaffDera, ConfType ="<<ConfType);
-  MESSAGE("TexteConfRaffDera, TypeAdap ="<<TypeAdap<<", TypeRaff ="<<TypeRaff<<", TypeDera ="<<TypeDera);
-//
-// Type de conformite
-//
-  std::string saux ;
+  MESSAGE("TexteConfRaffDera, ConfType = " << ConfType);
+  //
+  // Type de conformite
+  //
+  std::string saux;
   switch (ConfType)
   {
     case -2: //
@@ -1327,533 +665,114 @@ void HomardDriver::TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff,
     }
   }
   _Texte += "# Type de conformite\nTypeConf " + saux + "\n" ;
+  //
+  // Type de raffinement/deraffinement
+  //
+  saux = "TypeRaff uniforme\n" ;
+  saux += "TypeDera non" ;
+  _Texte += "# Type de raffinement/deraffinement\n" + saux + "\n" ;
+}
+//===============================================================================
+// D. Les frontieres
+//===============================================================================
+void HomardDriver::TexteBoundaryOption( int BoundaryOption )
+{
+  MESSAGE("TexteBoundaryOption, BoundaryOption = "<<BoundaryOption);
 //
-// Type de raffinement/deraffinement
+// Type de suivi de frontiere
 //
-  if ( TypeAdap == -1 )
-  {
-    if ( TypeRaff == 1 )
-    {
-      saux = "TypeRaff uniforme\n" ;
-    }
-    else
-    {
-      saux = "TypeRaff non\n" ;
-    }
-    if ( TypeDera == 1 )
-    {
-      saux += "TypeDera uniforme" ;
-    }
-    else
-    {
-      saux += "TypeDera non" ;
-    }
-  }
-  else
-  {
-    if ( TypeRaff == 1 )
-    {
-      saux = "TypeRaff libre\n" ;
-    }
-    else
-    {
-      saux = "TypeRaff non\n" ;
-    }
-    if ( TypeDera == 1 )
-    {
-      saux += "TypeDera libre" ;
-    }
-    else
-    {
-      saux += "TypeDera non" ;
-    }
-  }
-  _Texte += "# Type de raffinement/deraffinement\n" + saux + "\n" ;
+  std::stringstream saux1 ;
+  saux1 << BoundaryOption ;
+  std::string saux = saux1.str() ;
+  _Texte += "SuivFron " + saux + "\n" ;
+//
+}//===============================================================================
+void HomardDriver::TexteBoundaryCAOGr(  const std::string GroupName )
+{
+  MESSAGE("TexteBoundaryCAOGr, GroupName  = "<<GroupName);
+//
+  _Texte += "GrFroCAO \"" + GroupName + "\"\n" ;
 //
-//   MESSAGE("A la fin de HomardDriver::TexteConfRaffDera, _Texte ="<<_Texte);
 }
+
 //===============================================================================
-void HomardDriver::TexteCompo( int NumeComp, const std::string NomCompo)
+void HomardDriver::TexteBoundaryDi(  const std::string MeshName, const std::string MeshFile )
 {
-  MESSAGE("TexteCompo, NumeComp = "<<NumeComp<<", NomCompo = "<<NomCompo);
-  _Texte +="CCCoChaI \"" + NomCompo + "\"\n" ;
+  MESSAGE("TexteBoundaryDi, MeshName  = "<<MeshName);
+  MESSAGE("TexteBoundaryDi, MeshFile  = "<<MeshFile);
+//
+  _Texte += "#\n# Frontiere discrete\n" ;
+  _Texte += "CCNoMFro \"" + MeshName + "\"\n" ;
+  _Texte += "CCFronti \"" + MeshFile + "\"\n" ;
+//
 }
 //===============================================================================
-void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8 )
+void HomardDriver::TexteBoundaryDiGr(  const std::string GroupName )
 {
-  MESSAGE("TexteZone, NumeZone = "<<NumeZone<<", ZoneType = "<<ZoneType<<", TypeUse = "<<TypeUse);
-  MESSAGE("TexteZone, coor = "<< x0<<","<<x1<< ","<< x2<< ","<< x3<<","<<x4<<","<<x5<<","<<x6<<","<<x7<<","<<x8);
+  MESSAGE("TexteBoundaryDiGr, GroupName  = "<<GroupName);
 //
-  std::string saux, saux2 ;
+  _Texte += "CCGroFro \"" + GroupName + "\"\n" ;
 //
-// Type de zones
-// On convertit le type de zone au sens du module HOMARD dans Salome, ZoneType, dans le
-// type au sens de l'executable HOMARD, ZoneTypeHOMARD
-// Attention a mettre le bon signe a ZoneTypeHOMARD :
-//    >0 signifie que l'on raffinera les mailles contenues dans la zone,
-//    <0 signifie que l'on deraffinera
+}
+//===============================================================================
+void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7 )
+{
+  MESSAGE("TexteBoundaryAn, NameBoundary = "<<NameBoundary);
+//   MESSAGE("TexteBoundaryAn, NumeBoundary = "<<NumeBoundary);
+  MESSAGE("TexteBoundaryAn, BoundaryType = "<<BoundaryType);
+//   MESSAGE("TexteBoundaryAn, coor         = "<< x0<<","<<x1<< ","<< x2<< ","<< x3<<","<<x4<<","<<x5<<","<<x6","<<x7);
 //
-  int ZoneTypeHOMARD ;
-  if ( ZoneType >= 11 && ZoneType <= 13 ) { ZoneTypeHOMARD = 1 ; }
-  else if ( ZoneType >= 31 && ZoneType <= 33 ) { ZoneTypeHOMARD = 3 ; }
-  else if ( ZoneType >= 61 && ZoneType <= 63 ) { ZoneTypeHOMARD = 6 ; }
-  else { ZoneTypeHOMARD = ZoneType ; }
+  std::string saux, saux2 ;
 //
-  if ( TypeUse < 0 ) { ZoneTypeHOMARD = -ZoneTypeHOMARD ; }
+// Commentaires
 //
   std::stringstream saux1 ;
-  saux1 << NumeZone ;
-  saux = "#\n# Zone numero " + saux1.str() + "\n" ;
+  saux1 << NumeBoundary ;
+  saux2 = saux1.str() ;
+  saux = "#\n# Frontiere numero " + saux2 + "\n" ;
+  if ( BoundaryType == 1 )
+  { saux += "# Cylindre\n" ; }
+  if ( BoundaryType == 2 )
+  { saux += "# Sphere\n" ; }
+  if ( BoundaryType == 3 || BoundaryType == 4 )
+  { saux += "# Cone\n" ; }
+  if ( BoundaryType == 5 )
+  { saux += "# Tore\n" ; }
+//
+// Le nom de la frontiere
+//
+  { std::stringstream saux1 ;
+    saux1 << NumeBoundary ;
+    saux += "FANom " + saux1.str() + " \"" + NameBoundary + "\"\n" ;
+  }
+//
+// Type de frontiere
 //
   { std::stringstream saux1 ;
-    saux1 << NumeZone << " " << ZoneTypeHOMARD ;
-    saux += "ZoRaType " + saux1.str() + "\n" ;
+    saux1 << NumeBoundary << " " << BoundaryType ;
+    saux += "FAType " + saux1.str() + "\n" ;
   }
 //
-// Cas du rectangle
+// Cas du cylindre
 //
-  if ( ZoneType == 11 ) // Z est constant X Homard <=> X Salome
-//                                        Y Homard <=> Y Salome
+  if ( BoundaryType == 1 )
   {
-    saux += "#Rectangle\n" ;
     { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x0 ;
-      saux += "ZoRaXmin " + saux1.str() + "\n" ;
+      saux1 << NumeBoundary << " " << x0 ;
+      saux2 = saux1.str() ;
+      saux += "FAXCen " + saux1.str() + "\n" ;
     }
     { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x1 ;
-      saux += "ZoRaXmax " + saux1.str() + "\n" ;
+      saux1 << NumeBoundary << " " << x1 ;
+      saux += "FAYCen " + saux1.str() + "\n" ;
     }
     { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x2 ;
-      saux += "ZoRaYmin " + saux1.str() + "\n" ;
+      saux1 << NumeBoundary << " " << x2 ;
+      saux += "FAZCen " + saux1.str() + "\n" ;
     }
     { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x3 ;
-      saux += "ZoRaYmax " + saux1.str() + "\n" ;
-    }
-  }
-//
-  else if ( ZoneType == 12 ) // X est constant X Homard <=> Y Salome
-//                                             Y Homard <=> Z Salome
-  {
-    saux += "#Rectangle\n" ;
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x2 ;
-      saux += "ZoRaXmin " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x3 ;
-      saux += "ZoRaXmax " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x4 ;
-      saux += "ZoRaYmin " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x5 ;
-      saux += "ZoRaYmax " + saux1.str() + "\n" ;
-    }
-  }
-//
-  else if ( ZoneType == 13 ) // Y est constant X Homard <=> X Salome
-//                                             Y Homard <=> Z Salome
-  {
-    saux += "#Rectangle\n" ;
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x0 ;
-      saux += "ZoRaXmin " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x1 ;
-      saux += "ZoRaXmax " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x4 ;
-      saux += "ZoRaYmin " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x5 ;
-      saux += "ZoRaYmax " + saux1.str() + "\n" ;
-    }
-  }
-//
-// Cas du parallelepipede
-//
-  else if ( ZoneType == 2 )
-  {
-    saux += "# Boite\n" ;
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x0 ;
-      saux += "ZoRaXmin " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x1 ;
-      saux += "ZoRaXmax " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x2 ;
-      saux += "ZoRaYmin " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x3 ;
-      saux += "ZoRaYmax " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x4 ;
-      saux += "ZoRaZmin " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x5 ;
-      saux += "ZoRaZmax " + saux1.str() + "\n" ;
-    }
-  }
-//
-// Cas du disque
-//
-  else if ( ZoneType == 31 || ZoneType == 61 )
-  {
-    saux += "# Sphere\n" ;
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x0 ;
-      saux += "ZoRaXCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x1 ;
-      saux += "ZoRaYCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x6 ;
-      saux2 = saux1.str() ;
-      if ( ZoneType == 61 ) { saux += "ZoRaRayE " + saux2 + "\n" ; }
-      else                  { saux += "ZoRaRayo " + saux2 + "\n" ; }
-    }
-    if ( ZoneType == 61 )
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x8 ;
-      saux += "ZoRaRayI " + saux1.str() + "\n" ;
-    }
-  }
-  else if ( ZoneType == 32 || ZoneType == 62 )
-  {
-    saux += "# Sphere\n" ;
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x1 ;
-      saux += "ZoRaXCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x2 ;
-      saux += "ZoRaYCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x6 ;
-      saux2 = saux1.str() ;
-      if ( ZoneType == 62 ) { saux += "ZoRaRayE " + saux2 + "\n" ; }
-      else                  { saux += "ZoRaRayo " + saux2 + "\n" ; }
-    }
-    if ( ZoneType == 62 )
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x8 ;
-      saux += "ZoRaRayI " + saux1.str() + "\n" ;
-    }
-  }
-  else if ( ZoneType == 33 || ZoneType == 63 )
-  {
-    saux += "# Sphere\n" ;
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x0 ;
-      saux += "ZoRaXCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x2 ;
-      saux += "ZoRaYCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x6 ;
-      saux2 = saux1.str() ;
-      if ( ZoneType == 63 ) { saux += "ZoRaRayE " + saux2 + "\n" ; }
-      else                  { saux += "ZoRaRayo " + saux2 + "\n" ; }
-    }
-    if ( ZoneType == 63 )
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x8 ;
-      saux += "ZoRaRayI " + saux1.str() + "\n" ;
-    }
-  }
-//
-// Cas de la sphere
-//
-  else if ( ZoneType == 4 )
-  {
-    saux += "# Sphere\n" ;
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x0 ;
-      saux += "ZoRaXCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x1 ;
-      saux += "ZoRaYCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x2 ;
-      saux += "ZoRaZCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x3 ;
-      saux += "ZoRaRayo " + saux1.str() + "\n" ;
-    }
-  }
-//
-// Cas du cylindre ou du tuyau
-//
-  else if ( ZoneType == 5 || ZoneType == 7 )
-  {
-    if ( ZoneType == 5 ) { saux += "# Cylindre\n" ; }
-    else                 { saux += "# Tuyau\n" ; }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x0 ;
-      saux += "ZoRaXBas " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x1 ;
-      saux += "ZoRaYBas " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x2 ;
-      saux += "ZoRaZBas " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x3 ;
-      saux += "ZoRaXAxe " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x4 ;
-      saux += "ZoRaYAxe " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x5 ;
-      saux += "ZoRaZAxe " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x6 ;
-      saux2 = saux1.str() ;
-     if ( ZoneType == 5 ) { saux += "ZoRaRayo " + saux2 + "\n" ; }
-     else                 { saux += "ZoRaRayE " + saux2 + "\n" ; }
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x7 ;
-      saux += "ZoRaHaut " + saux1.str() + "\n" ;
-    }
-    if ( ZoneType == 7 )
-    { std::stringstream saux1 ;
-      saux1 << NumeZone << " " << x8 ;
-      saux += "ZoRaRayI " + saux1.str() + "\n" ;
-    }
-  }
-//
-  _Texte += saux + "#\n" ;
-//
-//   MESSAGE("A la fin de HomardDriver::TexteZone, _Texte ="<<_Texte);
-}
-//===============================================================================
-void HomardDriver::TexteField( const std::string FieldName, const std::string FieldFile, int TimeStep, int Rank,
-               int TypeThR, double ThreshR, int TypeThC, double ThreshC,
-               int UsField, int UsCmpI )
-{
-  MESSAGE("TexteField, FieldName = "<<FieldName<<", FieldFile = "<<FieldFile);
-  MESSAGE("TexteField, TimeStep = "<<TimeStep<<", Rank = "<<Rank);
-
-  std::string saux, saux2 ;
-//
-//
-  _Texte += "# Champ d'indicateurs\n" ;
-  _Texte += "CCIndica \"" + FieldFile  + "\"\n" ;
-  _Texte += "CCNoChaI \"" + FieldName  + "\"\n" ;
-
-// Cas ou on prend le dernier pas de temps
-  if ( TimeStep == -2 )
-  { _Texte += "CCNumPTI Last\n" ; }
-// Cas avec pas de temps
-  else if ( TimeStep >= 0 )
-  {
-    {
-      std::stringstream saux1 ;
-      saux1 << TimeStep ;
-      saux2 = saux1.str() ;
-      _Texte += "CCNumPTI " + saux2  + "\n" ;
-    }
-    if ( Rank >= 0 )
-    {
-      std::stringstream saux1 ;
-      saux1 << Rank ;
-      saux2 = saux1.str() ;
-      _Texte += "CCNumOrI " + saux2  + "\n" ;
-    }
-  }
-//
-  saux = " " ;
-  if ( TypeThR == 1 )
-  { saux = "Hau" ; }
-  if ( TypeThR == 2 )
-  { saux = "HRe" ; }
-  if ( TypeThR == 3 )
-  { saux = "HPE" ; }
-  if ( TypeThR == 4 )
-  { saux = "HMS" ; }
-  if ( saux != " " )
-  {
-    std::stringstream saux1 ;
-    saux1 << ThreshR ;
-    _Texte += "Seuil" + saux + " " + saux1.str()  + "\n" ;
-  }
-//
-  saux = " " ;
-  if ( TypeThC == 1 )
-  { saux = "Bas" ; }
-  if ( TypeThC == 2 )
-  { saux = "BRe" ; }
-  if ( TypeThC == 3 )
-  { saux = "BPE" ; }
-  if ( TypeThC == 4 )
-  { saux = "BMS" ; }
-  if ( saux != " " )
-  {
-    std::stringstream saux1 ;
-    saux1 << ThreshC ;
-    _Texte += "Seuil" + saux + " " + saux1.str()  + "\n" ;
-  }
-//
-  saux = " " ;
-  if ( UsField == 0 )
-  { saux = "MAILLE" ; }
-  if ( UsField == 1 )
-  { saux = "SAUT" ; }
-  if ( saux != " " )
-  {
-    _Texte += "CCModeFI " + saux  + "\n" ;
-  }
-//
-  saux = " " ;
-  if ( UsCmpI == 0 )
-  { saux = "L2" ; }
-  if ( UsCmpI == 1 )
-  { saux = "INFINI" ; }
-  if ( UsCmpI == 2 )
-  { saux = "RELATIF" ; }
-  if ( saux != " " )
-  {
-    _Texte += "CCUsCmpI " + saux  + "\n" ;
-  }
-}
-//===============================================================================
-void HomardDriver::TexteGroup( const std::string GroupName )
-{
-  MESSAGE("TexteGroup, GroupName = "<<GroupName);
-//
-  _Texte += "CCGroAda \"" + GroupName  + "\"\n" ;
-//
-}
-//===============================================================================
-// D. Les frontieres
-//===============================================================================
-void HomardDriver::TexteBoundaryOption( int BoundaryOption )
-{
-  MESSAGE("TexteBoundaryOption, BoundaryOption = "<<BoundaryOption);
-//
-// Type de suivi de frontiere
-//
-  std::stringstream saux1 ;
-  saux1 << BoundaryOption ;
-  std::string saux = saux1.str() ;
-  _Texte += "SuivFron " + saux + "\n" ;
-//
-}//===============================================================================
-void HomardDriver::TexteBoundaryCAOGr(  const std::string GroupName )
-{
-  MESSAGE("TexteBoundaryCAOGr, GroupName  = "<<GroupName);
-//
-  _Texte += "GrFroCAO \"" + GroupName + "\"\n" ;
-//
-}
-
-//===============================================================================
-void HomardDriver::TexteBoundaryDi(  const std::string MeshName, const std::string MeshFile )
-{
-  MESSAGE("TexteBoundaryDi, MeshName  = "<<MeshName);
-  MESSAGE("TexteBoundaryDi, MeshFile  = "<<MeshFile);
-//
-  _Texte += "#\n# Frontiere discrete\n" ;
-  _Texte += "CCNoMFro \"" + MeshName + "\"\n" ;
-  _Texte += "CCFronti \"" + MeshFile + "\"\n" ;
-//
-}
-//===============================================================================
-void HomardDriver::TexteBoundaryDiGr(  const std::string GroupName )
-{
-  MESSAGE("TexteBoundaryDiGr, GroupName  = "<<GroupName);
-//
-  _Texte += "CCGroFro \"" + GroupName + "\"\n" ;
-//
-}
-//===============================================================================
-void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7 )
-{
-  MESSAGE("TexteBoundaryAn, NameBoundary = "<<NameBoundary);
-//   MESSAGE("TexteBoundaryAn, NumeBoundary = "<<NumeBoundary);
-  MESSAGE("TexteBoundaryAn, BoundaryType = "<<BoundaryType);
-//   MESSAGE("TexteBoundaryAn, coor         = "<< x0<<","<<x1<< ","<< x2<< ","<< x3<<","<<x4<<","<<x5<<","<<x6","<<x7);
-//
-  std::string saux, saux2 ;
-//
-// Commentaires
-//
-  std::stringstream saux1 ;
-  saux1 << NumeBoundary ;
-  saux2 = saux1.str() ;
-  saux = "#\n# Frontiere numero " + saux2 + "\n" ;
-  if ( BoundaryType == 1 )
-  { saux += "# Cylindre\n" ; }
-  if ( BoundaryType == 2 )
-  { saux += "# Sphere\n" ; }
-  if ( BoundaryType == 3 || BoundaryType == 4 )
-  { saux += "# Cone\n" ; }
-  if ( BoundaryType == 5 )
-  { saux += "# Tore\n" ; }
-//
-// Le nom de la frontiere
-//
-  { std::stringstream saux1 ;
-    saux1 << NumeBoundary ;
-    saux += "FANom " + saux1.str() + " \"" + NameBoundary + "\"\n" ;
-  }
-//
-// Type de frontiere
-//
-  { std::stringstream saux1 ;
-    saux1 << NumeBoundary << " " << BoundaryType ;
-    saux += "FAType " + saux1.str() + "\n" ;
-  }
-//
-// Cas du cylindre
-//
-  if ( BoundaryType == 1 )
-  {
-    { std::stringstream saux1 ;
-      saux1 << NumeBoundary << " " << x0 ;
-      saux2 = saux1.str() ;
-      saux += "FAXCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeBoundary << " " << x1 ;
-      saux += "FAYCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeBoundary << " " << x2 ;
-      saux += "FAZCen " + saux1.str() + "\n" ;
-    }
-    { std::stringstream saux1 ;
-      saux1 << NumeBoundary << " " << x3 ;
-      saux += "FAXAxe " + saux1.str() + "\n" ;
+      saux1 << NumeBoundary << " " << x3 ;
+      saux += "FAXAxe " + saux1.str() + "\n" ;
     }
     { std::stringstream saux1 ;
       saux1 << NumeBoundary << " " << x4 ;
@@ -2027,79 +946,12 @@ void HomardDriver::TexteBoundaryAnGr( const std::string NameBoundary, int NumeBo
 //
 }
 //===============================================================================
-// E. Les interpolations
+// F. Les options avancees
 //===============================================================================
-// Les fichiers d'entree et de sortie des champs a interpoler
-void HomardDriver::TexteFieldInterp( const std::string FieldFile, const std::string MeshFile )
+void HomardDriver::TexteAdvanced( int NivMax, double DiamMin, int AdapInit, int ExtraOutput )
 {
-  MESSAGE("TexteFieldInterp, FieldFile = "<<FieldFile<<", MeshFile = "<<MeshFile);
-//
-  _Texte += "#\n# Interpolations des champs\n" ;
-//
-// Fichier en entree
-  _Texte += "CCSolN__ \"" + FieldFile + "\"\n" ;
-// Fichier en sortie
-  _Texte += "CCSolNP1 \"" + MeshFile  + "\"\n" ;
-//
-//  std::cerr << "A la fin de TexteFieldInterp _Texte ="<<_Texte << std::endl;
-}
-//===============================================================================
-// Tous les champs sont a interpoler
-void HomardDriver::TexteFieldInterpAll( )
-{
-  MESSAGE("TexteFieldInterpAll");
-//
-  _Texte += "CCChaTou oui\n" ;
-}
-//===============================================================================
-// Ecrit les caracteristiques de chaque interpolation sous la forme :
-//   CCChaNom 1 "DEPL"     ! Nom du 1er champ a interpoler
-//   CCChaTIn 1 0          ! Mode d'interpolation : automatique
-//   CCChaNom 2 "VOLUME"   ! Nom du 2nd champ a interpoler
-//   CCChaTIn 2 1          ! Mode d'interpolation : une variable extensive
-//   CCChaPdT 2 14         ! Pas de temps 14
-//   CCChaNuO 2 14         ! Numero d'ordre 14
-//   etc.
-//
-// NumeChamp : numero d'ordre du champ a interpoler
-// FieldName : nom du champ
-// TypeInterp : type d'interpolation
-// TimeStep : pas de temps retenu (>0 si pas de precision)
-// Rank : numero d'ordre retenu
-//
-void HomardDriver::TexteFieldInterpNameType( int NumeChamp, const std::string FieldName, const std::string TypeInterp, int TimeStep, int Rank)
-{
-  MESSAGE("TexteFieldInterpNameType, NumeChamp = "<<NumeChamp<<", FieldName = "<<FieldName<<", TypeInterp = "<<TypeInterp);
-  MESSAGE("TexteFieldInterpNameType, TimeStep = "<<TimeStep<<", Rank = "<<Rank);
-// Numero d'ordre du champ a interpoler
-  std::stringstream saux1 ;
-  saux1 << NumeChamp ;
-  std::string saux = saux1.str() ;
-// Nom du champ
-  _Texte +="CCChaNom " + saux + " \"" + FieldName + "\"\n" ;
-// Type d'interpolation pour le champ
-  _Texte +="CCChaTIn " + saux + " " + TypeInterp + "\n" ;
-//
-  if ( TimeStep >= 0 )
-  {
-    {
-      std::stringstream saux1 ;
-      saux1 << TimeStep ;
-      _Texte += "CCChaPdT " + saux + " " + saux1.str()  + "\n" ;
-    }
-    {
-      std::stringstream saux1 ;
-      saux1 << Rank ;
-      _Texte += "CCChaNuO " + saux + " " + saux1.str()  + "\n" ;
-    }
-  }
-}
-//===============================================================================
-// F. Les options avancees
-//===============================================================================
-void HomardDriver::TexteAdvanced( int NivMax, double DiamMin, int AdapInit, int ExtraOutput )
-{
-  MESSAGE("TexteAdvanced, NivMax ="<<NivMax<<", DiamMin ="<<DiamMin<<", AdapInit ="<<AdapInit<<", ExtraOutput ="<<ExtraOutput);
+  MESSAGE("TexteAdvanced, NivMax ="<<NivMax<<", DiamMin ="<<DiamMin<<
+          ", AdapInit ="<<AdapInit<<", ExtraOutput ="<<ExtraOutput);
 
   if ( NivMax > 0 )
   {
@@ -2242,423 +1094,21 @@ HOMARD_Gen::~HOMARD_Gen()
 }
 //=============================================================================
 
-//=============================================================================
-/*!
- *  default constructor:
- */
-//=============================================================================
-HOMARD_Hypothesis::HOMARD_Hypothesis():
-  _Name(""), _NomCasCreation(""),
-  _TypeAdap(-1), _TypeRaff(0), _TypeDera(0),
-  _Field(""),
-  _TypeThR(0), _TypeThC(0),
-  _ThreshR(0), _ThreshC(0),
-  _UsField(0), _UsCmpI(0), _TypeFieldInterp(0),
-
-  _NivMax(-1), _DiamMin(-1.0), _AdapInit(0), _ExtraOutput(1)
-{
-  MESSAGE("HOMARD_Hypothesis");
-}
-
-//=============================================================================
-/*!
- */
-//=============================================================================
-HOMARD_Hypothesis::~HOMARD_Hypothesis()
-{
-  MESSAGE("~HOMARD_Hypothesis");
-}
-//=============================================================================
-//=============================================================================
-// Generalites
-//=============================================================================
-//=============================================================================
-void HOMARD_Hypothesis::SetName( const char* Name )
-{
-  _Name = std::string( Name );
-}
-//=============================================================================
-std::string HOMARD_Hypothesis::GetName() const
-{
-  return _Name;
-}
-//=============================================================================
-//=============================================================================
-// Caracteristiques
-//=============================================================================
-//=============================================================================
-void HOMARD_Hypothesis::SetAdapType( int TypeAdap )
-{
-  VERIFICATION( (TypeAdap>=-1) && (TypeAdap<=1) );
-  _TypeAdap = TypeAdap;
-}
-//=============================================================================
-int HOMARD_Hypothesis::GetAdapType() const
-{
-  return _TypeAdap;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetRefinTypeDera( int TypeRaff, int TypeDera )
-{
-  VERIFICATION( (TypeRaff>=-1) && (TypeRaff<=1) );
-  _TypeRaff = TypeRaff;
-  VERIFICATION( (TypeDera>=-1) && (TypeDera<=1) );
-  _TypeDera = TypeDera;
-}
-//=============================================================================
-int HOMARD_Hypothesis::GetRefinType() const
-{
-  return _TypeRaff;
-}
-//=============================================================================
-int HOMARD_Hypothesis::GetUnRefType() const
-{
-  return _TypeDera;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetField( const char* FieldName )
-{
-  _Field = std::string( FieldName );
-  MESSAGE( "SetField : FieldName = " << FieldName );
-}
-//=============================================================================
-std::string HOMARD_Hypothesis::GetFieldName() const
-{
-  return _Field;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetUseField( int UsField )
-{
-  VERIFICATION( (UsField>=0) && (UsField<=1) );
-  _UsField = UsField;
-}
-//=============================================================================
-int HOMARD_Hypothesis::GetUseField() const
-{
-  return _UsField;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetUseComp( int UsCmpI )
-{
-  MESSAGE ("SetUseComp pour UsCmpI = "<<UsCmpI) ;
-  VERIFICATION( (UsCmpI>=0) && (UsCmpI<=2) );
-  _UsCmpI = UsCmpI;
-}
-//=============================================================================
-int HOMARD_Hypothesis::GetUseComp() const
-{
-  return _UsCmpI;
-}
-//=============================================================================
-void HOMARD_Hypothesis::AddComp( const char* NomComp )
-{
-// 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 ) ;
-// Insertion veritable
-  _ListComp.push_back( std::string( NomComp ) );
-}
-//=============================================================================
-void HOMARD_Hypothesis::SupprComp( const char* NomComp )
-{
-  MESSAGE ("SupprComp pour "<<NomComp) ;
-  std::list<std::string>::iterator it = find( _ListComp.begin(), _ListComp.end(), NomComp );
-  if ( it != _ListComp.end() ) { it = _ListComp.erase( it ); }
-}
-//=============================================================================
-void HOMARD_Hypothesis::SupprComps()
-{
-  _ListComp.clear();
-}
-//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetComps() const
-{
-  return _ListComp;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetRefinThr( int TypeThR, double ThreshR )
-{
-  MESSAGE( "SetRefinThr : TypeThR = " << TypeThR << ", ThreshR = " << ThreshR );
-  VERIFICATION( (TypeThR>=0) && (TypeThR<=4) );
-  _TypeThR = TypeThR;
-  _ThreshR = ThreshR;
-}
-//=============================================================================
-int HOMARD_Hypothesis::GetRefinThrType() const
-{
-  return _TypeThR;
-}
-//=============================================================================
-double HOMARD_Hypothesis::GetThreshR() const
-{
-  return _ThreshR;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetUnRefThr( int TypeThC, double ThreshC )
-{
-  VERIFICATION( (TypeThC>=0) && (TypeThC<=4) );
-  _TypeThC = TypeThC;
-  _ThreshC = ThreshC;
-}
-//=============================================================================
-int HOMARD_Hypothesis::GetUnRefThrType() const
-{
-  return _TypeThC;
-}
-//=============================================================================
-double HOMARD_Hypothesis::GetThreshC() const
-{
-  return _ThreshC;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetNivMax( int NivMax )
-//=============================================================================
-{
-  _NivMax = NivMax;
-}
-//=============================================================================
-const int HOMARD_Hypothesis::GetNivMax() const
-//=============================================================================
-{
-  return _NivMax;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetDiamMin( double DiamMin )
-//=============================================================================
-{
-  _DiamMin = DiamMin;
-}
-//=============================================================================
-const double HOMARD_Hypothesis::GetDiamMin() const
-//=============================================================================
-{
-  return _DiamMin;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetAdapInit( int AdapInit )
-//=============================================================================
-{
-  _AdapInit = AdapInit;
-}
-//=============================================================================
-const int HOMARD_Hypothesis::GetAdapInit() const
-//=============================================================================
-{
-  return _AdapInit;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SetExtraOutput( int ExtraOutput )
-//=============================================================================
-{
-  _ExtraOutput = ExtraOutput;
-}
-//=============================================================================
-const int HOMARD_Hypothesis::GetExtraOutput() const
-//=============================================================================
-{
-  return _ExtraOutput;
-}
-//=============================================================================
-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();
-  std::list<std::string>::const_iterator it = ListGroup.begin();
-  while(it != ListGroup.end())
-    _ListGroupSelected.push_back((*it++));
-}
-//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetGroups() const
-{
-  return _ListGroupSelected;
-}
-//=============================================================================
-// Type d'interpolation des champs :
-//   0 : aucun champ n'est interpole
-//   1 : tous les champs sont interpoles
-//   2 : certains champs sont interpoles
-void HOMARD_Hypothesis::SetTypeFieldInterp( int TypeFieldInterp )
-{
-  VERIFICATION( (TypeFieldInterp>=0) && (TypeFieldInterp<=2) );
-  _TypeFieldInterp = TypeFieldInterp;
-}
-//=============================================================================
-int HOMARD_Hypothesis::GetTypeFieldInterp() const
-{
-  return _TypeFieldInterp;
-}
-//=============================================================================
-void HOMARD_Hypothesis::AddFieldInterpType( const char* FieldInterp, int TypeInterp )
-{
-  MESSAGE ("Dans AddFieldInterpType pour " << FieldInterp << " et TypeInterp = " << TypeInterp) ;
-// On commence par supprimer le champ 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
-  SupprFieldInterp( FieldInterp ) ;
-// Insertion veritable
-// . Nom du champ
-  _ListFieldInterp.push_back( std::string( FieldInterp ) );
-// . Usage du champ
-  std::stringstream saux1 ;
-  saux1 << TypeInterp ;
-  _ListFieldInterp.push_back( saux1.str() );
-// . Indication generale : certains champs sont a interpoler
-  SetTypeFieldInterp ( 2 ) ;
-}
-//=============================================================================
-void HOMARD_Hypothesis::SupprFieldInterp( const char* FieldInterp )
-{
-  MESSAGE ("Dans SupprFieldInterp pour " << FieldInterp) ;
-  std::list<std::string>::iterator it = find( _ListFieldInterp.begin(), _ListFieldInterp.end(), FieldInterp ) ;
-// Attention a supprimer le nom du champ et le type d'usage
-  if ( it != _ListFieldInterp.end() )
-  {
-    it = _ListFieldInterp.erase( it ) ;
-    it = _ListFieldInterp.erase( it ) ;
-  }
-// Decompte du nombre de champs restant a interpoler
-  it = _ListFieldInterp.begin() ;
-  int cpt = 0 ;
-  while(it != _ListFieldInterp.end())
-  {
-    cpt += 1 ;
-    (*it++);
-  }
-  MESSAGE("Nombre de champ restants = "<<cpt/2);
-// . Indication generale : aucun champ ne reste a interpoler
-  if ( cpt == 0 )
-  {
-    SetTypeFieldInterp ( 0 ) ;
-  }
-}
-//=============================================================================
-void HOMARD_Hypothesis::SupprFieldInterps()
-{
-  MESSAGE ("SupprFieldInterps") ;
-  _ListFieldInterp.clear();
-// . Indication generale : aucun champ ne reste a interpoler
-  SetTypeFieldInterp ( 0 ) ;
-}
-//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetFieldInterps() const
-{
-  return _ListFieldInterp;
-}
-//=============================================================================
-//=============================================================================
-// Liens avec les autres structures
-//=============================================================================
-//=============================================================================
-void HOMARD_Hypothesis::SetCaseCreation( const char* NomCasCreation )
-{
-  _NomCasCreation = std::string( NomCasCreation );
-}
-//=============================================================================
-std::string HOMARD_Hypothesis::GetCaseCreation() const
-{
-  return _NomCasCreation;
-}
-//=============================================================================
-void HOMARD_Hypothesis::LinkIteration( const char* NomIteration )
-{
-  _ListIter.push_back( std::string( NomIteration ) );
-}
-//=============================================================================
-void HOMARD_Hypothesis::UnLinkIteration( const char* NomIteration )
-{
-  std::list<std::string>::iterator it = find( _ListIter.begin(), _ListIter.end(), NomIteration ) ;
-  if ( it != _ListIter.end() )
-  {
-    MESSAGE ("Dans UnLinkIteration pour " << NomIteration) ;
-    it = _ListIter.erase( it ) ;
-  }
-}
-//=============================================================================
-void HOMARD_Hypothesis::UnLinkIterations()
-{
-  _ListIter.clear();
-}
-//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetIterations() const
-{
-  return _ListIter;
-}
-//=============================================================================
-void HOMARD_Hypothesis::AddZone( const char* NomZone, int TypeUse )
-{
-  MESSAGE ("Dans AddZone pour " << NomZone << " et TypeUse = " << TypeUse) ;
-// On commence par supprimer la zone 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
-  SupprZone( NomZone ) ;
-// Insertion veritable
-// . Nom de la zone
-  _ListZone.push_back( std::string( NomZone ) );
-// . Usage de la zone
-  std::stringstream saux1 ;
-  saux1 << TypeUse ;
-  _ListZone.push_back( saux1.str() );
-}
-//=============================================================================
-void HOMARD_Hypothesis::SupprZone( const char* NomZone )
-{
-  MESSAGE ("Dans SupprZone pour " << NomZone) ;
-  std::list<std::string>::iterator it = find( _ListZone.begin(), _ListZone.end(), NomZone );
-// Attention a supprimer le nom de zone et le type d'usage
-  if ( it != _ListZone.end() )
-  {
-    it = _ListZone.erase( it );
-    it = _ListZone.erase( it );
-  }
-}
-//=============================================================================
-void HOMARD_Hypothesis::SupprZones()
-{
-  _ListZone.clear();
-}
-//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetZones() const
-{
-  return _ListZone;
-}
-
 //=============================================================================
 /*!
  *  default constructor:
  */
 //=============================================================================
 HOMARD_Iteration::HOMARD_Iteration():
-  _Name( "" ), _Etat( 0 ),
- _NumIter( -1 ),
-  _NomMesh( "" ), _MeshFile( "" ),
-  _FieldFile( "" ), _TimeStep( -1 ), _Rank( -1 ),
+  _Name( "" ),
+  _Etat( 0 ),
+  _NumIter( -1 ),
+  _NomMesh( "" ),
+  _MeshFile( "" ),
   _LogFile( "" ),
-  _IterParent( "" ),
-  _NomHypo( "" ), _NomCas( "" ), _NomDir( "" ),
+  _NomDir( "" ),
   _FileInfo( "" ),
- _MessInfo( 1 )
 _MessInfo( 1 )
 {
   MESSAGE("HOMARD_Iteration");
 }
@@ -2740,94 +1190,6 @@ std::string HOMARD_Iteration::GetMeshFile() const
   return _MeshFile;
 }
 //=============================================================================
-void HOMARD_Iteration::SetFieldFile( const char* FieldFile )
-{
-  _FieldFile = std::string( FieldFile );
-}
-//=============================================================================
-std::string HOMARD_Iteration::GetFieldFile() const
-{
-  return _FieldFile;
-}
-//=============================================================================
-// Instants pour le champ de pilotage
-//=============================================================================
-void HOMARD_Iteration::SetTimeStep( int TimeStep )
-{
-  _TimeStep = TimeStep;
-}
-//=============================================================================
-void HOMARD_Iteration::SetTimeStepRank( int TimeStep, int Rank )
-{
-  _TimeStep = TimeStep;
-  _Rank = Rank;
-}
-//=============================================================================
-void HOMARD_Iteration::SetTimeStepRankLast()
-{
-  _TimeStep = -2;
-}
-//=============================================================================
-int HOMARD_Iteration::GetTimeStep() const
-{
-  return _TimeStep;
-}
-//=============================================================================
-int HOMARD_Iteration::GetRank() const
-{
-  return _Rank;
-}
-//=============================================================================
-// Instants pour un champ a interpoler
-//=============================================================================
-void HOMARD_Iteration::SetFieldInterpTimeStep( const char* FieldInterp, int TimeStep )
-{
-  SetFieldInterpTimeStepRank( FieldInterp, TimeStep, TimeStep ) ;
-}
-//=============================================================================
-void HOMARD_Iteration::SetFieldInterpTimeStepRank( const char* FieldInterp, int TimeStep, int Rank )
-{
-  MESSAGE("Champ " << FieldInterp << ", hypothese " << _NomHypo )
-// Verification de la presence du champ dans l'hypothese
-  std::list<std::string>::iterator it = find( _ListFieldInterp.begin(), _ListFieldInterp.end(), FieldInterp );
-  if ( it == _ListFieldInterp.end() )
-  {
-    INFOS("Champ " << FieldInterp << " ; hypothese " << _NomHypo )
-    VERIFICATION("Le champ est inconnu dans l'hypothese associee a cette iteration." == 0);
-  }
-
-// . Nom du champ
-  _ListFieldInterpTSR.push_back( std::string( FieldInterp ) );
-// . Pas de temps
-  std::stringstream saux1 ;
-  saux1 << TimeStep ;
-  _ListFieldInterpTSR.push_back( saux1.str() );
-// . Numero d'ordre
-  std::stringstream saux2 ;
-  saux2 << Rank ;
-  _ListFieldInterpTSR.push_back( saux2.str() );
-}
-//=============================================================================
-const std::list<std::string>& HOMARD_Iteration::GetFieldInterpsTimeStepRank() const
-{
-  return _ListFieldInterpTSR;
-}
-//=============================================================================
-void HOMARD_Iteration::SetFieldInterp( const char* FieldInterp )
-{
-  _ListFieldInterp.push_back( std::string( FieldInterp ) );
-}
-//=============================================================================
-const std::list<std::string>& HOMARD_Iteration::GetFieldInterps() const
-{
-  return _ListFieldInterp;
-}
-//=============================================================================
-void HOMARD_Iteration::SupprFieldInterps()
-{
-  _ListFieldInterp.clear();
-}
-//=============================================================================
 void HOMARD_Iteration::SetLogFile( const char* LogFile )
 {
   _LogFile = std::string( LogFile );
@@ -2848,73 +1210,6 @@ std::string HOMARD_Iteration::GetFileInfo() const
   return _FileInfo;
 }
 //=============================================================================
-//=============================================================================
-// Liens avec les autres iterations
-//=============================================================================
-//=============================================================================
-void HOMARD_Iteration::LinkNextIteration( const char* NomIteration )
-{
-  _mesIterFilles.push_back( std::string( NomIteration ) );
-}
-//=============================================================================
-void HOMARD_Iteration::UnLinkNextIteration( const char* NomIteration )
-{
-  std::list<std::string>::iterator it = find( _mesIterFilles.begin(), _mesIterFilles.end(), NomIteration ) ;
-  if ( it != _mesIterFilles.end() )
-  {
-    MESSAGE ("Dans UnLinkNextIteration pour " << NomIteration) ;
-    it = _mesIterFilles.erase( it ) ;
-  }
-}
-//=============================================================================
-void HOMARD_Iteration::UnLinkNextIterations()
-{
-  _mesIterFilles.clear();
-}
-//=============================================================================
-const std::list<std::string>& HOMARD_Iteration::GetIterations() const
-{
-  return _mesIterFilles;
-}
-//=============================================================================
-void HOMARD_Iteration::SetIterParentName( const char* IterParent )
-{
-  _IterParent = IterParent;
-}
-//=============================================================================
-std::string HOMARD_Iteration::GetIterParentName() const
-{
-  return _IterParent;
-}
-//=============================================================================
-//=============================================================================
-// Liens avec les autres structures
-//=============================================================================
-//=============================================================================
-void HOMARD_Iteration::SetCaseName( const char* NomCas )
-{
-  _NomCas = std::string( NomCas );
-}
-//=============================================================================
-std::string HOMARD_Iteration::GetCaseName() const
-{
-  return _NomCas;
-}
-//=============================================================================
-void HOMARD_Iteration::SetHypoName( const char* NomHypo )
-{
-  _NomHypo = std::string( NomHypo );
-}
-//=============================================================================
-std::string HOMARD_Iteration::GetHypoName() const
-{
-  return _NomHypo;
-}
-//=============================================================================
-//=============================================================================
-// Divers
-//=============================================================================
-//=============================================================================
 void HOMARD_Iteration::SetInfoCompute( int MessInfo )
 {
   _MessInfo = MessInfo;
index 45be4842417544a3ec498d17122189bda761397b..2df21fd7e82074b2b2e07c8fc330aa0c53218f1c 100644 (file)
 #ifndef _SMESH_HOMARD_ADAPT_HXX_
 #define _SMESH_HOMARD_ADAPT_HXX_
 
-// C'est le ASSERT de SALOMELocalTrace/utilities.h dans KERNEL
-#ifndef VERIFICATION
-#define VERIFICATION(condition) \
-        if (!(condition)){INTERRUPTION("CONDITION "<<#condition<<" NOT VERIFIED")}
-#endif /* VERIFICATION */
-
-#ifdef WIN32
-  #if defined HOMARDIMPL_EXPORTS || defined HOMARDImpl_EXPORTS
-    #define HOMARDIMPL_EXPORT __declspec( dllexport )
-  #else
-    #define HOMARDIMPL_EXPORT __declspec( dllimport )
-  #endif
-#else
-   #define HOMARDIMPL_EXPORT
-#endif
-
-// La gestion des repertoires
-#ifndef CHDIR
-  #ifdef WIN32
-    #define CHDIR _chdir
-  #else
-    #define CHDIR chdir
-  #endif
-#endif
+#include "SMESH_SMESH.hxx"
 
 #include <vector>
 #include <string>
@@ -64,7 +41,7 @@
 namespace SMESHHOMARDImpl
 {
 
-class HOMARDIMPL_EXPORT HOMARD_Boundary
+class SMESH_EXPORT HOMARD_Boundary
 {
 public:
   HOMARD_Boundary();
@@ -105,7 +82,7 @@ public:
   void                          SetGroups(const std::list<std::string>& ListGroup );
   const std::list<std::string>& GetGroups() const;
 
-// Liens avec les autres structures
+  // Liens avec les autres structures
   std::string                   GetCaseCreation() const;
   void                          SetCaseCreation( const char* NomCasCreation );
 
@@ -124,10 +101,9 @@ private:
   double                        _Angle;
 
   std::list<std::string>        _ListGroupSelected;
-
 };
 
-class HOMARDIMPL_EXPORT HOMARD_Cas
+class SMESH_EXPORT HOMARD_Cas
 {
 public:
   HOMARD_Cas();
@@ -143,8 +119,6 @@ public:
   int                           SetDirName( const char* NomDir );
   std::string                   GetDirName() const;
 
-  int                           GetNumberofIter();
-
   void                          SetConfType( int ConfType );
   const int                     GetConfType() const;
 
@@ -161,12 +135,7 @@ public:
   const std::list<std::string>& GetBoundaryGroup() const;
   void                          SupprBoundaryGroup();
 
-// Liens avec les autres structures
-  std::string                   GetIter0Name() const;
-
   void                          AddIteration( const char* NomIteration );
-  const std::list<std::string>& GetIterations() const;
-  void                          SupprIterations();
 
 private:
   std::string                   _Name;
@@ -183,7 +152,7 @@ private:
   IterNames                     _ListIter;
 };
 
-class HOMARDIMPL_EXPORT HomardDriver
+class SMESH_EXPORT HomardDriver
 {
 public:
   HomardDriver(const std::string siter, const std::string siterp1);
@@ -197,14 +166,7 @@ public:
   void        CreeFichier();
   void        TexteMaillage( const std::string NomMesh, const std::string MeshFile, int apres );
   void        TexteMaillageHOMARD( const std::string Dir, const std::string liter, int apres );
-  void        TexteConfRaffDera( int ConfType, int TypeAdap, int TypeRaff, int TypeDera );
-  void        TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7, double x8 );
-  void        TexteGroup( const std::string GroupName );
-  void        TexteField( const std::string FieldName, const std::string FieldFile,
-                          int TimeStep, int Rank,
-                          int TypeThR, double ThreshR, int TypeThC, double ThreshC,
-                          int UsField, int UsCmpI );
-  void        TexteCompo( int NumeComp, const std::string NomCompo);
+  void        TexteConfRaffDera( int ConfType );
 
   void        TexteBoundaryOption( int BoundaryOption );
   void        TexteBoundaryCAOGr( const std::string GroupName );
@@ -213,9 +175,6 @@ public:
   void        TexteBoundaryAn( const std::string NameBoundary, int NumeBoundary, int BoundaryType, double x0, double x1, double x2, double x3, double x4, double x5, double x6, double x7 );
   void        TexteBoundaryAnGr( const std::string NameBoundary, int NumeBoundary, const std::string GroupName );
 
-  void        TexteFieldInterp( const std::string FieldFile, const std::string MeshFile );
-  void        TexteFieldInterpAll();
-  void        TexteFieldInterpNameType( int NumeChamp, const std::string FieldName, const std::string TypeInterp, int TimeStep, int Rank );
   void        TexteAdvanced( int NivMax, double DiamMin, int AdapInit, int LevelOutput );
   void        TexteInfoCompute( int MessInfo );
   //
@@ -231,157 +190,19 @@ public:
   std::string _siter;
   std::string _siterp1;
   std::string _Texte;
-  int         _TimeStep;
-  int         _Rank;
   bool _bLu;
 };
 
 class HOMARD_Iteration;
-class HOMARD_Hypothesis;
-
-  //! persistence entity type
-  typedef enum { Case, Zone, Hypothesis, Iteration, Boundary } SignatureType;
-
-  //! get persistence signature
-  HOMARDIMPL_EXPORT std::string GetSignature( SignatureType type );
-
-  //! get data separator
-  HOMARDIMPL_EXPORT std::string separator();
-
-  //! dump boundary to the string
-  HOMARDIMPL_EXPORT std::string Dump( const SMESHHOMARDImpl::HOMARD_Boundary& boundary );
-  //! dump case to the string
-  HOMARDIMPL_EXPORT std::string Dump( const SMESHHOMARDImpl::HOMARD_Cas& cas );
-  //! dump iteration to the string
-  HOMARDIMPL_EXPORT std::string Dump( const SMESHHOMARDImpl::HOMARD_Iteration& iteration );
-  //! dump hypothesis to the string
-  HOMARDIMPL_EXPORT std::string Dump( const SMESHHOMARDImpl::HOMARD_Hypothesis& hypothesis );
-
-  //! restore boundary from the string
-  HOMARDIMPL_EXPORT bool Restore( SMESHHOMARDImpl::HOMARD_Boundary& boundary, const std::string& stream );
-  //! restore case from the string
-  HOMARDIMPL_EXPORT bool Restore( SMESHHOMARDImpl::HOMARD_Cas& cas, const std::string& stream );
-  //! restore hypothesis from the string
-  HOMARDIMPL_EXPORT bool Restore( SMESHHOMARDImpl::HOMARD_Hypothesis& hypothesis, const std::string& stream );
-  //! restore iteration from the string
-  HOMARDIMPL_EXPORT bool Restore( SMESHHOMARDImpl::HOMARD_Iteration& iteration, const std::string& stream );
-
-class HOMARDIMPL_EXPORT HOMARD_Gen
+
+class SMESH_EXPORT HOMARD_Gen
 {
 public :
   HOMARD_Gen();
   ~HOMARD_Gen();
 };
 
-class HOMARDIMPL_EXPORT HOMARD_Hypothesis
-{
-public:
-  HOMARD_Hypothesis();
-  ~HOMARD_Hypothesis();
-
-// Generalites
-  void                          SetName( const char* Name );
-  std::string                   GetName() const;
-
-// Caracteristiques
-  void                          SetAdapType( int TypeAdap );
-  int                           GetAdapType() const;
-  void                          SetRefinTypeDera( int TypeRaff, int TypeDera );
-  int                           GetRefinType() const;
-  int                           GetUnRefType() const;
-
-  void                          SetField( const char* FieldName );
-  std::string                   GetFieldName() const;
-  void                          SetUseField( int UsField );
-  int                           GetUseField()    const;
-
-  void                          SetUseComp( int UsCmpI );
-  int                           GetUseComp()    const;
-  void                          AddComp( const char* NomComp );
-  void                          SupprComp( const char* NomComp );
-  void                          SupprComps();
-  const std::list<std::string>& GetComps() const;
-
-  void                          SetRefinThr( int TypeThR, double ThreshR );
-  int                           GetRefinThrType()   const;
-  double                        GetThreshR()   const;
-  void                          SetUnRefThr( int TypeThC, double ThreshC );
-  int                           GetUnRefThrType()   const;
-  double                        GetThreshC()   const;
-
-  void                          SetNivMax( int NivMax );
-  const int                     GetNivMax() const;
-
-  void                          SetDiamMin( double DiamMin );
-  const double                  GetDiamMin() const;
-
-  void                          SetAdapInit( int AdapInit );
-  const int                     GetAdapInit() const;
-
-  void                          SetExtraOutput( int ExtraOutput );
-  const int                     GetExtraOutput() const;
-
-  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;
-
-  void                          SetTypeFieldInterp( int TypeFieldInterp );
-  int                           GetTypeFieldInterp() const;
-  void                          AddFieldInterpType( const char* FieldInterp, int TypeInterp );
-  void                          SupprFieldInterp( const char* FieldInterp );
-  void                          SupprFieldInterps();
-  const std::list<std::string>& GetFieldInterps() const;
-
-// Liens avec les autres structures
-  void                          SetCaseCreation( const char* NomCasCreation );
-  std::string                   GetCaseCreation() const;
-
-  void                          LinkIteration( const char* NomIter );
-  void                          UnLinkIteration( const char* NomIter );
-  void                          UnLinkIterations();
-  const std::list<std::string>& GetIterations() const;
-
-  void                          AddZone( const char* NomZone, int TypeUse );
-  void                          SupprZone( const char* NomZone );
-  void                          SupprZones();
-  const std::list<std::string>& GetZones() const;
-
-private:
-  std::string                   _Name;
-  std::string                   _NomCasCreation;
-
-  int                           _TypeAdap; // -1 pour une adapation Uniforme,
-                                           //  0 si l adaptation depend des zones,
-                                           //  1 pour des champs
-
-  int                           _TypeRaff;
-  int                           _TypeDera;
-
-  std::string                   _Field;
-  int                           _TypeThR;
-  int                           _TypeThC;
-  double                        _ThreshR;
-  double                        _ThreshC;
-  int                           _UsField;
-  int                           _UsCmpI;
-  int                           _TypeFieldInterp; // 0 pour aucune interpolation,
-                                                  // 1 pour interpolation de tous les champs,
-                                                  // 2 pour une liste
-  int                           _NivMax;
-  double                        _DiamMin;
-  int                           _AdapInit;
-  int                           _ExtraOutput;
-
-  std::list<std::string>        _ListIter;
-  std::list<std::string>        _ListZone;
-  std::list<std::string>        _ListComp;
-  std::list<std::string>        _ListGroupSelected;
-  std::list<std::string>        _ListFieldInterp;
-};
-
-class HOMARDIMPL_EXPORT HOMARD_Iteration
+class SMESH_EXPORT HOMARD_Iteration
 {
 public:
   HOMARD_Iteration();
@@ -407,45 +228,13 @@ public:
   void                          SetMeshFile( const char* MeshFile );
   std::string                   GetMeshFile() const;
 
-  void                          SetFieldFile( const char* FieldFile );
-  std::string                   GetFieldFile() const;
-// Instants pour le champ de pilotage
-  void                          SetTimeStep( int TimeStep );
-  void                          SetTimeStepRank( int TimeStep, int Rank );
-  void                          SetTimeStepRankLast();
-  int                           GetTimeStep() const;
-  int                           GetRank() const;
-// Instants pour un champ a interpoler
-  void                          SetFieldInterpTimeStep( const char* FieldInterp, int TimeStep );
-  void                          SetFieldInterpTimeStepRank( const char* FieldInterp, int TimeStep, int Rank );
-  const std::list<std::string>& GetFieldInterpsTimeStepRank() const;
-  void                          SetFieldInterp( const char* FieldInterp );
-  const std::list<std::string>& GetFieldInterps() const;
-  void                          SupprFieldInterps();
-
   void                          SetLogFile( const char* LogFile );
   std::string                   GetLogFile() const;
 
   void                          SetFileInfo( const char* FileInfo );
   std::string                   GetFileInfo() const;
 
-// Liens avec les autres iterations
-  void                          LinkNextIteration( const char* NomIteration );
-  void                          UnLinkNextIteration( const char* NomIteration );
-  void                          UnLinkNextIterations();
-  const std::list<std::string>& GetIterations() const;
-
-  void                          SetIterParentName( const char* iterParent );
-  std::string                   GetIterParentName() const;
-
-// Liens avec les autres structures
-  void                          SetCaseName( const char* NomCas );
-  std::string                   GetCaseName() const;
-
-  void                          SetHypoName( const char* NomHypo );
-  std::string                   GetHypoName() const;
-
-// Divers
+  // Divers
   void                          SetInfoCompute( int MessInfo );
   int                           GetInfoCompute() const;
 
@@ -455,21 +244,10 @@ private:
   int                           _NumIter;
   std::string                   _NomMesh;
   std::string                   _MeshFile;
-  std::string                   _FieldFile;
-  int                           _TimeStep;
-  int                           _Rank;
   std::string                   _LogFile;
-  std::string                   _IterParent;
-  std::string                   _NomHypo;
-  std::string                   _NomCas;
   std::string                   _NomDir;
-  std::list<std::string>        _mesIterFilles;
   std::string                   _FileInfo;
   int                           _MessInfo;
-  // La liste des champs retenus par l'hypothese
-  std::list<std::string>        _ListFieldInterp;
-  // La liste des triplets (champs, pas de temps, numero d'ordre) retenus par l'iteration
-  std::list<std::string>        _ListFieldInterpTSR;
 };
 
 }; // namespace SMESHHOMARDImpl
index dbd6ec225989db33ff1b11cabd5ae9b498230bb6..d99c89d01e9dcecb422b34008f67f7d3655b1816 100644 (file)
@@ -72,6 +72,7 @@ SMESHGUI_HomardAdaptDlg::SMESHGUI_HomardAdaptDlg(SMESHHOMARD::HOMARD_Gen_ptr myH
 {
   MESSAGE("Debut du constructeur de SMESHGUI_HomardAdaptDlg");
   myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
+  //myHomardGen = SMESHGUI::GetSMESHGen()->CreateHOMARD_ADAPT();
   myHomardGen->Register();
 
   setModal(false);
@@ -181,6 +182,7 @@ SMESHGUI_HomardAdaptDlg::SMESHGUI_HomardAdaptDlg(SMESHHOMARD::HOMARD_Gen_ptr myH
 SMESHGUI_HomardAdaptDlg::~SMESHGUI_HomardAdaptDlg()
 {
   // no need to delete child widgets, Qt does it all for us
+  myHomardGen->CleanCase();
 }
 
 //=================================================================================
index e3180f4cbad7cbb280c7a0e9cbd9054bb95092bf..97fc628c47a6bfecea3c95255211fd56fffd7abb 100644 (file)
@@ -44,8 +44,8 @@ using namespace std;
 
 // ----------------------------------------------------------------------------------
 SMESH_CreateBoundaryAn::SMESH_CreateBoundaryAn(SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                                         SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
-                                         QString caseName) :
+                                               SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                               QString caseName) :
 /* Constructs a SMESH_CreateBoundaryAn
    appele pour une vraie creation
    initialise un cylindre et non une sphere
@@ -106,8 +106,8 @@ SMESH_CreateBoundaryAn::SMESH_CreateBoundaryAn(SMESHGUI_HomardAdaptDlg* parent,
 
 // -------------------------------------------------------------------------------
 SMESH_CreateBoundaryAn::SMESH_CreateBoundaryAn(SMESHGUI_HomardAdaptDlg* parent,
-                                         SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
-                                         QString caseName):
+                                               SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                               QString caseName):
     QDialog(0), SMESH_Ui_CreateBoundaryAn(),
     _parent(parent),
     _Name (""),
@@ -117,10 +117,10 @@ SMESH_CreateBoundaryAn::SMESH_CreateBoundaryAn(SMESHGUI_HomardAdaptDlg* parent,
     // Pour affichage lors de l edition d une BoundaryAn sans nom de Cas
     _Xcentre(0), _Ycentre(0), _Zcentre(0), _Rayon(0),
     _Xmin(1), _Xmax(1), _Xincr(1), _Ymin(1), _Ymax(1), _Yincr(1), _Zmin(1), _Zmax(1), _Zincr(1), _DMax(1),
-     Chgt (false),
-     myHomardGen(myHomardGen0)
+     Chgt (false)
     {
   //  MESSAGE("Debut de  SMESH_CreateBoundaryAn")
+      myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
       setupUi(this);
       SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
       QPixmap pix = resMgr->loadPixmap( "HOMARD", "spherepoint.png" );
@@ -805,8 +805,8 @@ void SMESH_CreateBoundaryAn::convertRayonAngle(int option)
 
 // -------------------------------------------------------------------------------
 SMESH_CreateBoundaryCAO::SMESH_CreateBoundaryCAO(SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                                           SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
-                                           QString caseName, QString aName)
+                                                 SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                                 QString caseName, QString aName)
 // ---------------------------------------------------------------------------------
 /* Constructs a SMESH_CreateBoundaryCAO */
     :
@@ -968,8 +968,8 @@ void SMESH_CreateBoundaryCAO::SetFiltrage()
 
 // -------------------------------------------------------------------------------
 SMESH_CreateBoundaryDi::SMESH_CreateBoundaryDi(SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                                         SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
-                                         QString caseName, QString aName)
+                                               SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                               QString caseName, QString aName)
 // ---------------------------------------------------------------------------------
 /* Constructs a SMESH_CreateBoundaryDi */
     :
@@ -1140,13 +1140,13 @@ void SMESH_CreateBoundaryDi::SetFiltrage()
 
 // ------------------------------------------------------------------------
 SMESH_EditBoundaryAn::SMESH_EditBoundaryAn( SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                                      SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                                      QString caseName, QString Name ):
+                                            SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                            QString caseName, QString Name ):
 // ------------------------------------------------------------------------
 /* Constructs a SMESH_EditBoundaryAn
     herite de SMESH_CreateBoundaryAn
 */
-    SMESH_CreateBoundaryAn(parent, myHomardGen, caseName)
+    SMESH_CreateBoundaryAn(parent, myHomardGen0, caseName)
 {
     MESSAGE("Debut de SMESH_EditBoundaryAn pour " << Name.toStdString().c_str());
     setWindowTitle(QObject::tr("HOM_BOUN_A_EDIT_WINDOW_TITLE"));
@@ -1516,9 +1516,9 @@ bool SMESH_EditBoundaryAn::CreateOrUpdateBoundaryAn()
 */
 // --------------------------------------------------------------------------------------
 SMESH_EditBoundaryCAO::SMESH_EditBoundaryCAO( SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                                              SMESHHOMARD::HOMARD_Gen_var myHomardGen,
+                                              SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
                                               QString caseName, QString Name):
-    SMESH_CreateBoundaryCAO(parent, modal, myHomardGen, caseName, Name)
+    SMESH_CreateBoundaryCAO(parent, modal, myHomardGen0, caseName, Name)
 {
     MESSAGE("Debut de Boundary pour " << Name.toStdString().c_str());
     setWindowTitle(QObject::tr("HOM_BOUN_C_EDIT_WINDOW_TITLE"));
@@ -1582,9 +1582,9 @@ void SMESH_EditBoundaryCAO::SetFiltrage()
 */
 // ------------------------------------------------------------------------------------
 SMESH_EditBoundaryDi::SMESH_EditBoundaryDi( SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                                      SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                                      QString caseName, QString Name):
-  SMESH_CreateBoundaryDi(parent, modal, myHomardGen, caseName, Name)
+                                            SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                            QString caseName, QString Name):
+  SMESH_CreateBoundaryDi(parent, modal, myHomardGen0, caseName, Name)
 {
     MESSAGE("Debut de Boundary pour " << Name.toStdString().c_str());
     setWindowTitle(QObject::tr("HOM_BOUN_D_EDIT_WINDOW_TITLE"));
index b627d3f5bfbd5f9ab86cd38c456c71bdb7ad2b45..b327ec646a32ebdae59a080f924db02b9edfe1fa 100644 (file)
@@ -1065,13 +1065,13 @@ class SMESHGUI_EXPORT SMESH_CreateBoundaryAn : public QDialog, public SMESH_Ui_C
 
 public:
   SMESH_CreateBoundaryAn (SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                          SMESHHOMARD::HOMARD_Gen_var myHomardGen,
+                          SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
                           QString caseName);
   virtual ~SMESH_CreateBoundaryAn();
 
 protected :
   SMESH_CreateBoundaryAn (SMESHGUI_HomardAdaptDlg* parent,
-                          SMESHHOMARD::HOMARD_Gen_var myHomardGen,
+                          SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
                           QString caseName);
 
   SMESHGUI_HomardAdaptDlg * _parent;
@@ -1121,8 +1121,8 @@ class SMESHGUI_EXPORT SMESH_EditBoundaryAn : public SMESH_CreateBoundaryAn
     Q_OBJECT
 public:
     SMESH_EditBoundaryAn( SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                       SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                       QString caseName, QString Name);
+                          SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                          QString caseName, QString Name);
     virtual ~SMESH_EditBoundaryAn();
 
 protected :
@@ -1147,8 +1147,8 @@ class SMESHGUI_EXPORT SMESH_CreateBoundaryCAO : public QDialog, public SMESH_Ui_
 
 public:
     SMESH_CreateBoundaryCAO( SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                         SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                         QString caseName, QString BoundaryName );
+                             SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                             QString caseName, QString BoundaryName );
     ~SMESH_CreateBoundaryCAO();
     virtual void setGroups (QStringList listGroup);
 
@@ -1181,8 +1181,8 @@ class SMESHGUI_EXPORT SMESH_EditBoundaryCAO : public SMESH_CreateBoundaryCAO
     Q_OBJECT
 public:
     SMESH_EditBoundaryCAO( SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                        SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                        QString caseName, QString Name );
+                           SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                           QString caseName, QString Name );
     virtual ~SMESH_EditBoundaryCAO();
 
 protected :
@@ -1197,8 +1197,8 @@ class SMESHGUI_EXPORT SMESH_CreateBoundaryDi : public QDialog, public SMESH_Ui_C
 
 public:
     SMESH_CreateBoundaryDi( SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                         SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                         QString caseName, QString BoundaryName );
+                            SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                            QString caseName, QString BoundaryName );
     ~SMESH_CreateBoundaryDi();
     virtual void setGroups (QStringList listGroup);
 
@@ -1231,8 +1231,8 @@ class SMESHGUI_EXPORT SMESH_EditBoundaryDi : public SMESH_CreateBoundaryDi
     Q_OBJECT
 public:
     SMESH_EditBoundaryDi( SMESHGUI_HomardAdaptDlg* parent, bool modal,
-                       SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                       QString caseName, QString Name );
+                          SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                          QString caseName, QString Name );
     virtual ~SMESH_EditBoundaryDi();
 
 protected :
index 32c4586f86eec660b58a6f2ad13ee375ae7a6e1f..9e632d9c37c07449f4a8b319ee3468fadee64b5c 100644 (file)
@@ -57,15 +57,15 @@ SMESH_CreateListGroupCAO::SMESH_CreateListGroupCAO(SMESH_CreateBoundaryCAO* pare
 }
 // ------------------------------------------------------------------------------------
 SMESH_CreateListGroupCAO::SMESH_CreateListGroupCAO(SMESH_CreateBoundaryCAO* parentBound,
-                                             SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                                             QString aCaseName,
-                                             QStringList listeGroupesHypo)
+                                                   SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                                   QString aCaseName,
+                                                   QStringList listeGroupesHypo)
   : QDialog(0), SMESH_Ui_CreateListGroup(),
     _aCaseName (aCaseName),
     _listeGroupesHypo (listeGroupesHypo),
     _parentBound(parentBound)
 {
-    myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+    myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
     setupUi(this);
     InitConnect();
 }
@@ -147,8 +147,8 @@ void SMESH_CreateListGroupCAO::InitGroupes()
 
 // ------------------------------------------------------------------------
 SMESH_CreateListGroup::SMESH_CreateListGroup(SMESH_CreateBoundaryDi* parentBound, bool modal,
-                                       SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
-                                       QString aCaseName,  QStringList listeGroupesHypo)
+                                             SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                             QString aCaseName,  QStringList listeGroupesHypo)
   : QDialog(0), SMESH_Ui_CreateListGroup(),
     _aCaseName (aCaseName),
     _listeGroupesHypo (listeGroupesHypo),
@@ -164,14 +164,14 @@ SMESH_CreateListGroup::SMESH_CreateListGroup(SMESH_CreateBoundaryDi* parentBound
 
 // ------------------------------------------------------------------------
 SMESH_CreateListGroup::SMESH_CreateListGroup(SMESH_CreateBoundaryDi* parentBound,
-                                       SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                                       QString aCaseName,  QStringList listeGroupesHypo)
+                                             SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                             QString aCaseName,  QStringList listeGroupesHypo)
   : QDialog(0), SMESH_Ui_CreateListGroup(),
     _aCaseName (aCaseName),
     _listeGroupesHypo (listeGroupesHypo),
     _parentBound(parentBound)
 {
-  myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+  myHomardGen = SMESHHOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
   setupUi(this);
   InitConnect();
 }
@@ -255,12 +255,12 @@ void SMESH_CreateListGroup::InitGroupes()
 
 //---------------------------------------------------------------------
 SMESH_EditListGroupCAO::SMESH_EditListGroupCAO( SMESH_CreateBoundaryCAO* parentBound,
-                                          bool modal,
-                                          SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                                          QString aCaseName,
-                                          QStringList listeGroupesHypo):
+                                                bool modal,
+                                                SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                                QString aCaseName,
+                                                QStringList listeGroupesHypo):
 //---------------------------------------------------------------------
-SMESH_CreateListGroupCAO(parentBound,myHomardGen,aCaseName,listeGroupesHypo)
+SMESH_CreateListGroupCAO(parentBound,myHomardGen0,aCaseName,listeGroupesHypo)
 {
   MESSAGE("Debut de SMESH_EditListGroupCAO");
     setWindowTitle(QObject::tr("HOM_GROU_EDIT_WINDOW_TITLE"));
@@ -291,12 +291,12 @@ void SMESH_EditListGroupCAO:: InitGroupes()
 
 //---------------------------------------------------------------------
 SMESH_EditListGroup::SMESH_EditListGroup( SMESH_CreateBoundaryDi* parentBound,
-                                    bool modal,
-                                    SMESHHOMARD::HOMARD_Gen_var myHomardGen,
-                                    QString aCaseName,
-                                    QStringList listeGroupesHypo):
+                                          bool modal,
+                                          SMESHHOMARD::HOMARD_Gen_var myHomardGen0,
+                                          QString aCaseName,
+                                          QStringList listeGroupesHypo):
 //---------------------------------------------------------------------
-SMESH_CreateListGroup(parentBound,myHomardGen,aCaseName,listeGroupesHypo)
+SMESH_CreateListGroup(parentBound,myHomardGen0,aCaseName,listeGroupesHypo)
 {
   MESSAGE("Debut de SMESH_EditListGroup");
     setWindowTitle(QObject::tr("HOM_GROU_EDIT_WINDOW_TITLE"));
index 130ca462d253bab3de6a06b88336ccb6634e1ece..ea88f7d044f5275e04f5ed774fe77976ee7b1bd4 100644 (file)
 #include <vector>
 #include <stdio.h>
 
+// C'est le ASSERT de SALOMELocalTrace/utilities.h dans KERNEL
+#ifndef VERIFICATION
+#define VERIFICATION(condition) \
+        if (!(condition)){INTERRUPTION("CONDITION "<<#condition<<" NOT VERIFIED")}
+#endif /* VERIFICATION */
+
+// La gestion des repertoires
+#ifndef CHDIR
+  #ifdef WIN32
+    #define CHDIR _chdir
+  #else
+    #define CHDIR chdir
+  #endif
+#endif
+
 using namespace std;
 
 SMESHHOMARD::HOMARD_Gen_ptr SMESH_Gen_i::CreateHOMARD_ADAPT()
@@ -652,80 +667,6 @@ void HOMARD_Cas_i::AddIteration(const char* NomIteration)
   myHomardCas->AddIteration(NomIteration);
 }
 
-//=============================================================================
-/*!
- *  standard constructor
- */
-//=============================================================================
-HOMARD_Hypothesis_i::HOMARD_Hypothesis_i()
-  : SALOME::GenericObj_i(SMESH_Gen_i::GetPOA())
-{
-  MESSAGE("Default constructor, not for use");
-  ASSERT(0);
-}
-
-//=============================================================================
-/*!
- *  standard constructor
- */
-//=============================================================================
-HOMARD_Hypothesis_i::HOMARD_Hypothesis_i(SMESHHOMARD::HOMARD_Gen_var engine)
-  : SALOME::GenericObj_i(SMESH_Gen_i::GetPOA())
-{
-  MESSAGE("standard constructor");
-  _gen_i = engine;
-  myHomardHypothesis = new SMESHHOMARDImpl::HOMARD_Hypothesis();
-  ASSERT(myHomardHypothesis);
-
-  // SetUnifRefinUnRef(1)
-  int RefinType = 1;
-  int UnRefType = 0;
-  myHomardHypothesis->SetAdapType(-1);
-  myHomardHypothesis->SetRefinTypeDera(RefinType, UnRefType);
-
-  // Set name
-  myHomardHypothesis->SetName("Hypo_1");
-}
-
-//=============================================================================
-/*!
- *  standard destructor
- */
-//=============================================================================
-HOMARD_Hypothesis_i::~HOMARD_Hypothesis_i()
-{
-}
-
-//=============================================================================
-void HOMARD_Hypothesis_i::SetExtraOutput(CORBA::Long ExtraOutput)
-{
-  ASSERT(myHomardHypothesis);
-  myHomardHypothesis->SetExtraOutput(ExtraOutput);
-}
-//=============================================================================
-CORBA::Long HOMARD_Hypothesis_i::GetExtraOutput()
-{
-  ASSERT(myHomardHypothesis);
-  return myHomardHypothesis->GetExtraOutput();
-}
-
-//=============================================================================
-//=============================================================================
-// Liens avec les autres structures
-//=============================================================================
-//=============================================================================
-void HOMARD_Hypothesis_i::LinkIteration(const char* NomIteration)
-{
-  ASSERT(myHomardHypothesis);
-  myHomardHypothesis->LinkIteration(NomIteration);
-}
-//=============================================================================
-void HOMARD_Hypothesis_i::UnLinkIteration(const char* NomIteration)
-{
-  ASSERT(myHomardHypothesis);
-  myHomardHypothesis->UnLinkIteration(NomIteration);
-}
-
 //=============================================================================
 /*!
  *  standard constructor
@@ -864,61 +805,6 @@ char* HOMARD_Iteration_i::GetFileInfo()
   return CORBA::string_dup(myHomardIteration->GetFileInfo().c_str());
 }
 //=============================================================================
-//=============================================================================
-// Liens avec les autres iterations
-//=============================================================================
-//=============================================================================
-void HOMARD_Iteration_i::LinkNextIteration(const char* NomIteration)
-{
-  ASSERT(myHomardIteration);
-  myHomardIteration->LinkNextIteration(NomIteration);
-}
-//=============================================================================
-void HOMARD_Iteration_i::UnLinkNextIteration(const char* NomIteration)
-{
-  ASSERT(myHomardIteration);
-  myHomardIteration->UnLinkNextIteration(NomIteration);
-}
-//=============================================================================
-void HOMARD_Iteration_i::SetIterParentName(const char* NomIterParent)
-{
-  ASSERT(myHomardIteration);
-  myHomardIteration->SetIterParentName(NomIterParent);
-}
-//=============================================================================
-char* HOMARD_Iteration_i::GetIterParentName()
-{
-  ASSERT(myHomardIteration);
-  return CORBA::string_dup(myHomardIteration->GetIterParentName().c_str());
-}
-
-//=============================================================================
-//=============================================================================
-// Liens avec les autres structures
-//=============================================================================
-//=============================================================================
-void HOMARD_Iteration_i::SetCaseName(const char* NomCas)
-{
-  ASSERT(myHomardIteration);
-  myHomardIteration->SetCaseName(NomCas);
-}
-//=============================================================================
-char* HOMARD_Iteration_i::GetCaseName()
-{
-  ASSERT(myHomardIteration);
-  return CORBA::string_dup(myHomardIteration->GetCaseName().c_str());
-}
-//=============================================================================
-void HOMARD_Iteration_i::SetHypoName(const char* NomHypo)
-{
-  ASSERT(myHomardIteration);
-  myHomardIteration->SetHypoName(NomHypo);
-}
-//=============================================================================
-//=============================================================================
-// Divers
-//=============================================================================
-//=============================================================================
 void HOMARD_Iteration_i::SetInfoCompute(CORBA::Long MessInfo)
 {
   ASSERT(myHomardIteration);
@@ -962,9 +848,9 @@ HOMARD_Gen_i::HOMARD_Gen_i() : SALOME::GenericObj_i(SMESH_Gen_i::GetPOA()),
 HOMARD_Gen_i::~HOMARD_Gen_i()
 {
   MESSAGE ("HOMARD_Gen_i::~HOMARD_Gen_i()");
-  if (!myCase->_is_nil()) {
-    CleanCase();
-  }
+  //if (!myCase->_is_nil()) {
+  //  CleanCase();
+  //}
 }
 
 //=============================================================================
@@ -1010,17 +896,18 @@ CORBA::Long HOMARD_Gen_i::DeleteIteration(int numIter)
   MESSAGE ("DeleteIteration : numIter = " << numIter);
 
   if (numIter == 0) {
-    if (CORBA::is_nil(myIteration1))
-      myIteration0 = SMESHHOMARD::HOMARD_Iteration::_nil();
+    myIteration0 = SMESHHOMARD::HOMARD_Iteration::_nil();
   }
   else {
     if (!CORBA::is_nil(myIteration1)) {
+      /*
       if (CORBA::is_nil(myIteration0)) {
         SALOME::ExceptionStruct es;
         es.type = SALOME::BAD_PARAM;
         es.text = "Invalid iteration 0";
         throw SALOME::SALOME_Exception(es);
       }
+      */
 
       // Invalide Iteration
       if (myIteration1->GetState() > 0) {
@@ -1043,10 +930,6 @@ CORBA::Long HOMARD_Gen_i::DeleteIteration(int numIter)
         }
       }
 
-      // Unlink from the parent iteration and from the hypothesis
-      myIteration0->UnLinkNextIteration("Iter_1");
-      ASSERT(!CORBA::is_nil(myHypothesis));
-      myHypothesis->UnLinkIteration("Iter_1");
       myIteration1 = SMESHHOMARD::HOMARD_Iteration::_nil();
     }
   }
@@ -1102,7 +985,6 @@ void HOMARD_Gen_i::AssociateCaseIter(int numIter, const char* labelIter)
     }
 
     myCase->AddIteration(myIteration0->GetName());
-    myIteration0->SetCaseName("Case_1");
   }
   else {
     if (CORBA::is_nil(myIteration1)) {
@@ -1113,7 +995,6 @@ void HOMARD_Gen_i::AssociateCaseIter(int numIter, const char* labelIter)
     }
 
     myCase->AddIteration(myIteration1->GetName());
-    myIteration1->SetCaseName("Case_1");
   }
 }
 
@@ -1436,7 +1317,7 @@ SMESHHOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration()
   myIteration1->SetState(1);
   myIteration1->SetNumber(1);
 
-  int nbitercase = 1; //myCase->GetNumberofIter()
+  int nbitercase = 1;
   char* nomDirIter = CreateDirNameIter(nomDirCase, nbitercase);
   myIteration1->SetDirNameLoc(nomDirIter);
 
@@ -1463,29 +1344,6 @@ SMESHHOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration()
   std::string label = "IterationHomard_" + nomIterParent;
   AssociateCaseIter(1, label.c_str());
 
-  // Lien avec l'iteration precedente
-  myIteration0->LinkNextIteration("Iter_1");
-  myIteration1->SetIterParentName(nomIterParent.c_str());
-
-  // Associate hypothesis
-  if (CORBA::is_nil(myHypothesis)) {
-    SMESHHOMARD::HOMARD_Gen_var engine = POA_SMESHHOMARD::HOMARD_Gen::_this();
-    HOMARD_Hypothesis_i* aServant = new HOMARD_Hypothesis_i(engine);
-    myHypothesis = SMESHHOMARD::HOMARD_Hypothesis::_narrow(aServant->_this());
-    if (CORBA::is_nil(myHypothesis)) {
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Unable to create the hypothesis";
-      throw SALOME::SALOME_Exception(es);
-    }
-    //myHypothesis->SetNivMax(-1);
-    //myHypothesis->SetDiamMin(-1.0);
-    //myHypothesis->SetAdapInit(0);
-    //myHypothesis->SetExtraOutput(1);
-  }
-  myIteration1->SetHypoName("Hypo_1");
-  myHypothesis->LinkIteration("Iter_1");
-
   return SMESHHOMARD::HOMARD_Iteration::_duplicate(myIteration1);
 }
 //=============================================================================
@@ -1731,7 +1589,7 @@ CORBA::Long HOMARD_Gen_i::Compute()
   // B.1. Le répertoire courant
   std::string nomDirWork = getenv("PWD");
   // B.2. Le sous-répertoire de l'iteration a traiter
-  char* DirCompute = ComputeDirManagement(myCase, myIteration1);
+  char* DirCompute = ComputeDirManagement();
   MESSAGE(". DirCompute = " << DirCompute);
 
   // C. Le fichier des messages
@@ -1767,10 +1625,10 @@ CORBA::Long HOMARD_Gen_i::Compute()
   iaux = 1;
   myDriver->TexteMaillageHOMARD(DirCompute, siterp1, iaux);
   myDriver->TexteMaillage(NomMesh, MeshFile, 1);
-  codret = ComputeAdap(myCase, myIteration1, myDriver);
+  codret = ComputeAdap(myDriver);
 
   // E.4. Ajout des informations liees a l'eventuel suivi de frontiere
-  int BoundaryOption = DriverTexteBoundary(myCase, myDriver);
+  int BoundaryOption = DriverTexteBoundary(myDriver);
 
   // E.5. Ecriture du texte dans le fichier
   MESSAGE (". Ecriture du texte dans le fichier de configuration; codret = "<<codret);
@@ -1845,7 +1703,7 @@ CORBA::Long HOMARD_Gen_i::Compute()
   if (codret == 0) {
     if ((BoundaryOption % 5 == 0) && (codretexec == 0)) {
       MESSAGE ("Suivi de frontière CAO");
-      codret = ComputeCAO(myCase, myIteration1);
+      codret = ComputeCAO();
     }
   }
 
@@ -1853,6 +1711,15 @@ CORBA::Long HOMARD_Gen_i::Compute()
     // Python Dump
     PythonDump();
 
+    // Delete log file, if required
+    if (!myIteration1->_is_nil()) {
+      MESSAGE("myIteration1->GetLogFile() = " << myIteration1->GetLogFile());
+      if (_LogInFile && _RemoveLogOnSuccess) {
+        // Remove log file on success
+        SMESH_File(myIteration1->GetLogFile(), false).remove();
+      }
+    }
+
     // Clean all data
     CleanCase();
   }
@@ -1862,30 +1729,15 @@ CORBA::Long HOMARD_Gen_i::Compute()
 
 void HOMARD_Gen_i::CleanCase()
 {
-  // Delete log file, if required
-  if (!myIteration1->_is_nil()) {
-    MESSAGE("myIteration1->GetLogFile() = " << myIteration1->GetLogFile());
-    if (_LogInFile && _RemoveLogOnSuccess) {
-      // Remove log file on success
-      SMESH_File(myIteration1->GetLogFile(), false).remove();
-    }
-  }
+  MESSAGE ("CleanCase");
+  if (myCase->_is_nil()) return;
 
   // Delete all boundaries
-  //std::map<std::string, SMESHHOMARD::HOMARD_Boundary_var>::const_iterator it_boundary;
-  //for (it_boundary  = _mesBoundarys.begin();
-  //     it_boundary != _mesBoundarys.end(); ++it_boundary) {
-  //  DeleteBoundary((*it_boundary).first.c_str());
-  //}
   _mesBoundarys.clear();
 
   // Delete iteration
   DeleteIteration(1);
 
-  // Delete hypothesis
-  // Hypothesis should be deleted only after iteration deletion
-  myHypothesis = SMESHHOMARD::HOMARD_Hypothesis::_nil();
-
   // Delete case
   DeleteCase();
 
@@ -1901,9 +1753,7 @@ void HOMARD_Gen_i::CleanCase()
 //=============================================================================
 // Calcul d'une iteration : partie spécifique à l'adaptation
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::ComputeAdap(SMESHHOMARD::HOMARD_Cas_var myCase,
-                                      SMESHHOMARD::HOMARD_Iteration_var myIteration,
-                                      SMESHHOMARDImpl::HomardDriver* myDriver)
+CORBA::Long HOMARD_Gen_i::ComputeAdap(SMESHHOMARDImpl::HomardDriver* myDriver)
 {
   MESSAGE ("ComputeAdap");
 
@@ -1911,20 +1761,17 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(SMESHHOMARD::HOMARD_Cas_var myCase,
   // A.1. Bases
   int codret = 0;
   // Numero de l'iteration
-  int NumeIter = myIteration->GetNumber();
+  int NumeIter = 1;
   std::stringstream saux0;
   saux0 << NumeIter-1;
   std::string siter = saux0.str();
   if (NumeIter < 11) { siter = "0" + siter; }
 
-  // A.2. On verifie qu il y a une hypothese (erreur improbable);
-  ASSERT(!CORBA::is_nil(myHypothesis));
-
   // B. L'iteration parent
   ASSERT(!CORBA::is_nil(myIteration0));
 
   // C. Le sous-répertoire de l'iteration precedente
-  char* DirComputePa = ComputeDirPaManagement(myCase, myIteration);
+  char* DirComputePa = ComputeDirPaManagement();
   MESSAGE(". DirComputePa = " << DirComputePa);
 
   // D. Les données de l'adaptation HOMARD
@@ -1939,7 +1786,7 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(SMESHHOMARD::HOMARD_Cas_var myCase,
   MESSAGE (". MeshFileParent = " << MeshFileParent);
 
   // D.4. Le maillage associe a l'iteration
-  const char* MeshFile = myIteration->GetMeshFile();
+  const char* MeshFile = myIteration1->GetMeshFile();
   MESSAGE (". MeshFile = " << MeshFile);
   FILE *file = fopen(MeshFile,"r");
   if (file != NULL) {
@@ -1966,36 +1813,20 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(SMESHHOMARD::HOMARD_Cas_var myCase,
     }
   }
 
-  // D.5. Les types de raffinement et de deraffinement
-  // Les appels corba sont lourds, il vaut mieux les grouper
-  //SMESHHOMARD::listeTypes* ListTypes = myHypothesis->GetAdapRefinUnRef();
-  //ASSERT(ListTypes->length() == 3);
-  int TypeAdap = -1; // HomardHypothesis->GetAdapType()
-  int TypeRaff = 1; // HomardHypothesis->GetRefinType()
-  int TypeDera = 0; // HomardHypothesis->GetUnRefType()
-
   // E. Texte du fichier de configuration
   // E.1. Incontournables du texte
   myDriver->TexteAdap();
   int iaux = 0;
   myDriver->TexteMaillageHOMARD(DirComputePa, siter, iaux);
   myDriver->TexteMaillage(NomMeshParent, MeshFileParent, 0);
-  myDriver->TexteConfRaffDera(ConfType, TypeAdap, TypeRaff, TypeDera);
+  myDriver->TexteConfRaffDera(ConfType);
 
   // E.6. Ajout des options avancees
-  //int NivMax = myHypo->GetNivMax();
-  //MESSAGE (". NivMax = " << NivMax);
-  //double DiamMin = myHypo->GetDiamMin();
-  //MESSAGE (". DiamMin = " << DiamMin);
-  //int AdapInit = myHypo->GetAdapInit();
-  //MESSAGE (". AdapInit = " << AdapInit);
-  //int ExtraOutput = myHypo->GetExtraOutput();
-  //MESSAGE (". ExtraOutput = " << ExtraOutput);
   //myDriver->TexteAdvanced(NivMax, DiamMin, AdapInit, ExtraOutput);
   myDriver->TexteAdvanced(-1, -1.0, 0, 1);
 
   // E.7. Ajout des informations sur le deroulement de l'execution
-  int MessInfo = myIteration->GetInfoCompute();
+  int MessInfo = myIteration1->GetInfoCompute();
   MESSAGE (". MessInfo = " << MessInfo);
   myDriver->TexteInfoCompute(MessInfo);
 
@@ -2004,8 +1835,7 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(SMESHHOMARD::HOMARD_Cas_var myCase,
 //=============================================================================
 // Calcul d'une iteration : partie spécifique au suivi de frontière CAO
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::ComputeCAO(SMESHHOMARD::HOMARD_Cas_var myCase,
-                                     SMESHHOMARD::HOMARD_Iteration_var myIteration)
+CORBA::Long HOMARD_Gen_i::ComputeCAO()
 {
   MESSAGE ("ComputeCAO");
 
@@ -2013,9 +1843,9 @@ CORBA::Long HOMARD_Gen_i::ComputeCAO(SMESHHOMARD::HOMARD_Cas_var myCase,
   // A.1. Bases
   int codret = 0;
   // A.2. Le sous-répertoire de l'iteration en cours de traitement
-  char* DirCompute = myIteration->GetDirName();
+  char* DirCompute = myIteration1->GetDirName();
   // A.3. Le maillage résultat de l'iteration en cours de traitement
-  char* MeshFile = myIteration->GetMeshFile();
+  char* MeshFile = myIteration1->GetMeshFile();
 
   // B. Les données pour FrontTrack
   // B.1. Le maillage à modifier
@@ -2077,9 +1907,6 @@ CORBA::Long HOMARD_Gen_i::ComputeCAO(SMESHHOMARD::HOMARD_Cas_var myCase,
   const std::string theXaoFileName = myBoundary->GetDataFile();
   MESSAGE (". theXaoFileName = " << theXaoFileName);
 
-  // B.5. Parallélisme
-  bool theIsParallel = false;
-
   // C. Lancement des projections
   MESSAGE (". Lancement des projections");
 
@@ -2101,15 +1928,11 @@ CORBA::Long HOMARD_Gen_i::ComputeCAO(SMESHHOMARD::HOMARD_Cas_var myCase,
   PyRun_SimpleString(pyCommand.c_str());
   PyGILState_Release(gstate);
 
-  //SMESHHOMARDImpl::FrontTrack* myFrontTrack = new SMESHHOMARDImpl::FrontTrack();
-  //myFrontTrack->track(theInputMedFile, theOutputMedFile,
-  //                    theInputNodeFiles, theXaoFileName, theIsParallel);
-
   // D. Transfert des coordonnées modifiées dans le fichier historique de HOMARD
   //    On lance une exécution spéciale de HOMARD en attendant
   //    de savoir le faire avec MEDCoupling
   MESSAGE (". Transfert des coordonnées");
-  codret = ComputeCAObis(myIteration);
+  codret = ComputeCAObis();
 
   return codret;
 }
@@ -2117,7 +1940,7 @@ CORBA::Long HOMARD_Gen_i::ComputeCAO(SMESHHOMARD::HOMARD_Cas_var myCase,
 //=============================================================================
 // Transfert des coordonnées en suivi de frontière CAO
 //=============================================================================
-CORBA::Long HOMARD_Gen_i::ComputeCAObis(SMESHHOMARD::HOMARD_Iteration_var myIteration)
+CORBA::Long HOMARD_Gen_i::ComputeCAObis()
 {
   MESSAGE ("ComputeCAObis");
 
@@ -2126,7 +1949,7 @@ CORBA::Long HOMARD_Gen_i::ComputeCAObis(SMESHHOMARD::HOMARD_Iteration_var myIter
 
   // A.1. Controle de la possibilite d'agir
   // A.1.1. Etat de l'iteration
-  int etat = myIteration->GetState();
+  int etat = myIteration1->GetState();
   MESSAGE ("etat = " << etat);
   // A.1.2. L'iteration doit être calculee
   if (etat == 1) {
@@ -2138,7 +1961,7 @@ CORBA::Long HOMARD_Gen_i::ComputeCAObis(SMESHHOMARD::HOMARD_Iteration_var myIter
   }
   // A.2. Numero de l'iteration
   //     siterp1 : numero de l'iteration a traiter
-  int NumeIter = myIteration->GetNumber();
+  int NumeIter = myIteration1->GetNumber();
   std::string siterp1;
   std::stringstream saux1;
   saux1 << NumeIter;
@@ -2150,14 +1973,14 @@ CORBA::Long HOMARD_Gen_i::ComputeCAObis(SMESHHOMARD::HOMARD_Iteration_var myIter
   ASSERT(!CORBA::is_nil(myCase));
 
   // A.4. Le sous-répertoire de l'iteration a traiter
-  char* DirCompute = myIteration->GetDirName();
+  char* DirCompute = myIteration1->GetDirName();
   MESSAGE(". DirCompute = " << DirCompute);
 
   // C. Le fichier des messages
   std::string LogFile = DirCompute;
   LogFile += "/Liste." + siterp1 + ".maj_coords.log";
   MESSAGE (". LogFile = " << LogFile);
-  myIteration->SetFileInfo(LogFile.c_str());
+  myIteration1->SetFileInfo(LogFile.c_str());
 
   // D. On passe dans le répertoire de l'iteration a calculer
   MESSAGE (". On passe dans DirCompute = " << DirCompute);
@@ -2169,9 +1992,9 @@ CORBA::Long HOMARD_Gen_i::ComputeCAObis(SMESHHOMARD::HOMARD_Iteration_var myIter
   myDriver->TexteInit(DirCompute, LogFile, "English");
 
   // E.2. Le maillage associe a l'iteration
-  const char* NomMesh = myIteration->GetMeshName();
+  const char* NomMesh = myIteration1->GetMeshName();
   MESSAGE (". NomMesh = " << NomMesh);
-  const char* MeshFile = myIteration->GetMeshFile();
+  const char* MeshFile = myIteration1->GetMeshFile();
   MESSAGE (". MeshFile = " << MeshFile);
 
   // E.3. Les données du traitement HOMARD
@@ -2296,8 +2119,7 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num)
 //=============================================================================
 // Calcul d'une iteration : gestion du répertoire de calcul
 //=============================================================================
-char* HOMARD_Gen_i::ComputeDirManagement(SMESHHOMARD::HOMARD_Cas_var myCase,
-                                         SMESHHOMARD::HOMARD_Iteration_var myIteration)
+char* HOMARD_Gen_i::ComputeDirManagement()
 {
   MESSAGE ("ComputeDirManagement : répertoires pour le calcul");
 
@@ -2313,7 +2135,7 @@ char* HOMARD_Gen_i::ComputeDirManagement(SMESHHOMARD::HOMARD_Cas_var myCase,
 
   // B.3. Le sous-répertoire de l'iteration a calculer, puis le répertoire complet a creer
   // B.3.1. Le nom du sous-répertoire
-  const char* nomDirIt = myIteration->GetDirNameLoc();
+  const char* nomDirIt = myIteration1->GetDirNameLoc();
 
   // B.3.2. Le nom complet du sous-répertoire
   std::stringstream DirCompute;
@@ -2395,8 +2217,7 @@ char* HOMARD_Gen_i::ComputeDirManagement(SMESHHOMARD::HOMARD_Cas_var myCase,
 //=============================================================================
 // Calcul d'une iteration : gestion du répertoire de calcul de l'iteration parent
 //=============================================================================
-char* HOMARD_Gen_i::ComputeDirPaManagement(SMESHHOMARD::HOMARD_Cas_var myCase,
-                                           SMESHHOMARD::HOMARD_Iteration_var myIteration)
+char* HOMARD_Gen_i::ComputeDirPaManagement()
 {
   MESSAGE ("ComputeDirPaManagement : répertoires pour le calcul");
   // Le répertoire du cas
@@ -2421,7 +2242,7 @@ char* HOMARD_Gen_i::ComputeDirPaManagement(SMESHHOMARD::HOMARD_Cas_var myCase,
 //    2. les liens avec les groupes
 //    3. un entier resumant le type de comportement pour les frontieres
 //=============================================================================
-int HOMARD_Gen_i::DriverTexteBoundary(SMESHHOMARD::HOMARD_Cas_var myCase, SMESHHOMARDImpl::HomardDriver* myDriver)
+int HOMARD_Gen_i::DriverTexteBoundary(SMESHHOMARDImpl::HomardDriver* myDriver)
 {
   MESSAGE ("... DriverTexteBoundary");
   // 1. Recuperation des frontieres
index ba025e0571b70a403bc141f33173331374d7b7d6..45c08d9f1fae00079e7c7a592691d5a0166eb934 100644 (file)
@@ -138,27 +138,6 @@ private:
   SMESHHOMARD::HOMARD_Gen_var _gen_i;
 };
 
-class SMESH_I_EXPORT HOMARD_Hypothesis_i : public virtual SALOME::GenericObj_i,
-                                           public virtual POA_SMESHHOMARD::HOMARD_Hypothesis
-{
-public:
-  HOMARD_Hypothesis_i(SMESHHOMARD::HOMARD_Gen_var gen_i);
-  HOMARD_Hypothesis_i();
-
-  virtual ~HOMARD_Hypothesis_i();
-
-  // Generalites
-  void SetExtraOutput(CORBA::Long ExtraOutput);
-  CORBA::Long GetExtraOutput();
-
-  void LinkIteration(const char* NomIteration);
-  void UnLinkIteration(const char* NomIteration);
-
-private:
-  SMESHHOMARDImpl::HOMARD_Hypothesis* myHomardHypothesis;
-  SMESHHOMARD::HOMARD_Gen_var  _gen_i;
-};
-
 class SMESH_I_EXPORT HOMARD_Iteration_i : public virtual SALOME::GenericObj_i,
                                           public virtual POA_SMESHHOMARD::HOMARD_Iteration
 {
@@ -200,15 +179,10 @@ public:
   void                   LinkNextIteration(const char* NomIteration);
   void                   UnLinkNextIteration(const char* NomIteration);
 
-  void                   SetIterParentName(const char* NomIterParent);
-  char*                  GetIterParentName();
-
   // Liens avec les autres structures
   void                   SetCaseName(const char* NomCas);
   char*                  GetCaseName();
 
-  void                   SetHypoName(const char* NomHypo);
-
   // Drivers
   void                   SetInfoCompute(CORBA::Long MessInfo);
   CORBA::Long            GetInfoCompute();
@@ -284,18 +258,12 @@ public:
   char* CreateDirNameIter(const char* nomrep, CORBA::Long num);
 
   CORBA::Long Compute();
-  CORBA::Long ComputeAdap(SMESHHOMARD::HOMARD_Cas_var myCase,
-                          SMESHHOMARD::HOMARD_Iteration_var myIteration,
-                          SMESHHOMARDImpl::HomardDriver* myDriver);
-  CORBA::Long ComputeCAO(SMESHHOMARD::HOMARD_Cas_var myCase,
-                         SMESHHOMARD::HOMARD_Iteration_var myIteration);
-  CORBA::Long ComputeCAObis(SMESHHOMARD::HOMARD_Iteration_var myIteration);
-  char* ComputeDirManagement(SMESHHOMARD::HOMARD_Cas_var myCase,
-                             SMESHHOMARD::HOMARD_Iteration_var myIteration);
-  char* ComputeDirPaManagement(SMESHHOMARD::HOMARD_Cas_var myCase,
-                               SMESHHOMARD::HOMARD_Iteration_var myIteration);
-  int   DriverTexteBoundary(SMESHHOMARD::HOMARD_Cas_var myCase,
-                            SMESHHOMARDImpl::HomardDriver* myDriver);
+  CORBA::Long ComputeAdap(SMESHHOMARDImpl::HomardDriver* myDriver);
+  CORBA::Long ComputeCAO();
+  CORBA::Long ComputeCAObis();
+  char* ComputeDirManagement();
+  char* ComputeDirPaManagement();
+  int   DriverTexteBoundary(SMESHHOMARDImpl::HomardDriver* myDriver);
 
   void PublishResultInSmesh(const char* NomFich, CORBA::Long Option);
   void DeleteResultInSmesh(std::string NomFich, std::string MeshName);
@@ -323,7 +291,6 @@ private:
 private:
   SMESHHOMARDImpl::HOMARD_Gen* myHomard;
   std::map<std::string, SMESHHOMARD::HOMARD_Boundary_var> _mesBoundarys;
-  SMESHHOMARD::HOMARD_Hypothesis_var myHypothesis;
   SMESHHOMARD::HOMARD_Iteration_var  myIteration0;
   SMESHHOMARD::HOMARD_Iteration_var  myIteration1;
   SMESHHOMARD::HOMARD_Cas_var        myCase;