Salome HOME
Introduction de la frontière CAO
authorGerald NICOLAS <gerald.nicolas@edf.fr>
Mon, 15 Jan 2018 10:39:53 +0000 (11:39 +0100)
committerGerald NICOLAS <gerald.nicolas@edf.fr>
Mon, 15 Jan 2018 10:39:53 +0000 (11:39 +0100)
39 files changed:
src/FrontTrack/FrontTrack.cxx
src/FrontTrack/FrontTrack.hxx
src/FrontTrack/FrontTrack_NodesOnGeom.cxx
src/FrontTrack/FrontTrack_Projector.cxx
src/HOMARD/HOMARD_Boundary.cxx
src/HOMARD/HOMARD_Boundary.hxx
src/HOMARD/HOMARD_Cas.cxx
src/HOMARD/HOMARD_Cas.hxx
src/HOMARD/HOMARD_DriverTools.cxx
src/HOMARD/HomardDriver.cxx
src/HOMARD/HomardDriver.hxx
src/HOMARD/YACSDriver.cxx
src/HOMARDGUI/CMakeLists.txt
src/HOMARDGUI/CreateBoundaryCAO.ui [new file with mode: 0755]
src/HOMARDGUI/CreateCase.ui
src/HOMARDGUI/HOMARDGUI.cxx
src/HOMARDGUI/HOMARDGUI_Utils.cxx
src/HOMARDGUI/HOMARDGUI_Utils.h
src/HOMARDGUI/HOMARD_msg_en.ts
src/HOMARDGUI/HOMARD_msg_fr.ts
src/HOMARDGUI/MonCreateBoundaryCAO.cxx [new file with mode: 0755]
src/HOMARDGUI/MonCreateBoundaryCAO.h [new file with mode: 0755]
src/HOMARDGUI/MonCreateCase.cxx
src/HOMARDGUI/MonCreateCase.h
src/HOMARDGUI/MonCreateListGroupCAO.cxx [new file with mode: 0755]
src/HOMARDGUI/MonCreateListGroupCAO.h [new file with mode: 0755]
src/HOMARDGUI/MonEditBoundaryCAO.cxx [new file with mode: 0755]
src/HOMARDGUI/MonEditBoundaryCAO.h [new file with mode: 0755]
src/HOMARDGUI/MonEditBoundaryDi.cxx
src/HOMARDGUI/MonEditCase.cxx
src/HOMARDGUI/MonEditListGroupCAO.cxx [new file with mode: 0755]
src/HOMARDGUI/MonEditListGroupCAO.h [new file with mode: 0755]
src/HOMARD_I/CMakeLists.txt
src/HOMARD_I/HOMARD_Boundary_i.cxx
src/HOMARD_I/HOMARD_Boundary_i.hxx
src/HOMARD_I/HOMARD_Cas_i.cxx
src/HOMARD_I/HOMARD_Cas_i.hxx
src/HOMARD_I/HOMARD_Gen_i.cxx
src/HOMARD_I/HOMARD_Gen_i.hxx

index 7c0706c3e6e4b2e981730b01a570d763a4e5e0eb..1b9a6ffdf42f2e0b0ed603591c191a0c2362f728 100755 (executable)
@@ -22,7 +22,7 @@
  *  \param [in] theInputMedFile - a MED file holding a mesh including nodes that will be
  *         moved onto the geometry
  *  \param [in] theOutputMedFile - a MED file to create, that will hold a modified mesh
- *  \param [in] theNodeFiles - an array of names of files describing groups of nodes that
+ *  \param [in] theInputNodeFiles - an array of names of files describing groups of nodes that
  *         will be moved onto the geometry
  *  \param [in] theXaoFileName - a path to a file in XAO format holding the geometry and
  *         the geometrical groups.
  */
 void FrontTrack::track( const std::string&                 theInputMedFile,
                         const std::string&                 theOutputMedFile,
-                        const std::vector< std::string > & theNodeFiles,
+                        const std::vector< std::string > & theInputNodeFiles,
                         const std::string&                 theXaoFileName,
                         bool                               theIsParallel )
 {
   // check arguments
+#ifdef _DEBUG_
+  std::cout << "FrontTrack::track" << std::endl;
+#endif
 
-  if ( theNodeFiles.empty() )
+  if ( theInputNodeFiles.empty() )
     return;
 
 #ifdef _DEBUG_
-  std::cout << "Input MED file:" << theInputMedFile << std::endl;
+  std::cout << "Input MED file: " << theInputMedFile << std::endl;
 #endif
   if ( !FT_Utils::fileExists( theInputMedFile ))
     throw std::invalid_argument( "Input MED file does not exist: " + theInputMedFile );
 
 #ifdef _DEBUG_
-  std::cout << "Output MED file:" << theOutputMedFile << std::endl;
+  std::cout << "Output MED file: " << theOutputMedFile << std::endl;
 #endif
   if ( !FT_Utils::canWrite( theOutputMedFile ))
     throw std::invalid_argument( "Can't create the output MED file: " + theOutputMedFile );
 
-  for ( size_t i = 0; i < theNodeFiles.size(); ++i )
+  std::vector< std::string > theNodeFiles ;
+  for ( size_t i = 0; i < theInputNodeFiles.size(); ++i )
   {
 #ifdef _DEBUG_
-    std::cout << "Input node file:" << theNodeFiles[i] << std::endl;
+    std::cout << "Initial input node file #"<<i<<": " << theInputNodeFiles[i] << std::endl;
 #endif
-    if ( !FT_Utils::fileExists( theNodeFiles[i] ))
-      throw std::invalid_argument( "Input node file does not exist: " + theNodeFiles[i] );
+    if ( !FT_Utils::fileExists( theInputNodeFiles[i] ))
+      throw std::invalid_argument( "Input node file does not exist: " + theInputNodeFiles[i] );
+    // the name of the groupe on line #1, then the numbers of nodes on line #>1
+    // keep only files with more than 1 line:
+    std::ifstream fichier(theInputNodeFiles[i].c_str());
+    std::string s;
+    unsigned int nb_lines = 0;
+    while(std::getline(fichier,s)) ++nb_lines;
+//     std::cout << ". nb_lines: " << nb_lines << std::endl;
+    if ( nb_lines >= 2 ) { theNodeFiles.push_back( theInputNodeFiles[i] ); }
   }
+#ifdef _DEBUG_
+  for ( size_t i = 0; i < theNodeFiles.size(); ++i )
+  { std::cout << "Valid input node file #"<<i<<": " << theNodeFiles[i] << std::endl; }
+#endif
 
 #ifdef _DEBUG_
-  std::cout << "XAO file:" << theXaoFileName << std::endl;
+  std::cout << "XAO file: " << theXaoFileName << std::endl;
 #endif
   if ( !FT_Utils::fileExists( theXaoFileName ))
     throw std::invalid_argument( "Input XAO file does not exist: " + theXaoFileName );
 
-
   // read a mesh
 
 #ifdef _DEBUG_
index 049cb4bd32e4bf3307e0ba75536d4dcbb9dc5f6f..a53555910cfeb4399b5482b330e95a7fc32fe0ce 100755 (executable)
@@ -15,21 +15,21 @@ public:
 
   /*!
    * \brief Relocate nodes to lie on geometry
-   *  \param [in] inputMedFile - a MED file holding a mesh including nodes that will be
+   *  \param [in] theInputMedFile - a MED file holding a mesh including nodes that will be
    *         moved onto the geometry
-   *  \param [in] outputMedFile - a MED file to create, that will hold a modified mesh
-   *  \param [in] nodeFiles - an array of names of files describing groups of nodes that
+   *  \param [in] theOutputMedFile - a MED file to create, that will hold a modified mesh
+   *  \param [in] theInputNodeFiles - an array of names of files describing groups of nodes that
    *         will be moved onto the geometry
-   *  \param [in] xaoFileName - a path to a file in XAO format  holding the geometry and
+   *  \param [in] theXaoFileName - a path to a file in XAO format  holding the geometry and
    *         the geometrical groups.
-   *  \param [in] isParallel - if \c true, all processors are used to treat boundary shapes
+   *  \param [in] theIsParallel - if \c true, all processors are used to treat boundary shapes
    *          in parallel.
    */
-  void track( const std::string&                 inputMedFile,
-              const std::string&                 outputMedFile,
-              const std::vector< std::string > & nodeFiles,
-              const std::string&                 xaoFileName,
-              bool                               isParallel=true);
+  void track( const std::string&                 theInputMedFile,
+              const std::string&                 theOutputMedFile,
+              const std::vector< std::string > & theInputNodeFiles,
+              const std::string&                 theXaoFileName,
+              bool                               theIsParallel=true);
 
 };
 
index 911358d5519401aa16178d1ae7570ced04dd95fa..5328b6725e8c233728f2f0ea07550edbf06b69e4 100755 (executable)
@@ -55,7 +55,7 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
   // get shape dimension by the file name
   // -------------------------------------
 
-  // hope the file name is something like "fr2D.**"
+  // hope the file name is something like "frnD.**" with n in (1,2)
   int dimPos = theNodeFile.size() - 5;
   if ( theNodeFile[ dimPos ] == '2' )
     _shapeDim = 2;
@@ -63,6 +63,9 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
     _shapeDim = 1;
   else
     throw std::invalid_argument( "Can't define dimension by node file name " + theNodeFile );
+#ifdef _DEBUG_
+  std::cout << ". Dimension of the file " << theNodeFile << ": " << _shapeDim << std::endl;
+#endif
 
   // -------------------------------------
   // read geom group names; several lines
@@ -77,7 +80,9 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
   while ( ::fgets( line, maxLineLen, file )) // read a line
   {
     if ( ::feof( file ))
+    {
       return; // no nodes in the file
+    }
 
     // check if the line describes node ids in format 3I10 (e.g. "       120         1        43\n")
     size_t lineLen = strlen( line );
@@ -149,6 +154,9 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
   for ( size_t i = 0; i < geomNames.size(); ++i )
   {
     std::string & groupName = geomNames[i];
+#ifdef _DEBUG_
+    std::cout << ". Group name: " << groupName << std::endl;
+#endif
 
     // remove trailing white spaces
     for ( int iC = groupName.size() - 1; iC >= 0; --iC )
@@ -219,7 +227,9 @@ void FT_NodesOnGeom::read( const std::string&            theNodeFile,
 void FT_NodesOnGeom::projectAndMove()
 {
   _OK = true;
-
+//
+// 1. Préalables
+//
   // check if all the shapes are planar
   bool isAllPlanar = true;
   for ( size_t i = 0; i < _projectors.size() &&  isAllPlanar; ++i )
@@ -240,6 +250,10 @@ void FT_NodesOnGeom::projectAndMove()
     std::cout << ".. _projectors.size() = " << _projectors.size() << std::endl;
     std::cout << ".. _nodesOrder.size() = " << _nodesOrder.size() << std::endl;
 #endif
+//
+// 2. Calculs
+// 2.1. Avec plusieurs shapes
+//
   if ( _projectors.size() > 1 )
   {
     // the nodes are to be projected onto several boundary shapes;
@@ -284,6 +298,9 @@ void FT_NodesOnGeom::projectAndMove()
       }
     }
   }
+//
+// 2.2. Avec une seule shape
+//
   else // one shape
   {
     for ( size_t i = 0; i < _nodesOrder.size(); ++i )
@@ -293,8 +310,11 @@ void FT_NodesOnGeom::projectAndMove()
       gp_Pnt       xyz1 = getPoint( nn._neighborNodes[0] );
       gp_Pnt       xyz2 = getPoint( nn._neighborNodes[1] );
 
-      // maxDist2 : le quart du carré de la distance entre les deux voisins du noued à bouger
+// maxDist2 : le quart du carré de la distance entre les deux voisins du noeud à bouger
       double   maxDist2 = xyz1.SquareDistance( xyz2 ) / 4.;
+#ifdef _DEBUG_
+    std::cout << "\n.. maxDist2 = " << maxDist2 << " entre " << nn._neighborNodes[0] << " et " << nn._neighborNodes[1] << " - milieu " << nn._nodeToMove << " - d/2 = " << sqrt(maxDist2) << " - d = " << sqrt(xyz1.SquareDistance( xyz2 )) << std::endl;
+#endif
       if ( _projectors[ 0 ].project( xyz, maxDist2, newXyz,
                                      nn._params, nn._nearParams ))
         moveNode( nn._nodeToMove, newXyz );
@@ -302,8 +322,9 @@ void FT_NodesOnGeom::projectAndMove()
         notProjectedNodes.push_back( &nn );
     }
   }
-
-
+//
+// 3. Bilan
+//
   if ( !notProjectedNodes.empty() )
   {
     // project nodes that are not projected by any of _projectors;
index a23d00dc2823b711ad651ef87c64fb10597e0d6a..efc18779f786a79876c291c83b451d21c12a5b7c 100755 (executable)
@@ -104,6 +104,9 @@ namespace // actual projection algorithms
                             double*       newSolution,
                             const double* prevSolution = 0)
     {
+#ifdef _DEBUG_
+    std::cout << ".. project a point to the curve prevSolution = " << prevSolution << std::endl;
+#endif
       gp_Pnt         proj;
       Standard_Real param;
 
@@ -115,6 +118,9 @@ namespace // actual projection algorithms
       {
         _dist = _projector.Project( _curve, P, _tol, proj, param, false );
       }
+#ifdef _DEBUG_
+    std::cout << "..    _dist : " << _dist << std::endl;
+#endif
       proj = _curve.Value( param );
 
       newSolution[0] = param;
@@ -130,6 +136,9 @@ namespace // actual projection algorithms
                                      double*       newSolution,
                                      const double* prevSolution = 0)
     {
+#ifdef _DEBUG_
+    std::cout << ".. project a point to a curve and check " << std::endl;
+#endif
       projection = project( point, newSolution, prevSolution );
       return ( _uRange[0] < newSolution[0] && newSolution[0] < _uRange[1] &&
                _dist * _dist < maxDist2 );
@@ -611,7 +620,7 @@ namespace // actual projection algorithms
   bool isStraight( const GeomAdaptor_Curve& curve, const double tol )
   {
     // rough check: evaluate how far from a straight line connecting the curve ends
-    // stand several internal points of the curve 
+    // stand several internal points of the curve
 
     const double  f = curve.FirstParameter();
     const double  l = curve.LastParameter();
index 48dd23f52453cb2c0391c3204b56333948ea24d7..66cd160f0695dbe1db2ec49e0591b0d62d8d410a 100644 (file)
@@ -77,12 +77,19 @@ std::string HOMARD_Boundary::GetDumpPython() const
 //
   switch (_Type)
   {
+    case -1:
+    {
+      aScript << "CAO boundary " << _Name << "\n";
+      aScript << "\t" << _Name << " = homard.CreateBoundaryCAO(\"" << _Name << "\", ";
+      aScript << "\"" << _DataFile << "\")\n";
+      break ;
+    }
     case 0:
     {
       aScript << "discrete boundary " << _Name << "\n";
       aScript << "\t" << _Name << " = homard.CreateBoundaryDi(\"" << _Name << "\", ";
       aScript << "\"" << _MeshName << "\", ";
-      aScript << "\"" << _MeshFile << "\")\n";
+      aScript << "\"" << _DataFile << "\")\n";
       break ;
     }
     case 1:
@@ -149,14 +156,14 @@ std::string HOMARD_Boundary::GetMeshName() const
   return _MeshName;
 }
 //=============================================================================
-void HOMARD_Boundary::SetMeshFile( const char* MeshFile )
+void HOMARD_Boundary::SetDataFile( const char* DataFile )
 {
-  _MeshFile = std::string( MeshFile );
+  _DataFile = std::string( DataFile );
 }
 //=============================================================================
-std::string HOMARD_Boundary::GetMeshFile() const
+std::string HOMARD_Boundary::GetDataFile() const
 {
-  return _MeshFile;
+  return _DataFile;
 }
 //=======================================================================================
 void HOMARD_Boundary::SetCylinder( double X0, double X1, double X2,
index aa2fd594cc4707740b419a2d88634f274687eee0..322bc5239b04a5125ca4ebf686bc3199de67c5b8 100644 (file)
@@ -63,8 +63,8 @@ public:
   void                          SetMeshName( const char* MeshName );
   std::string                   GetMeshName() const;
 
-  void                          SetMeshFile( const char* MeshFile );
-  std::string                   GetMeshFile() const;
+  void                          SetDataFile( const char* DataFile );
+  std::string                   GetDataFile() const;
 
   void                          SetCylinder( double X0, double X1, double X2, double X3,
                                              double X4, double X5, double X6 );
@@ -92,7 +92,7 @@ public:
 private:
   std::string                   _Name;
   std::string                   _NomCasCreation;
-  std::string                   _MeshFile;
+  std::string                   _DataFile;
   std::string                   _MeshName;
   int                           _Type;
   double                        _Xmin, _Xmax, _Ymin, _Ymax, _Zmin, _Zmax;
index 9e23c1ceede2da695f941fb7408ddc7e715444b0..f92fa262c6a92ac263440052e7d50a1de68ffb41 100644 (file)
@@ -109,11 +109,11 @@ std::string HOMARD_Cas::GetDumpPython() const
 //=============================================================================
 int HOMARD_Cas::SetDirName( const char* NomDir )
 {
-  MESSAGE("SetDirName,  NomDir : "<<NomDir);
-  MESSAGE("SetDirName, _NomDir : "<<_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());
+//   MESSAGE("SetDirName, _ListIter.size() : "<<_ListIter.size());
   if ( _ListIter.size() > 1 ) { erreur = 1 ; }
   // Creation
   if ( CHDIR(NomDir) == 0 )
@@ -220,10 +220,17 @@ void HOMARD_Cas::SupprGroups()
 // Les frontieres
 //
 //=============================================================================
+void HOMARD_Cas::AddBoundary( const char* Boundary )
+{
+//   MESSAGE ( ". HOMARD_Cas::AddBoundary : Boundary = " << Boundary );
+  const char* Group = "";
+  AddBoundaryGroup( Boundary, Group );
+}
+//=============================================================================
 void HOMARD_Cas::AddBoundaryGroup( const char* Boundary, const char* Group )
 {
-//  MESSAGE ( ". AddBoundaryGroup : Boundary = " << Boundary );
-//   MESSAGE ( ". AddBoundaryGroup : Group = " << Group );
+//   MESSAGE ( ". HOMARD_Cas::AddBoundaryGroup : Boundary = " << Boundary );
+//   MESSAGE ( ". HOMARD_Cas::AddBoundaryGroup : Group = " << Group );
   _ListBoundaryGroup.push_back( Boundary );
   _ListBoundaryGroup.push_back( Group    );
 }
index f478539a36d54347413639855ebd9bcea8ec34b6..039368f28e99a5d368c51fe3cde7a0007d1eccab 100644 (file)
@@ -76,6 +76,7 @@ public:
   const std::list<std::string>& GetGroups() const;
   void                          SupprGroups();
 
+  void                          AddBoundary( const char* Boundary );
   void                          AddBoundaryGroup( const char* Boundary, const char* Group );
   const std::list<std::string>& GetBoundaryGroup() const;
   void                          SupprBoundaryGroup();
index 72697d940b8257c2e359740b4dc43a270f8af2e5..6110d3d909c456c95480d803423094f9eae854f8 100644 (file)
@@ -303,10 +303,14 @@ namespace HOMARD
     os << separator() << BoundaryType ;
     os << separator() << boundary.GetCaseCreation() ;
 
-    if ( BoundaryType == 0 )
+    if ( BoundaryType == -1 )
+    {
+      os << separator() << boundary.GetDataFile();
+    }
+    else if ( BoundaryType == 0 )
     {
       os << separator() << boundary.GetMeshName();
-      os << separator() << boundary.GetMeshFile();
+      os << separator() << boundary.GetDataFile();
     }
     else {
       std::vector<double> coor = boundary.GetCoords() ;
@@ -744,12 +748,20 @@ namespace HOMARD
 
     // 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 = 7 ; }
+    if ( BoundaryType == -1 ) { lgcoords = -1 ; }
+    else if ( BoundaryType == 1 ) { lgcoords = 7 ; }
     else if ( BoundaryType == 2 ) { lgcoords = 4 ; }
     else { lgcoords = 0 ; }
 //
-    if ( 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;
@@ -757,7 +769,7 @@ namespace HOMARD
 
       chunk = getNextChunk( stream, start, ok );
       if ( !ok ) return false;
-      boundary.SetMeshFile( chunk.c_str() );
+      boundary.SetDataFile( chunk.c_str() );
     }
     else
     { std::vector<double> coords;
index cb000bb8c6f4a9d0b75238e40c97a7fbb595a15f..1a545d9136064fd02bf587cf31928fab77fbde58 100644 (file)
@@ -85,12 +85,13 @@ void HomardDriver::TexteAdap( int ExtType )
   else                      { _Texte += "CCAssoci saturne_2d\n" ; }
   _Texte += "ModeHOMA 1\n" ;
   _Texte += "NumeIter " + _siter + "\n" ;
+  _modeHOMARD = 1 ;
 //
 }
 //===============================================================================
 void HomardDriver::TexteInfo( int TypeBila, int NumeIter )
 {
-  MESSAGE("TexteInit, TypeBila ="<<TypeBila);
+  MESSAGE("TexteInfo: TypeBila ="<<TypeBila<<", NumeIter ="<<NumeIter);
 //
   _Texte += "ModeHOMA 2\n" ;
   std::stringstream saux1 ;
@@ -109,6 +110,20 @@ void HomardDriver::TexteInfo( int TypeBila, int NumeIter )
     _Texte += "Action   info_ap\n" ;
     _Texte += "CCAssoci homard\n" ;
   }
+  _modeHOMARD = 2 ;
+//
+}
+//===============================================================================
+void HomardDriver::TexteMajCoords( int NumeIter )
+{
+  MESSAGE("TexteMajCoords: NumeIter ="<<NumeIter);
+//
+  _Texte += "ModeHOMA 5\n" ;
+  _Texte += "NumeIter " + _siterp1 + "\n" ;
+  _Texte += "Action   homa\n" ;
+  _Texte += "CCAssoci med\n" ;
+  _Texte += "EcriFiHO N_SANS_FRONTIERE\n" ;
+  _modeHOMARD = 5 ;
 //
 }
 //===============================================================================
@@ -625,7 +640,15 @@ void HomardDriver::TexteBoundaryOption( int 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 )
 {
@@ -1030,10 +1053,12 @@ void HomardDriver::TexteInfoCompute( int MessInfo )
 void HomardDriver::CreeFichier( )
 {
 //
-  if ( _siter != _siterp1 )
+  if ( _modeHOMARD == 1 )
   { _NomFichierConf = _NomFichierConfBase + "." + _siter + ".vers." + _siterp1 ; }
-  else
+  else if ( _modeHOMARD == 2 )
   { _NomFichierConf = _NomFichierConfBase + "." + _siter + ".info" ; }
+  else if ( _modeHOMARD == 5 )
+  { _NomFichierConf = _NomFichierConfBase + ".majc" ; }
 //
   std::ofstream Fic(_NomFichierConf.c_str(), std::ios::out ) ;
   if (Fic.is_open() == true) { Fic << _Texte << std::endl ; }
index f0e4b3932c3c6617b9c844896f82b30f8f314d58..95ac54e4c33f36d8df3c17d0b46d0c614cb986b5 100644 (file)
@@ -35,6 +35,7 @@ public:
   //
   void        TexteInit( const std::string DirCompute, const std::string LogFile, const std::string Langue );
   void        TexteInfo( int TypeBila, int NumeIter );
+  void        TexteMajCoords( int NumeIter );
   void        CreeFichierDonn();
   void        TexteAdap( int ExtType );
   void        CreeFichier();
@@ -50,6 +51,7 @@ public:
   void        TexteCompo( int NumeComp, const std::string NomCompo);
 
   void        TexteBoundaryOption( int BoundaryOption );
+  void        TexteBoundaryCAOGr( const std::string GroupName );
   void        TexteBoundaryDi( const std::string MeshName, const std::string MeshFile );
   void        TexteBoundaryDiGr( const std::string GroupName );
   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 );
@@ -65,6 +67,7 @@ public:
   //
 
 public:
+  int         _modeHOMARD;
   std::string _HOMARD_Exec;
   std::string _NomDir;
   std::string _NomFichierConfBase;
index 2dee97edf510193131af431ae7720432a95b6ced..c7c572536f697fce36e7e28cf4a8e9c2251cfe0b 100644 (file)
@@ -127,7 +127,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho
   _noeud_1 = noeud_2 ;
 // 3. Definition du service
   _Texte += "                           <service name=\"" + noeud_2 + "\">\n" ;
-  _Texte += "                              <node>Etude_Initialisation.UpdateStudy</node>\n" ;
+  _Texte += "                              <node>Etude_Initialisation.SetCurrentStudy</node>\n" ;
   _Texte += "                              <method>" + methode + "</method>\n" ;
 // 4. Les inports
 // 4.1. Le nom de la zone
@@ -293,7 +293,7 @@ std::string YACSDriver::Texte_Iter_1_Boundary( int BoundaryType, const std::stri
   _noeud_1 = noeud_2 ;
 // 3. Definition du service
   _Texte += "                           <service name=\"" + noeud_2 + "\">\n" ;
-  _Texte += "                              <node>Etude_Initialisation.UpdateStudy</node>\n" ;
+  _Texte += "                              <node>Etude_Initialisation.SetCurrentStudy</node>\n" ;
   _Texte += "                              <method>" + methode + "</method>\n" ;
 // 4. Les inports
 //    ATTENTION : les noms doivent etre les memes que dans Gen.xml, donc HOMARD_Gen.idl
index 48382c78708d43d9be48dc1219b1ec56e878cb5b..087093548007dc109db90c1d44bafc8825356dae 100644 (file)
@@ -67,10 +67,11 @@ SET(_ts_RESOURCES
   HOMARD_msg_en.ts
   HOMARD_msg_fr.ts
   HOMARD_msg_ja.ts
-) 
+)
 
 # resource files / to be processed by uic
 SET(_uic_FILES
+  CreateBoundaryCAO.ui
   CreateBoundaryAn.ui
   CreateBoundaryDi.ui
   CreateCase.ui
@@ -90,9 +91,11 @@ SET(_uic_FILES
 # header files / to be processed by moc
 SET(_moc_HEADERS
   HOMARDGUI.h
+  MonCreateBoundaryCAO.h
   MonCreateBoundaryAn.h
-  MonEditBoundaryAn.h
   MonCreateBoundaryDi.h
+  MonEditBoundaryCAO.h
+  MonEditBoundaryAn.h
   MonEditBoundaryDi.h
   MonCreateCase.h
   MonEditCase.h
@@ -101,7 +104,9 @@ SET(_moc_HEADERS
   MonCreateHypothesis.h
   MonEditHypothesis.h
   MonCreateListGroup.h
+  MonCreateListGroupCAO.h
   MonEditListGroup.h
+  MonEditListGroupCAO.h
   MonCreateIteration.h
   MonEditIteration.h
   MonPursueIteration.h
@@ -114,7 +119,7 @@ SET(_moc_HEADERS
 
 # header files / uic wrappings
 QT_WRAP_UIC(_uic_HEADERS ${_uic_FILES})
-  
+
 # header files / static
 SET(_other_HEADERS
   HOMARDGUI_Utils.h
@@ -134,16 +139,20 @@ QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 SET(_other_SOURCES
   HOMARDGUI.cxx
   HOMARDGUI_Utils.cxx
+  MonCreateBoundaryCAO.cxx
   MonCreateBoundaryAn.cxx
-  MonEditBoundaryAn.cxx
   MonCreateBoundaryDi.cxx
+  MonEditBoundaryCAO.cxx
+  MonEditBoundaryAn.cxx
   MonEditBoundaryDi.cxx
   MonCreateCase.cxx
   MonEditCase.cxx
   MonCreateHypothesis.cxx
   MonEditHypothesis.cxx
   MonCreateListGroup.cxx
+  MonCreateListGroupCAO.cxx
   MonEditListGroup.cxx
+  MonEditListGroupCAO.cxx
   MonCreateIteration.cxx
   MonEditIteration.cxx
   MonPursueIteration.cxx
diff --git a/src/HOMARDGUI/CreateBoundaryCAO.ui b/src/HOMARDGUI/CreateBoundaryCAO.ui
new file mode 100755 (executable)
index 0000000..c74c601
--- /dev/null
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CreateBoundaryCAO</class>
+ <widget class="QDialog" name="CreateBoundaryCAO">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>566</width>
+    <height>195</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Get CAO</string>
+  </property>
+  <property name="autoFillBackground">
+   <bool>true</bool>
+  </property>
+  <property name="sizeGripEnabled">
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>9</number>
+   </property>
+   <property name="spacing">
+    <number>6</number>
+   </property>
+   <item row="3" column="0" colspan="3">
+    <widget class="QGroupBox" name="GBButtons">
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="3">
+       <widget class="QPushButton" name="buttonHelp">
+        <property name="text">
+         <string>Help</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QPushButton" name="buttonCancel">
+        <property name="text">
+         <string>Cancel</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QPushButton" name="buttonApply">
+        <property name="text">
+         <string>Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QPushButton" name="buttonOk">
+        <property name="text">
+         <string>OK</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="3">
+    <widget class="QCheckBox" name="CBGroupe">
+     <property name="text">
+      <string>Filtering with groups</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2">
+    <widget class="QLineEdit" name="LEFileName">
+     <property name="minimumSize">
+      <size>
+       <width>370</width>
+       <height>21</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="PushFichier">
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QLabel" name="XAO">
+     <property name="text">
+      <string>XAO</string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="1" colspan="2">
+    <widget class="QLineEdit" name="LEName">
+     <property name="minimumSize">
+      <size>
+       <width>382</width>
+       <height>21</height>
+      </size>
+     </property>
+     <property name="maxLength">
+      <number>32</number>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <widget class="QLabel" name="Name">
+     <property name="text">
+      <string>Name</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index 77c562de36313ccd827eceac7bba7e07deeec7a1..14fe44db98ad72af07930fbdf011aa7cf8175b03 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>600</width>
-    <height>1026</height>
+    <height>1150</height>
    </rect>
   </property>
   <property name="sizePolicy">
      </layout>
     </widget>
    </item>
-   <item row="5" column="0">
+   <item row="5" column="0" colspan="4">
+    <widget class="QGroupBox" name="GBTypeBoun">
+     <property name="title">
+      <string>Boundary type</string>
+     </property>
+     <layout class="QHBoxLayout" name="_3">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <item>
+       <widget class="QRadioButton" name="RBBoundaryNo">
+        <property name="text">
+         <string>No boundary</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBBoundaryCAO">
+        <property name="text">
+         <string>CAO</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="RBBoundaryNonCAO">
+        <property name="text">
+         <string>Non CAO</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="5" column="6">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>1</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="6" column="0" colspan="3">
     <layout class="QHBoxLayout">
      <property name="spacing">
       <number>6</number>
      </item>
     </layout>
    </item>
-   <item row="5" column="3">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>1</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="6" column="2">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>2</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="7" column="0" colspan="4">
-    <widget class="QGroupBox" name="GBBoundaryD">
+   <item row="7" column="0" colspan="2">
+    <widget class="QGroupBox" name="GBBoundaryC">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
        <horstretch>0</horstretch>
       </sizepolicy>
      </property>
      <property name="title">
-      <string>Discrete boundary</string>
+      <string>CAO</string>
      </property>
-     <layout class="QGridLayout">
+     <layout class="QGridLayout" name="_2">
       <property name="margin">
        <number>9</number>
       </property>
        <number>6</number>
       </property>
       <item row="0" column="3">
-       <widget class="QPushButton" name="PBBoundaryDiEdit">
+       <widget class="QPushButton" name="PBBoundaryCAOEdit">
         <property name="text">
          <string>Edit</string>
         </property>
         </property>
        </widget>
       </item>
+      <item row="0" column="4">
+       <widget class="QPushButton" name="PBBoundaryCAOHelp">
+        <property name="text">
+         <string>Help</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QComboBox" name="CBBoundaryCAO">
+        <property name="currentIndex">
+         <number>-1</number>
+        </property>
+        <property name="sizeAdjustPolicy">
+         <enum>QComboBox::AdjustToContents</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <spacer>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeType">
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>13</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
       <item row="0" column="2">
-       <widget class="QPushButton" name="PBBoundaryDiNew">
+       <widget class="QPushButton" name="PBBoundaryCAONew">
         <property name="text">
          <string>New</string>
         </property>
         </property>
        </widget>
       </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="7" column="2">
+    <spacer>
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>2</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="8" column="0" colspan="4">
+    <widget class="QGroupBox" name="GBBoundaryD">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Discrete boundary</string>
+     </property>
+     <layout class="QGridLayout">
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <property name="spacing">
+       <number>6</number>
+      </property>
       <item row="0" column="0">
        <widget class="QComboBox" name="CBBoundaryDi">
         <property name="currentIndex">
         </property>
        </spacer>
       </item>
+      <item row="0" column="3">
+       <widget class="QPushButton" name="PBBoundaryDiEdit">
+        <property name="text">
+         <string>Edit</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
       <item row="0" column="4">
        <widget class="QPushButton" name="PBBoundaryDiHelp">
         <property name="text">
         </property>
        </widget>
       </item>
+      <item row="0" column="2">
+       <widget class="QPushButton" name="PBBoundaryDiNew">
+        <property name="text">
+         <string>New</string>
+        </property>
+        <property name="autoDefault">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
-   <item row="8" column="0" colspan="6">
+   <item row="9" column="0" colspan="7">
     <widget class="QGroupBox" name="GBBoundaryA">
      <property name="minimumSize">
       <size>
      </layout>
     </widget>
    </item>
-   <item row="9" column="0">
+   <item row="10" column="0">
     <spacer name="spacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="10" column="0">
+   <item row="11" column="0">
     <widget class="QCheckBox" name="CBAdvanced">
      <property name="text">
       <string>Advanced options</string>
      </property>
     </widget>
    </item>
-   <item row="11" column="0" colspan="3">
+   <item row="12" column="0" colspan="3">
     <widget class="QGroupBox" name="GBAdvancedOptions">
      <property name="title">
       <string>Advanced options</string>
            </item>
           </layout>
          </item>
-        </layout>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QGroupBox" name="GBFormat">
-        <property name="title">
-         <string>Format</string>
-        </property>
-        <layout class="QGridLayout" name="gridLayout">
-         <item row="0" column="0">
-          <widget class="QRadioButton" name="RBMED">
-           <property name="text">
-            <string>MED</string>
-           </property>
-           <property name="checked">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <widget class="QRadioButton" name="RBSaturne">
-           <property name="text">
-            <string>Saturne</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="2">
-          <widget class="QRadioButton" name="RBSaturne2D">
-           <property name="text">
-            <string>Saturne 2D</string>
+         <item row="1" column="0">
+          <widget class="QGroupBox" name="GBFormat">
+           <property name="title">
+            <string>Format</string>
            </property>
+           <layout class="QGridLayout" name="gridLayout">
+            <item row="0" column="0">
+             <widget class="QRadioButton" name="RBMED">
+              <property name="text">
+               <string>MED</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QRadioButton" name="RBSaturne">
+              <property name="text">
+               <string>Saturne</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="2">
+             <widget class="QRadioButton" name="RBSaturne2D">
+              <property name="text">
+               <string>Saturne 2D</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
           </widget>
          </item>
         </layout>
      </layout>
     </widget>
    </item>
-   <item row="11" column="5">
+   <item row="12" column="4" colspan="3">
     <spacer name="spacer_3">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
     </spacer>
    </item>
-   <item row="12" column="0">
+   <item row="13" column="0">
     <spacer name="spacer_4">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </spacer>
    </item>
-   <item row="13" column="0">
+   <item row="14" column="0">
     <widget class="QLabel" name="Comment">
      <property name="text">
       <string> No comment.</string>
      </property>
     </widget>
    </item>
-   <item row="14" column="0">
+   <item row="14" column="1">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>35</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="15" column="0" colspan="2">
     <widget class="QGroupBox" name="GroupButtons">
      <property name="title">
       <string/>
      </layout>
     </widget>
    </item>
-   <item row="14" column="1">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>35</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="14" column="4" colspan="2">
+   <item row="15" column="3" colspan="2">
     <spacer name="spacer_2">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
     </spacer>
    </item>
   </layout>
+  <zorder>WName</zorder>
+  <zorder>GBTypeConf</zorder>
+  <zorder>GBBoundaryD</zorder>
+  <zorder>GBBoundaryA</zorder>
+  <zorder>CBAdvanced</zorder>
+  <zorder>GBAdvancedOptions</zorder>
+  <zorder>Comment</zorder>
+  <zorder>GroupButtons</zorder>
+  <zorder>GBBoundaryC</zorder>
+  <zorder>GBTypeBoun</zorder>
  </widget>
  <resources/>
  <connections/>
index 3d582396fdecaa4b33c3ebef09f9d3d1c061d4eb..e5e5c11c00295c08b2e43c7a8ec1afec6b7758c2 100644 (file)
@@ -59,6 +59,7 @@
 #include "MonCreateIteration.h"
 #include "MonPursueIteration.h"
 #include "MonCreateYACS.h"
+#include "MonEditBoundaryCAO.h"
 #include "MonEditBoundaryAn.h"
 #include "MonEditBoundaryDi.h"
 #include "MonEditCase.h"
@@ -465,8 +466,14 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       _PTR(SObject) obj = chercheMonObjet();
       if (obj)
       {
+        // Edition d'une frontiere CAO
+        if (HOMARD_UTILS::isBoundaryCAO(obj))
+        {
+          MonEditBoundaryCAO *aDlg = new MonEditBoundaryCAO(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
+          aDlg->show();
+        }
         // Edition d'une frontiere discrete
-        if (HOMARD_UTILS::isBoundaryDi(obj))
+        else if (HOMARD_UTILS::isBoundaryDi(obj))
         {
           MonEditBoundaryDi *aDlg = new MonEditBoundaryDi(0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), QString(""), _ObjectName ) ;
           aDlg->show();
@@ -521,7 +528,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID)
       if (obj)
       {
         // Suppression d'une frontiere
-        if ( HOMARD_UTILS::isBoundaryDi(obj) || HOMARD_UTILS::isBoundaryAn(obj) )
+        if ( HOMARD_UTILS::isBoundaryCAO(obj) || HOMARD_UTILS::isBoundaryDi(obj) || HOMARD_UTILS::isBoundaryAn(obj) )
         {
           try
           { homardGen->DeleteBoundary(_ObjectName.toStdString().c_str()); }
@@ -755,7 +762,12 @@ void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& t
     bool DeleteObject = false ;
     bool EditObject = false ;
 //
-    if ( HOMARD_UTILS::isBoundaryAn(obj) )
+    if ( HOMARD_UTILS::isBoundaryCAO(obj) )
+    {
+      EditObject = true ;
+      DeleteObject = true ;
+    }
+    else if ( HOMARD_UTILS::isBoundaryAn(obj) )
     {
       EditObject = true ;
       DeleteObject = true ;
index 1f5abdc0b64c296c457ef5de219a533279f801b8..97aa1e1a087a2ba1249b9fe43a846ebb365d1d21 100644 (file)
@@ -186,6 +186,13 @@ bool HOMARD_UTILS::isObject(_PTR(SObject) MonObj, QString TypeObject, int option
   return bOK ;
 }
 //================================================================
+// Retourne vrai si l'objet est une frontiere CAO
+//================================================================
+bool HOMARD_UTILS::isBoundaryCAO(_PTR(SObject) MonObj)
+{
+   return isObject( MonObj, QString("BoundaryCAOHomard"), -1 ) ;
+}
+//================================================================
 // Retourne vrai si l'objet est une frontiere analytique
 //================================================================
 bool HOMARD_UTILS::isBoundaryAn(_PTR(SObject) MonObj)
index 2946cf541ed463454169bcba15333903e51721e0..762c46beacde6cc4e5f8567a2bfbcf8153407d15 100644 (file)
@@ -71,6 +71,7 @@ namespace HOMARD_UTILS {
                                       // Function returns the last selected object in the list
                                        // of selected objects
 
+  HOMARD_EXPORT bool isBoundaryCAO(_PTR(SObject)  MonObj);
   HOMARD_EXPORT bool isBoundaryAn(_PTR(SObject)  MonObj);
   HOMARD_EXPORT bool isBoundaryDi(_PTR(SObject)  MonObj);
   HOMARD_EXPORT bool isCase(_PTR(SObject)  MonObj);
index b95385fd69f96a40d2c9c7b3d95522224ba38ac3..26c84aa1d154e7291ddf72ff714d48f0dd85c156 100644 (file)
         <source>HOM_BOUN_MESH</source>
         <translation>The file for the mesh of the boundary must be selected.</translation>
     </message>
+    <message>
+        <source>HOM_BOUN_CAO</source>
+        <translation>The file for the CAO must be selected.</translation>
+    </message>
     <message>
         <source>HOM_BOUN_CASE</source>
         <translation>The meshfile of the case is unknown.</translation>
         <source>HOM_AXE</source>
         <translation>The axis must be a non 0 vector.</translation>
     </message>
+    <message>
+        <source>HOM_BOUN_C_EDIT_WINDOW_TITLE</source>
+        <translation>Edition of a CAO based boundary</translation>
+    </message>
     <message>
         <source>HOM_BOUN_A_EDIT_WINDOW_TITLE</source>
         <translation>Edition of an analytical boundary</translation>
index 2026c26b82edbccfbb12c06ed9757ee93349b6ee..56140368b33a94dc2bbf5806ef9a1efffd4d24c4 100644 (file)
@@ -29,7 +29,7 @@
     </message>
     <message>
         <source>HOM_MEN_PURSUE_ITERATION</source>
-        <translation>Cas de poursuite d&apos;une itération</translation>
+        <translation>Cas de poursuite d'une itération</translation>
     </message>
     <message>
         <source>HOM_MEN_COMPUTE</source>
@@ -77,7 +77,7 @@
     </message>
     <message>
         <source>HOM_TOP_PURSUE_ITERATION</source>
-        <translation>Cas de poursuite d&apos;une itération</translation>
+        <translation>Cas de poursuite d'une itération</translation>
     </message>
     <message>
         <source>HOM_TOP_COMPUTE</source>
     </message>
     <message>
         <source>HOM_STB_PURSUE_ITERATION</source>
-        <translation>Cas de poursuite d&apos;une itération</translation>
+        <translation>Cas de poursuite d'une itération</translation>
     </message>
     <message>
         <source>HOM_STB_COMPUTE</source>
     </message>
     <message>
         <source>HOM_SELECT_FILE_3</source>
-        <translation>Impossible d&apos;ouvrir ce fichier.</translation>
+        <translation>Impossible d'ouvrir ce fichier.</translation>
     </message>
     <message>
         <source>HOM_SCRIPT_FILE</source>
     </message>
     <message>
         <source>HOM_MED_FILE_3</source>
-        <translation>Ce fichier MED contient plus d&apos;un maillage.</translation>
+        <translation>Ce fichier MED contient plus d'un maillage.</translation>
     </message>
     <message>
         <source>HOM_MED_FILE_4</source>
     </message>
     <message>
         <source>Create a case</source>
-        <translation>Création d&apos;un cas</translation>
+        <translation>Création d'un cas</translation>
     </message>
     <message>
         <source>HOM_CASE_NAME</source>
     </message>
     <message>
         <source>HOM_START_DIRECTORY_1</source>
-        <translation>Il faut choisir un répertoire contenant l&apos;itération à poursuivre.</translation>
+        <translation>Il faut choisir un répertoire contenant l'itération à poursuivre.</translation>
     </message>
     <message>
         <source>HOM_START_DIRECTORY_3</source>
-        <translation>Un répertoire valide contenant l&apos;itération à poursuivre doit être choisi.</translation>
+        <translation>Un répertoire valide contenant l'itération à poursuivre doit être choisi.</translation>
     </message>
     <message>
         <source>HOM_CASE_MESH</source>
     </message>
     <message>
         <source>HOM_CASE_GROUP</source>
-        <translation>Le groupe &quot;%1&quot; ne peut pas être attribué à plus d&apos;une frontière.</translation>
+        <translation>Le groupe &quot;%1&quot; ne peut pas être attribué à plus d'une frontière.</translation>
     </message>
     <message>
         <source>HOM_CASE_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;un cas</translation>
+        <translation>Edition d'un cas</translation>
     </message>
     <message>
         <source>HOM_CASE_EDIT_STATE_0</source>
     </message>
     <message>
         <source>HOM_CASE_EDIT_STATE</source>
-        <translation>Poursuite d&apos;une itération.</translation>
+        <translation>Poursuite d'une itération.</translation>
     </message>
     <message>
         <source>HOM_CASE_PURSUE_WINDOW_TITLE</source>
-        <translation>Cas de poursuite d&apos;une itération</translation>
+        <translation>Cas de poursuite d'une itération</translation>
     </message>
     <message>
         <source>The configuration file cannot be found.</source>
     </message>
     <message>
         <source>HOM_ITER_NAME</source>
-        <translation>Il faut donner un nom à l&apos;itération.</translation>
+        <translation>Il faut donner un nom à l'itération.</translation>
     </message>
     <message>
         <source>HOM_ITER_STARTING_POINT</source>
-        <translation>Il faut désigner l&apos;itération précédente.</translation>
+        <translation>Il faut désigner l'itération précédente.</translation>
     </message>
     <message>
         <source>HOM_ITER_MESH</source>
     </message>
     <message>
         <source>HOM_ITER_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une itération</translation>
+        <translation>Edition d'une itération</translation>
+    </message>
+    <message>
+        <source>Boundary type</source>
+        <translation>Type de frontière</translation>
+    </message>
+    <message>
+        <source>No boundary</source>
+        <translation>Pas de frontière</translation>
+    </message>
+    <message>
+        <source>Non CAO</source>
+        <translation>Autre que CAO</translation>
     </message>
     <message>
         <source>Discrete boundary</source>
     </message>
     <message>
         <source>Initialization of adaptation</source>
-        <translation>Initialisation de l&apos;adaptation</translation>
+        <translation>Initialisation de l'adaptation</translation>
     </message>
     <message>
         <source>Maximal level</source>
     </message>
     <message>
         <source>Create an iteration</source>
-        <translation>Création d&apos;une itération</translation>
+        <translation>Création d'une itération</translation>
     </message>
     <message>
         <source>Iteration Name</source>
-        <translation>Nom de l&apos;itération</translation>
+        <translation>Nom de l'itération</translation>
     </message>
     <message>
         <source>Previous iteration</source>
     </message>
     <message>
         <source>The parent iteration is not defined.</source>
-        <translation>L&apos;itération parent n&apos;est pas définie.</translation>
+        <translation>L'itération parent n'est pas définie.</translation>
     </message>
     <message>
         <source>Unable to create the iteration.</source>
-        <translation>Impossible de créer l&apos;itération.</translation>
+        <translation>Impossible de créer l'itération.</translation>
     </message>
     <message>
         <source>The directory for the computation cannot be created.</source>
-        <translation>Impossible de créer le répertoire pour le calcul de l&apos;itération.</translation>
+        <translation>Impossible de créer le répertoire pour le calcul de l'itération.</translation>
     </message>
     <message>
         <source>This iteration is the first of the case and cannot be computed.</source>
     </message>
     <message>
         <source>This iteration does not have any associated hypothesis.</source>
-        <translation>Cette itération n&apos;est associée à aucune hypothèse.</translation>
+        <translation>Cette itération n'est associée à aucune hypothèse.</translation>
     </message>
     <message>
         <source>The mesh file does not exist.</source>
-        <translation>Le fichier du maillage n&apos;existe pas.</translation>
+        <translation>Le fichier du maillage n'existe pas.</translation>
     </message>
     <message>
         <source>The mesh file cannot be deleted.</source>
     </message>
     <message>
         <source>Rank</source>
-        <translation>Numéro d&apos;ordre</translation>
+        <translation>Numéro d'ordre</translation>
     </message>
     <message>
         <source>Hypothesis</source>
     </message>
     <message>
         <source>Create an hypothesis</source>
-        <translation>Création d&apos;une hypothèse</translation>
+        <translation>Création d'une hypothèse</translation>
     </message>
     <message>
         <source>HOM_HYPO_NAME</source>
-        <translation>Il faut donner un nom à l&apos;hypothèse.</translation>
+        <translation>Il faut donner un nom à l'hypothèse.</translation>
     </message>
     <message>
         <source>HOM_HYPO_FIELD_FILE</source>
     </message>
     <message>
         <source>HOM_HYPO_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une hypothèse</translation>
+        <translation>Edition d'une hypothèse</translation>
     </message>
     <message>
         <source>Type of adaptation</source>
-        <translation>Type d&apos;adaptation</translation>
+        <translation>Type d'adaptation</translation>
     </message>
     <message>
         <source>Uniform</source>
     </message>
     <message>
         <source>Governing field for the adaptation</source>
-        <translation>Champ pilotant l&apos;adaptation</translation>
+        <translation>Champ pilotant l'adaptation</translation>
     </message>
     <message>
         <source>Field name</source>
     </message>
     <message>
         <source>Create a zone</source>
-        <translation>Création d&apos;une zone</translation>
+        <translation>Création d'une zone</translation>
     </message>
     <message>
         <source>HOM_ZONE_NAME</source>
     </message>
     <message>
         <source>HOM_ZONE_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une zone</translation>
+        <translation>Edition d'une zone</translation>
     </message>
     <message>
         <source>Type of zone</source>
         <source>Coordinates</source>
         <translation>Coordonnées</translation>
     </message>
+    <message>
+        <source>Get CAO</source>
+        <translation>Acquisition de la CAO</translation>
+    </message>
     <message>
         <source>Create an analytical boundary</source>
-        <translation>Création d&apos;une frontière analytique</translation>
+        <translation>Création d'une frontière analytique</translation>
     </message>
     <message>
         <source>Create a discrete boundary</source>
-        <translation>Création d&apos;une frontière discrète</translation>
+        <translation>Création d'une frontière discrète</translation>
     </message>
     <message>
         <source>Type of boundary</source>
     </message>
     <message>
         <source>HOM_BOUN_MESH</source>
-        <translation>Il faut choisir le maillage qui contient la frontière.</translation>
+        <translation>Il faut choisir le fichier qui contient le maillage de la frontière discrète.</translation>
+    </message>
+    <message>
+        <source>HOM_BOUN_CAO</source>
+        <translation>Il faut choisir le fichier qui contient la CAO.</translation>
     </message>
     <message>
         <source>HOM_BOUN_CASE</source>
     </message>
     <message>
         <source>HOM_AXE</source>
-        <translation>L&apos;axe doit être un vecteur non nul.</translation>
+        <translation>L'axe doit être un vecteur non nul.</translation>
+    </message>
+    <message>
+        <source>HOM_BOUN_C_EDIT_WINDOW_TITLE</source>
+        <translation>Edition d'une frontière basée sur une CAO</translation>
     </message>
     <message>
         <source>HOM_BOUN_A_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une frontière analytique</translation>
+        <translation>Edition d'une frontière analytique</translation>
     </message>
     <message>
         <source>HOM_BOUN_D_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;une frontière discrète</translation>
+        <translation>Edition d'une frontière discrète</translation>
     </message>
     <message>
         <source>HOM_GROU_EDIT_WINDOW_TITLE</source>
     </message>
     <message>
         <source>The axis must be a non 0 vector.</source>
-        <translation>L&apos;axe doit être un vecteur non nul.</translation>
+        <translation>L'axe doit être un vecteur non nul.</translation>
     </message>
     <message>
         <source>The angle must be included higher than 0 degree and lower than 90 degrees.</source>
-        <translation>L&apos;angle doit être compris entre 0 et 90 degrés.</translation>
+        <translation>L'angle doit être compris entre 0 et 90 degrés.</translation>
     </message>
     <message>
         <source>The radius must be different.</source>
     </message>
     <message>
         <source>The orientation must be 1, 2 or 3.</source>
-        <translation>L&apos;orientation vaut 1, 2 ou 3.</translation>
+        <translation>L'orientation vaut 1, 2 ou 3.</translation>
     </message>
     <message>
         <source>HOM_MESH_INFO_0</source>
     </message>
     <message>
         <source>HOM_MESH_INFO_2</source>
-        <translation>Bilan de l&apos;analyse dans l&apos;arbre d&apos;études, fichier </translation>
+        <translation>Bilan de l'analyse dans l'arbre d'études, fichier </translation>
     </message>
     <message>
         <source>Filtering with groups</source>
     </message>
     <message>
         <source>Information on a mesh</source>
-        <translation>Analyse d&apos;un maillage</translation>
+        <translation>Analyse d'un maillage</translation>
     </message>
     <message>
         <source>Group size</source>
     </message>
     <message>
         <source>From an iteration</source>
-        <translation>A partir d&apos;une itération</translation>
+        <translation>A partir d'une itération</translation>
     </message>
     <message>
         <source>From a case</source>
-        <translation>A partir d&apos;un cas</translation>
+        <translation>A partir d'un cas</translation>
     </message>
     <message>
         <source>Iteration into the case</source>
-        <translation>Choix d&apos;une itération dans le cas</translation>
+        <translation>Choix d'une itération dans le cas</translation>
     </message>
     <message>
         <source>Last iteration</source>
     </message>
     <message>
         <source>Iteration number</source>
-        <translation>A partir d&apos;une itération numérotée</translation>
+        <translation>A partir d'une itération numérotée</translation>
     </message>
     <message>
         <source>The directory of the case does not exist.</source>
-        <translation>Le répertoire du cas n&apos;existe pas.</translation>
+        <translation>Le répertoire du cas n'existe pas.</translation>
     </message>
     <message>
         <source>The directory for the case cannot be modified because some iterations are already defined.</source>
     </message>
     <message>
         <source>The directory for the case cannot be reached.</source>
-        <translation>Impossible d&apos;atteindre ce répertoire pour le cas.</translation>
+        <translation>Impossible d'atteindre ce répertoire pour le cas.</translation>
     </message>
     <message>
         <source>The starting point for the case cannot be copied into the working directory.</source>
     </message>
     <message>
         <source>The directory of the case for the pursuit does not exist.</source>
-        <translation>Le répertoire du cas de reprise n&apos;existe pas.</translation>
+        <translation>Le répertoire du cas de reprise n'existe pas.</translation>
     </message>
     <message>
         <source>The directory of the iteration does not exist.</source>
-        <translation>Le répertoire de l&apos;itération de reprise n&apos;existe pas.</translation>
+        <translation>Le répertoire de l'itération de reprise n'existe pas.</translation>
     </message>
     <message>
         <source>The number of iteration must be positive.</source>
-        <translation>Le numéro de l&apos;itération doit etre positif.</translation>
+        <translation>Le numéro de l'itération doit etre positif.</translation>
     </message>
     <message>
         <source>Number of iteration</source>
-        <translation>Numéro de l&apos;itération</translation>
+        <translation>Numéro de l'itération</translation>
     </message>
     <message>
         <source>Case</source>
     </message>
     <message>
         <source>Edit a file</source>
-        <translation>Affichage d&apos;un fichier</translation>
+        <translation>Affichage d'un fichier</translation>
     </message>
     <message>
         <source>Print</source>
     </message>
     <message>
         <source>HOM_YACS_EDIT_WINDOW_TITLE</source>
-        <translation>Edition d&apos;un schéma YACS</translation>
+        <translation>Edition d'un schéma YACS</translation>
     </message>
     <message>
         <source>PREF_TAB_GENERAL</source>
     </message>
     <message>
         <source>PREF_PUBLICATION_MAILLAGE_IN</source>
-        <translation>Les maillages d&apos;entrée</translation>
+        <translation>Les maillages d'entrée</translation>
     </message>
     <message>
         <source>PREF_PUBLICATION_MAILLAGE_OUT</source>
diff --git a/src/HOMARDGUI/MonCreateBoundaryCAO.cxx b/src/HOMARDGUI/MonCreateBoundaryCAO.cxx
new file mode 100755 (executable)
index 0000000..efefdeb
--- /dev/null
@@ -0,0 +1,202 @@
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "MonCreateBoundaryCAO.h"
+#include "MonCreateListGroupCAO.h"
+#include "MonCreateCase.h"
+
+#include <QFileDialog>
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+using namespace std;
+
+// -------------------------------------------------------------------------------
+MonCreateBoundaryCAO::MonCreateBoundaryCAO(MonCreateCase* parent, bool modal,
+                                         HOMARD::HOMARD_Gen_var myHomardGen0,
+                                         QString caseName, QString aName)
+// ---------------------------------------------------------------------------------
+/* Constructs a MonCreateBoundaryCAO */
+    :
+    QDialog(0), Ui_CreateBoundaryCAO(),
+    _parent(parent), _aName(aName),
+    myHomardGen(HOMARD::HOMARD_Gen::_duplicate(myHomardGen0)),
+    _aCaseName(caseName)
+    {
+      MESSAGE("Constructeur") ;
+      setupUi(this);
+      setModal(modal);
+      InitConnect();
+
+     if ( _aName == QString("") ) {SetNewName();};
+    }
+
+// ------------------------------------------------------------------------
+MonCreateBoundaryCAO::~MonCreateBoundaryCAO()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( PushFichier,  SIGNAL(pressed()), this, SLOT(SetCAOFile()));
+    connect( buttonOk,     SIGNAL(pressed()), this, SLOT( PushOnOK()));
+    connect( buttonApply,  SIGNAL(pressed()), this, SLOT( PushOnApply()));
+    connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close()));
+    connect( buttonHelp,   SIGNAL(pressed()), this, SLOT( PushOnHelp()));
+    connect( CBGroupe,     SIGNAL(stateChanged(int)), this, SLOT( SetFiltrage()));
+}
+
+// ------------------------------------------------------------------------
+bool MonCreateBoundaryCAO::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+//
+{
+// Verifications
+
+  QString aName=LEName->text().trimmed();
+  if (aName=="") {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_BOUN_NAME") );
+    return false;
+  }
+
+//  La CAO
+  QString aCAOFile=LEFileName->text().trimmed();
+  if (aCAOFile ==QString(""))
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_BOUN_CAO") );
+    return false;
+  }
+
+// Creation de l'objet CORBA si ce n'est pas deja fait sous le meme nom
+  if ( _aName != aName )
+  {
+   try
+   {
+     _aName=aName;
+     aBoundary=myHomardGen->CreateBoundaryCAO(CORBA::string_dup(_aName.toStdString().c_str()), aCAOFile.toStdString().c_str());
+     _parent->AddBoundaryCAO(_aName);
+     aBoundary->SetCaseCreation(_aCaseName.toStdString().c_str());
+   }
+   catch( SALOME::SALOME_Exception& S_ex )
+   {
+      QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+      return false;
+   }
+  }
+
+// Les groupes
+  AssocieLesGroupes();
+
+  HOMARD_UTILS::updateObjBrowser();
+  return true;
+}
+
+
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     if (PushOnApply()) this->close();
+     if ( _parent ) { _parent->raise(); _parent->activateWindow(); };
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  std::string LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("CAO"), QString(LanguageShort.c_str()));
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::AssocieLesGroupes()
+// ------------------------------------------------------------------------
+{
+  HOMARD::ListGroupType_var aSeqGroupe = new HOMARD::ListGroupType;
+  aSeqGroupe->length(_listeGroupesBoundary.size());
+  QStringList::const_iterator it;
+  int i=0;
+  for (it = _listeGroupesBoundary.constBegin(); it != _listeGroupesBoundary.constEnd(); it++)
+     aSeqGroupe[i++]=(*it).toStdString().c_str();
+  aBoundary->SetGroups(aSeqGroupe);
+
+}
+
+// -------------------------------------------------
+void MonCreateBoundaryCAO::SetNewName()
+// --------------------------------------------------
+{
+
+  HOMARD::listeBoundarys_var  MyObjects = myHomardGen->GetAllBoundarysName();
+  int num = 0; QString aName="";
+  while (aName == QString("") )
+  {
+    aName.setNum(num+1) ;
+    aName.insert(0, QString("Boun_")) ;
+    for ( int i=0; i<MyObjects->length(); i++)
+    {
+      if ( aName ==  QString(MyObjects[i]))
+      {
+        num ++ ;
+        aName = "" ;
+        break ;
+      }
+   }
+  }
+  LEName->setText(aName);
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::SetCAOFile()
+// ------------------------------------------------------------------------
+{
+  QString aCAOFile = HOMARD_QT_COMMUN::PushNomFichier( false, QString("xao") );
+  if (!(aCAOFile.isEmpty())) LEFileName->setText(aCAOFile);
+}
+
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::setGroups (QStringList listGroup)
+// ------------------------------------------------------------------------
+{
+    _listeGroupesBoundary = listGroup;
+}
+// ------------------------------------------------------------------------
+void MonCreateBoundaryCAO::SetFiltrage()
+// // ------------------------------------------------------------------------
+{
+  if (!CBGroupe->isChecked()) return;
+  if (_aCaseName.toStdString().c_str() == QString()) {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_BOUN_CASE") );
+    return;
+  }
+
+  MonCreateListGroupCAO *aDlg = new MonCreateListGroupCAO(NULL, this, true, HOMARD::HOMARD_Gen::_duplicate(myHomardGen),
+                            _aCaseName, _listeGroupesBoundary) ;
+  aDlg->show();
+}
+
diff --git a/src/HOMARDGUI/MonCreateBoundaryCAO.h b/src/HOMARDGUI/MonCreateBoundaryCAO.h
new file mode 100755 (executable)
index 0000000..7f135ab
--- /dev/null
@@ -0,0 +1,73 @@
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MON_CREATEBOUNDARYCAO_H
+#define MON_CREATEBOUNDARYCAO_H
+
+#include "HOMARDGUI_Exports.hxx"
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+#include CORBA_CLIENT_HEADER(HOMARD_Boundary)
+
+#include "ui_CreateBoundaryCAO.h"
+#include <QDialog>
+
+class MonCreateCase;
+class HOMARD_EXPORT MonCreateBoundaryCAO : public QDialog, public Ui_CreateBoundaryCAO
+{
+    Q_OBJECT
+
+public:
+    MonCreateBoundaryCAO( MonCreateCase* parent, bool modal,
+                         HOMARD::HOMARD_Gen_var myHomardGen,
+                         QString caseName, QString BoundaryName );
+    ~MonCreateBoundaryCAO();
+    virtual void setGroups (QStringList listGroup);
+
+protected :
+
+    MonCreateCase *_parent;
+
+    QString _aName;
+    QString _aCaseName;
+
+
+    HOMARD::HOMARD_Boundary_var aBoundary;
+    HOMARD::HOMARD_Gen_var myHomardGen;
+
+    QStringList  _listeGroupesBoundary;
+
+    virtual void AssocieLesGroupes();
+    virtual void InitConnect();
+    virtual void SetNewName();
+
+public slots:
+
+    virtual void SetCAOFile();
+    virtual void SetFiltrage();
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+};
+
+#endif // MON_CREATEBOUNDARYCAO_H
index a912f79cfe30d62ff63f7407b6db8b142a279a71..657ea9c1607456b17dcba2baf28bc68c847389e3 100644 (file)
@@ -18,6 +18,8 @@
 //
 
 #include "MonCreateCase.h"
+#include "MonCreateBoundaryCAO.h"
+#include "MonEditBoundaryCAO.h"
 #include "MonCreateBoundaryAn.h"
 #include "MonEditBoundaryAn.h"
 #include "MonCreateBoundaryDi.h"
@@ -59,8 +61,14 @@ MonCreateCase::MonCreateCase( bool modal, HOMARD::HOMARD_Gen_var myHomardGen0 )
   InitConnect();
 
   SetNewName() ;
+
+  GBBoundaryC->setVisible(0);
   GBBoundaryA->setVisible(0);
   GBBoundaryD->setVisible(0);
+
+  CBBoundaryA->setVisible(0);
+  CBBoundaryD->setVisible(0);
+
   GBAdvancedOptions->setVisible(0);
   Comment->setVisible(0);
   CBPyramid->setChecked(false);
@@ -79,21 +87,28 @@ MonCreateCase::~MonCreateCase()
 void MonCreateCase::InitConnect()
 // ------------------------------------------------------------------------
 {
-    connect( LEName,     SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
-    connect( PushDir,        SIGNAL(pressed()), this, SLOT(SetDirName()));
-    connect( PushFichier,    SIGNAL(pressed()), this, SLOT(SetFileName()));
+    connect( LEName,      SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
+    connect( PushDir,     SIGNAL(pressed()), this, SLOT(SetDirName()));
+    connect( PushFichier, SIGNAL(pressed()), this, SLOT(SetFileName()));
 
     connect( RBConforme,     SIGNAL(clicked()), this, SLOT(SetConforme()));
     connect( RBNonConforme,  SIGNAL(clicked()), this, SLOT(SetNonConforme()));
 
-    connect( CBBoundaryD,      SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD()));
-    connect( PBBoundaryDiNew,  SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew()));
-    connect( PBBoundaryDiEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) );
-    connect( PBBoundaryDiHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) );
-    connect( CBBoundaryA,      SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA()));
-    connect( PBBoundaryAnNew,  SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew()));
-    connect( PBBoundaryAnEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) );
-    connect( PBBoundaryAnHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) );
+    connect( RBBoundaryNo,      SIGNAL(clicked()), this, SLOT(SetBoundaryNo()));
+    connect( RBBoundaryCAO,     SIGNAL(clicked()), this, SLOT(SetBoundaryCAO()));
+    connect( RBBoundaryNonCAO,  SIGNAL(clicked()), this, SLOT(SetBoundaryNonCAO()));
+
+    connect( PBBoundaryCAONew,  SIGNAL(pressed()), this, SLOT(PushBoundaryCAONew()));
+    connect( PBBoundaryCAOEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryCAOEdit()) );
+    connect( PBBoundaryCAOHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryCAOHelp()) );
+    connect( CBBoundaryD,       SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD()));
+    connect( PBBoundaryDiNew,   SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew()));
+    connect( PBBoundaryDiEdit,  SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) );
+    connect( PBBoundaryDiHelp,  SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) );
+    connect( CBBoundaryA,       SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA()));
+    connect( PBBoundaryAnNew,   SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew()));
+    connect( PBBoundaryAnEdit,  SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) );
+    connect( PBBoundaryAnHelp,  SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) );
 
     connect( CBAdvanced,     SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced()));
     connect( RBStandard,     SIGNAL(clicked()), this, SLOT(SetStandard()));
@@ -127,6 +142,7 @@ void MonCreateCase::InitBoundarys()
     TWBoundary->setItem( i, 0, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
     TWBoundary->item( i, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
   }
+// Pour les frontieres CAO : la liste a saisir
 // Pour les frontieres discretes : la liste a saisir
 // Pour les frontieres analytiques : les colonnes de chaque frontiere
   HOMARD::HOMARD_Boundary_var myBoundary ;
@@ -136,8 +152,9 @@ void MonCreateCase::InitBoundarys()
   {
     myBoundary = myHomardGen->GetBoundary(mesBoundarys[i]);
     int type_obj = myBoundary->GetType() ;
-    if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
-    else               { AddBoundaryAn(QString(mesBoundarys[i])); }
+    if ( type_obj==-1 )     { CBBoundaryCAO->addItem(QString(mesBoundarys[i])); }
+    else if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
+    else                    { AddBoundaryAn(QString(mesBoundarys[i])); }
   }
 // Ajustement
   TWBoundary->resizeColumnsToContents();
@@ -265,12 +282,20 @@ bool MonCreateCase::PushOnApply(int option)
   // Enregistrement et publication dans l'arbre d'etudes a la sortie definitive
   if ( option > 0 )
   {
+    if (RBBoundaryCAO->isChecked())
+    {
+      QString monBoundaryCAOName=CBBoundaryCAO->currentText();
+      if (monBoundaryCAOName != "" )
+      {
+        aCase->AddBoundary(monBoundaryCAOName.toStdString().c_str());
+      }
+    }
     if (CBBoundaryD->isChecked())
     {
       QString monBoundaryDiName=CBBoundaryDi->currentText();
       if (monBoundaryDiName != "" )
       {
-        aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), "");
+        aCase->AddBoundary(monBoundaryDiName.toStdString().c_str());
       }
     }
     if (CBBoundaryA->isChecked())
@@ -434,6 +459,74 @@ void MonCreateCase::SetSaturne2D()
   RBSaturne2D->setChecked(true);
 }
 // ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryNo()
+// ------------------------------------------------------------------------
+{
+//
+  GBBoundaryC->setVisible(0);
+  GBBoundaryA->setVisible(0);
+  GBBoundaryD->setVisible(0);
+  CBBoundaryD->setVisible(0);
+  CBBoundaryA->setVisible(0);
+//
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryCAO()
+// ------------------------------------------------------------------------
+{
+//
+  GBBoundaryC->setVisible(1);
+  GBBoundaryA->setVisible(0);
+  GBBoundaryD->setVisible(0);
+  CBBoundaryD->setVisible(0);
+  CBBoundaryA->setVisible(0);
+//
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryNonCAO()
+// ------------------------------------------------------------------------
+{
+//
+  GBBoundaryC->setVisible(0);
+  CBBoundaryD->setVisible(1);
+  CBBoundaryA->setVisible(1);
+//
+  adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::AddBoundaryCAO(QString newBoundary)
+// ------------------------------------------------------------------------
+{
+  CBBoundaryCAO->insertItem(0,newBoundary);
+  CBBoundaryCAO->setCurrentIndex(0);
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAONew()
+// ------------------------------------------------------------------------
+{
+   MonCreateBoundaryCAO *BoundaryDlg = new MonCreateBoundaryCAO(this, true,
+                HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, "") ;
+   BoundaryDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAOEdit()
+// ------------------------------------------------------------------------
+{
+  if (CBBoundaryCAO->currentText() == QString(""))  return;
+  MonEditBoundaryCAO *BoundaryDlg = new MonEditBoundaryCAO(this, true,
+       HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, CBBoundaryCAO->currentText() ) ;
+  BoundaryDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAOHelp()
+// ------------------------------------------------------------------------
+{
+  std::string LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("CAO"), QString(LanguageShort.c_str()));
+}
+// ------------------------------------------------------------------------
 void MonCreateCase::SetBoundaryD()
 // ------------------------------------------------------------------------
 {
@@ -497,8 +590,6 @@ void MonCreateCase::SetBoundaryA()
   else { GBBoundaryA->setVisible(0); }
 //
   adjustSize();
-//
-//   MESSAGE("Fin de SetBoundaryA ");
 }
 // ------------------------------------------------------------------------
 void MonCreateCase::AddBoundaryAn(QString newBoundary)
index 7b3815992c5e8da6e13bfe8eaf1e656786acd8b3..8bc8645fcfc8b2cc2745dc1eff40de1695b98dff 100644 (file)
@@ -40,6 +40,7 @@ public:
     MonCreateCase( bool modal, HOMARD::HOMARD_Gen_var myHomardGen );
     ~MonCreateCase();
 
+    void AddBoundaryCAO(QString newBoundary);
     void AddBoundaryAn(QString newBoundary);
     void AddBoundaryDi(QString newBoundary);
 
@@ -74,6 +75,12 @@ public slots:
     virtual void SetSaturne();
     virtual void SetSaturne2D();
 
+    virtual void SetBoundaryNo();
+    virtual void SetBoundaryCAO();
+    virtual void SetBoundaryNonCAO();
+    virtual void PushBoundaryCAONew();
+    virtual void PushBoundaryCAOEdit();
+    virtual void PushBoundaryCAOHelp();
     virtual void SetBoundaryD();
     virtual void PushBoundaryDiNew();
     virtual void PushBoundaryDiEdit();
diff --git a/src/HOMARDGUI/MonCreateListGroupCAO.cxx b/src/HOMARDGUI/MonCreateListGroupCAO.cxx
new file mode 100755 (executable)
index 0000000..8c8286a
--- /dev/null
@@ -0,0 +1,150 @@
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "MonCreateListGroupCAO.h"
+#include "MonCreateHypothesis.h"
+#include "MonCreateBoundaryCAO.h"
+
+#include <QFileDialog>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+#include <SUIT_Desktop.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_ViewManager.h>
+
+using namespace std;
+
+// --------------------------------------------------------------------------------------------------------------
+MonCreateListGroupCAO::MonCreateListGroupCAO(MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound, bool modal,
+                                       HOMARD::HOMARD_Gen_var myHomardGen0, QString aCaseName,  QStringList listeGroupesHypo) :
+// --------------------------------------------------------------------------------------------------------------
+//
+    QDialog(0), Ui_CreateListGroup(),
+    _aCaseName (aCaseName),
+    _listeGroupesHypo (listeGroupesHypo),
+    _parentHyp(parentHyp),
+    _parentBound(parentBound)
+{
+    MESSAGE("Debut de  MonCreateListGroupCAO")
+     myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
+    setupUi(this);
+    setModal(modal);
+    InitConnect();
+    InitGroupes();
+}
+// --------------------------------------------------------------------------------------------------------------
+MonCreateListGroupCAO::MonCreateListGroupCAO(MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound,
+                                       HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo) :
+// --------------------------------------------------------------------------------------------------------------
+//
+    QDialog(0), Ui_CreateListGroup(),
+    _aCaseName (aCaseName),
+    _listeGroupesHypo (listeGroupesHypo),
+    _parentHyp(parentHyp),
+    _parentBound(parentBound)
+{
+    myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen);
+    setupUi(this);
+    InitConnect();
+}
+
+// ------------------------------------------------------------------------
+MonCreateListGroupCAO::~MonCreateListGroupCAO()
+// ------------------------------------------------------------------------
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroupCAO::InitConnect()
+// ------------------------------------------------------------------------
+{
+    connect( buttonOk,     SIGNAL( pressed() ), this, SLOT( PushOnOK() ) );
+    connect( buttonApply,  SIGNAL( pressed() ), this, SLOT( PushOnApply() ) );
+    connect( buttonCancel, SIGNAL( pressed() ), this, SLOT( close() ) );
+    connect( buttonHelp,   SIGNAL( pressed() ), this, SLOT( PushOnHelp() ) );
+}
+// ------------------------------------------------------------------------
+bool MonCreateListGroupCAO::PushOnApply()
+// ------------------------------------------------------------------------
+// Appele lorsque l'un des boutons Ok ou Apply est presse
+//
+{
+  QStringList ListeGroup ;
+  for ( int row=0; row< TWGroupe->rowCount(); row++)
+  {
+      if ( TWGroupe->item( row, 0 )->checkState() ==  Qt::Checked )
+          ListeGroup.insert(0, QString(TWGroupe->item(row, 1)->text()) );
+  }
+  if ( _parentHyp )   { _parentHyp->setGroups(ListeGroup);};
+  if ( _parentBound ) { _parentBound->setGroups(ListeGroup);};
+  return true;
+}
+
+
+// ------------------------------------------------------------------------
+void MonCreateListGroupCAO::PushOnOK()
+// ------------------------------------------------------------------------
+{
+     if (PushOnApply()) this->close();
+     if ( _parentHyp )   { _parentHyp->raise(); _parentHyp->activateWindow(); };
+     if ( _parentBound ) { _parentBound->raise(); _parentBound->activateWindow(); };
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroupCAO::PushOnHelp()
+// ------------------------------------------------------------------------
+{
+  std::string LanguageShort = myHomardGen->GetLanguageShort();
+  HOMARD_UTILS::PushOnHelp(QString("gui_create_hypothese.html"), QString(""), QString(LanguageShort.c_str()));
+}
+// ------------------------------------------------------------------------
+void MonCreateListGroupCAO::InitGroupes()
+// ------------------------------------------------------------------------
+{
+  MESSAGE("Debut de MonCreateListGroupCAO::InitGroupes ");
+  for ( int row=0; row< TWGroupe->rowCount(); row++)
+      TWGroupe->removeRow(row);
+  TWGroupe->setRowCount(0);
+  if (_aCaseName == QString("")) { return; };
+  HOMARD::HOMARD_Cas_var monCas= myHomardGen->GetCase(_aCaseName.toStdString().c_str());
+  HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
+  for ( int i = 0; i < _listeGroupesCas->length(); i++ )
+  {
+    TWGroupe->insertRow(i);
+    TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
+    TWGroupe->item( i, 0 )->setFlags( 0 );
+    TWGroupe->item( i, 0 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
+    if (_listeGroupesHypo.contains (QString((_listeGroupesCas)[i])))
+      {TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );}
+    else
+      {TWGroupe->item( i, 0 )->setCheckState( Qt::Unchecked );}
+    TWGroupe->setItem( i, 1, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
+    TWGroupe->item( i, 1 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
+  }
+  TWGroupe->resizeColumnsToContents();
+  TWGroupe->resizeRowsToContents();
+  TWGroupe->clearSelection();
+//   MESSAGE("Fin de MonCreateListGroupCAO::InitGroupes ");
+}
+
diff --git a/src/HOMARDGUI/MonCreateListGroupCAO.h b/src/HOMARDGUI/MonCreateListGroupCAO.h
new file mode 100755 (executable)
index 0000000..1943266
--- /dev/null
@@ -0,0 +1,64 @@
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MON_CREATELISTGROUPCAO_H
+#define MON_CREATELISTGROUPCAO_H
+
+#include "HOMARDGUI_Exports.hxx"
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include "ui_CreateListGroup.h"
+#include <QDialog>
+
+class MonCreateHypothesis;
+class MonCreateBoundaryCAO;
+class HOMARD_EXPORT MonCreateListGroupCAO : public QDialog, public Ui_CreateListGroup
+{
+    Q_OBJECT
+
+public:
+    MonCreateListGroupCAO( MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo);
+    MonCreateListGroupCAO( MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo);
+    virtual ~MonCreateListGroupCAO();
+
+protected :
+
+    HOMARD::HOMARD_Gen_var myHomardGen;
+
+    MonCreateHypothesis * _parentHyp;
+    MonCreateBoundaryCAO * _parentBound;
+    QString _aCaseName;
+    QStringList _listeGroupesHypo;
+
+    virtual void InitConnect();
+    virtual void InitGroupes();
+
+public slots:
+    virtual void PushOnOK();
+    virtual bool PushOnApply();
+    virtual void PushOnHelp();
+
+};
+
+#endif // MON_CREATELISTGROUPCAO_H
diff --git a/src/HOMARDGUI/MonEditBoundaryCAO.cxx b/src/HOMARDGUI/MonEditBoundaryCAO.cxx
new file mode 100755 (executable)
index 0000000..d217ea1
--- /dev/null
@@ -0,0 +1,105 @@
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "MonEditBoundaryCAO.h"
+#include "MonEditListGroupCAO.h"
+
+#include <QMessageBox>
+
+#include "SalomeApp_Tools.h"
+#include "HOMARDGUI_Utils.h"
+#include "HomardQtCommun.h"
+#include <utilities.h>
+
+using namespace std;
+
+// -------------------------------------------------------------------------------------------------------------------------------------
+MonEditBoundaryCAO::MonEditBoundaryCAO( MonCreateCase* parent, bool modal,
+                                      HOMARD::HOMARD_Gen_var myHomardGen,
+                                      QString caseName, QString Name):
+// -------------------------------------------------------------------------------------------------------------------------------------
+/* Constructs a MonEditBoundaryCAO
+    herite de MonCreateBoundaryCAO
+*/
+    MonCreateBoundaryCAO(parent, modal, myHomardGen, caseName, Name)
+{
+    MESSAGE("Debut de Boundary pour " << Name.toStdString().c_str());
+    setWindowTitle(QObject::tr("HOM_BOUN_C_EDIT_WINDOW_TITLE"));
+    try
+    {
+     aBoundary=myHomardGen->GetBoundary(CORBA::string_dup(_aName.toStdString().c_str()));
+     if (caseName==QString("")) { _aCaseName=aBoundary->GetCaseCreation();}
+     InitValEdit();
+    }
+    catch( SALOME::SALOME_Exception& S_ex )
+    {
+      QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                                QObject::tr(CORBA::string_dup(S_ex.details.text)) );
+      return;
+    }
+
+    HOMARD::ListGroupType_var maListe = aBoundary->GetGroups();
+    for ( int i = 0; i < maListe->length(); i++ )
+       _listeGroupesBoundary << QString(maListe[i]);
+
+}
+// ------------------------------
+MonEditBoundaryCAO::~MonEditBoundaryCAO()
+// ------------------------------
+{
+}
+// ------------------------------
+void MonEditBoundaryCAO::InitValEdit()
+// ------------------------------
+{
+      LEName->setText(_aName);
+      LEName->setReadOnly(true);
+
+      QString aDataFile = aBoundary->GetDataFile();
+      LEFileName->setText(aDataFile);
+      LEFileName->setReadOnly(1);
+      PushFichier->setVisible(0);
+//
+      adjustSize();
+}
+// ------------------------------
+bool MonEditBoundaryCAO::PushOnApply()
+// ------------------------------
+{
+     return true;
+}
+// ------------------------------------------------------------------------
+void MonEditBoundaryCAO::SetFiltrage()
+// // ------------------------------------------------------------------------
+{
+  if (!CBGroupe->isChecked()) return;
+  if (_aCaseName.toStdString().c_str() == QString())
+  {
+    QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
+                              QObject::tr("HOM_BOUN_CASE") );
+    return;
+  }
+  HOMARD::HOMARD_Cas_var monCas= myHomardGen->GetCase(_aCaseName.toStdString().c_str());
+  HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups();
+
+  MonEditListGroupCAO *aDlg = new MonEditListGroupCAO(NULL, this, true, HOMARD::HOMARD_Gen::_duplicate(myHomardGen),
+                            _aCaseName, _listeGroupesBoundary) ;
+  aDlg->show();
+}
+
diff --git a/src/HOMARDGUI/MonEditBoundaryCAO.h b/src/HOMARDGUI/MonEditBoundaryCAO.h
new file mode 100755 (executable)
index 0000000..b86f4dc
--- /dev/null
@@ -0,0 +1,51 @@
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MON_EDITBOUNDARYCAO_H
+#define MON_EDITBOUNDARYCAO_H
+
+#include "HOMARDGUI_Exports.hxx"
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateBoundaryCAO.h>
+
+class HOMARD_EXPORT MonEditBoundaryCAO : public MonCreateBoundaryCAO
+{
+    Q_OBJECT
+public:
+    MonEditBoundaryCAO( MonCreateCase* parent, bool modal,
+                       HOMARD::HOMARD_Gen_var myHomardGen,
+                       QString caseName, QString Name );
+    virtual ~MonEditBoundaryCAO();
+
+protected :
+    virtual void InitValEdit();
+    virtual bool PushOnApply();
+    virtual void SetFiltrage();
+
+public slots:
+
+};
+
+#endif
index 40e38f69f1766de3ba7aaa06a373efe5d308ad49..05f1fd1545bff9cc152660aaa60d5cc97b21cc66 100644 (file)
@@ -71,8 +71,8 @@ void MonEditBoundaryDi::InitValEdit()
       LEName->setText(_aName);
       LEName->setReadOnly(true);
 
-      QString aMeshFile = aBoundary->GetMeshFile();
-      LEFileName->setText(aMeshFile);
+      QString aDataFile = aBoundary->GetDataFile();
+      LEFileName->setText(aDataFile);
       LEFileName->setReadOnly(1);
       PushFichier->setVisible(0);
 //
index 2ad3ef4ec58dd6eb0b99b0ef42dad4fde5d565f3..1035eae63aae542abafb41a443ddcf66da82a22f 100644 (file)
@@ -74,31 +74,43 @@ void MonEditCase::InitValEdit()
   RBNonConforme->setEnabled(false);
   int ExtType=aCase->GetExtType();
 
-//    Non affichage du mode de suivi de frontiere
-  CBBoundaryA->setVisible(0);
-  GBBoundaryA->setVisible(0);
+
+// Suivi de frontiere
+// A priori, aucun affichage
+  GBTypeBoun->setVisible(0);
   CBBoundaryD->setVisible(0);
+  CBBoundaryA->setVisible(0);
+  GBBoundaryC->setVisible(0);
   GBBoundaryD->setVisible(0);
-
+  GBBoundaryA->setVisible(0);
 //    On passe en revue tous les couples (frontiere,groupe) du cas
   HOMARD::ListBoundaryGroupType_var mesBoundarys = aCase->GetBoundaryGroup();
   if (mesBoundarys->length()>0)
   {
     QStringList ListeFron ;
     QString NomFron ;
+    bool BounCAO = false ;
     bool BounDi = false ;
     bool BounAn = false ;
     for (int i=0; i<mesBoundarys->length(); i++)
     {
-//        Nom de la frontiere
+//    Nom de la frontiere
       NomFron = mesBoundarys[i++];
       MESSAGE("NomFron "<<NomFron.toStdString().c_str());
-//        L'objet associe pour en deduire le type
+//    L'objet associe pour en deduire le type
       HOMARD::HOMARD_Boundary_var myBoundary = myHomardGen->GetBoundary(NomFron.toStdString().c_str());
       int type_obj = myBoundary->GetType() ;
+      MESSAGE("type_obj "<<type_obj);
+//        C'est une frontiere CAO
+//        Remarque : on ne gere pas les groupes
+      if ( type_obj==-1 )
+      {
+        BounCAO = true ;
+        CBBoundaryCAO->addItem(NomFron);
+      }
 //        C'est une frontiere discrete
 //        Rermarque : on ne gere pas les groupes
-      if ( type_obj==0 )
+      else if ( type_obj==0 )
       {
         BounDi = true ;
         CBBoundaryDi->addItem(NomFron);
@@ -138,9 +150,23 @@ void MonEditCase::InitValEdit()
         TWBoundary->item( 0, ok )->setCheckState( Qt::Checked );
       }
     }
-    MESSAGE("BounDi "<<BounDi<<", BounAn "<<BounAn);
+    MESSAGE("BounCAO "<<BounCAO<<",BounDi "<<BounDi<<", BounAn "<<BounAn);
+    GBTypeBoun->setVisible(1);
+    if ( BounCAO )
+    { RBBoundaryCAO->setChecked(true);
+      GBBoundaryC->setVisible(1);
+      CBBoundaryCAO->setDisabled(true);
+      PBBoundaryCAONew->setVisible(0);
+      PBBoundaryCAOHelp->setVisible(0); }
+    if ( BounDi )
+    { RBBoundaryNonCAO->setChecked(true);
+      GBBoundaryD->setVisible(1);
+      CBBoundaryDi->setDisabled(true);
+      PBBoundaryDiNew->setVisible(0);
+      PBBoundaryDiHelp->setVisible(0); }
     if ( BounAn )
-    { GBBoundaryA->setVisible(1);
+    { RBBoundaryNonCAO->setChecked(true);
+      GBBoundaryA->setVisible(1);
 //    On rend les cases non modifiables.
 //    On ne peut pas le faire pour tout le tableau sinon on perd l'ascenseur !
       int nbcol = TWBoundary->columnCount();
@@ -155,11 +181,9 @@ void MonEditCase::InitValEdit()
       PBBoundaryAnNew->setVisible(0);
       PBBoundaryAnHelp->setVisible(0);
     }
-    if ( BounDi )
-    { GBBoundaryD->setVisible(1);
-      CBBoundaryDi->setDisabled(true);
-      PBBoundaryDiNew->setVisible(0);
-      PBBoundaryDiHelp->setVisible(0); }
+    RBBoundaryNo->setEnabled(false);
+    RBBoundaryCAO->setEnabled(false);
+    RBBoundaryNonCAO->setEnabled(false);
   }
 //
 // Les options avancees (non modifiables)
diff --git a/src/HOMARDGUI/MonEditListGroupCAO.cxx b/src/HOMARDGUI/MonEditListGroupCAO.cxx
new file mode 100755 (executable)
index 0000000..783e368
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "MonEditListGroupCAO.h"
+#include <utilities.h>
+
+using namespace std;
+//---------------------------------------------------------------------
+MonEditListGroupCAO::MonEditListGroupCAO( MonCreateHypothesis* parentHyp,
+                                    MonCreateBoundaryCAO* parentBound,
+                                    bool modal,
+                                    HOMARD::HOMARD_Gen_var myHomardGen,
+                                    QString aCaseName,
+                                    QStringList listeGroupesHypo):
+//---------------------------------------------------------------------
+MonCreateListGroupCAO(parentHyp,parentBound,myHomardGen,aCaseName,listeGroupesHypo)
+{
+  MESSAGE("Debut de MonEditListGroupCAO");
+    setWindowTitle(QObject::tr("HOM_GROU_EDIT_WINDOW_TITLE"));
+  setModal(true);
+  InitGroupes();
+}
+
+//------------------------------------
+MonEditListGroupCAO:: ~MonEditListGroupCAO()
+//------------------------------------
+{
+}
+// -------------------------------------
+void MonEditListGroupCAO:: InitGroupes()
+// -------------------------------------
+{
+  for (int i = 0; i < _listeGroupesHypo.size(); i++ )
+  {
+     std::cerr << _listeGroupesHypo[i].toStdString().c_str() << std::endl;
+     TWGroupe->insertRow(i);
+     TWGroupe->setItem( i, 0, new QTableWidgetItem( QString ("") ) );
+     TWGroupe->item( i, 0 )->setFlags( 0 );
+     TWGroupe->item( i, 0 )->setCheckState( Qt::Checked );
+     TWGroupe->setItem( i, 1, new QTableWidgetItem(_listeGroupesHypo[i]));
+   }
+   TWGroupe->resizeRowsToContents();
+}
+
+
diff --git a/src/HOMARDGUI/MonEditListGroupCAO.h b/src/HOMARDGUI/MonEditListGroupCAO.h
new file mode 100755 (executable)
index 0000000..7a72ce5
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (C) 2011-2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef MON_EDITLISTGROUPCAO_H
+#define MON_EDITLISTGROUPCAO_H
+
+#include "HOMARDGUI_Exports.hxx"
+
+#include <SALOMEconfig.h>
+#include <SalomeApp_Module.h>
+
+#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
+#include CORBA_CLIENT_HEADER(HOMARD_Gen)
+
+#include <MonCreateListGroupCAO.h>
+
+class MonCreateHypothesis;
+class MonCreateBoundaryCAO;
+class HOMARD_EXPORT MonEditListGroupCAO : public MonCreateListGroupCAO
+{
+    Q_OBJECT
+
+public:
+    MonEditListGroupCAO( MonCreateHypothesis* parentHyp, MonCreateBoundaryCAO* parentBound, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName,  QStringList listeGroupesHypo);
+    virtual ~MonEditListGroupCAO();
+
+protected :
+
+    virtual void InitGroupes();
+
+};
+
+#endif // MON_EDITLISTGROUPCAO_H
index 569efea16ec2115a6d4f4b043c47b58960b6da0d..99082ed37670bdd4427b99b5362221bccc593808 100644 (file)
@@ -29,6 +29,7 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_BINARY_DIR}
   ${PROJECT_BINARY_DIR}/idl
   ${PROJECT_BINARY_DIR}/adm_local/unix
+  ${PROJECT_SOURCE_DIR}/src/FrontTrack
   ${PROJECT_SOURCE_DIR}/src/HOMARD
   ${PROJECT_SOURCE_DIR}/src/HOMARDGUI
 )
@@ -49,6 +50,7 @@ SET(_link_LIBRARIES
   ${KERNEL_SalomeGenericObj}
   ${SMESH_SalomeIDLSMESH}
   ${SMESH_SMESHEngine}
+  FrontTrack
   SalomeIDLHOMARD
   HOMARDImpl
 )
@@ -65,7 +67,7 @@ SET(HOMARDEngine_HEADERS
   HOMARD_Boundary_i.hxx
   HOMARD_YACS_i.hxx
   HomardMedCommun.h
-  HOMARD_i.hxx 
+  HOMARD_i.hxx
 )
 
 # --- sources ---
index 3cb92a5651a41d88a9b34a7a6068fcc299a220e8..2d904436ed119a36f9011a735ebeeb52b882fecc 100644 (file)
@@ -134,18 +134,18 @@ char* HOMARD_Boundary_i::GetMeshName()
   return CORBA::string_dup( myHomardBoundary->GetMeshName().c_str() );
 }
 //=============================================================================
-void HOMARD_Boundary_i::SetMeshFile( const char* MeshFile )
+void HOMARD_Boundary_i::SetDataFile( const char* DataFile )
 {
   ASSERT( myHomardBoundary );
-  myHomardBoundary->SetMeshFile( MeshFile );
+  myHomardBoundary->SetDataFile( DataFile );
   int PublisMeshIN = _gen_i->GetPublisMeshIN () ;
-  if ( PublisMeshIN != 0 ) { _gen_i->PublishResultInSmesh(MeshFile, 0); }
+  if ( PublisMeshIN != 0 ) { _gen_i->PublishResultInSmesh(DataFile, 0); }
 }
 //=============================================================================
-char* HOMARD_Boundary_i::GetMeshFile()
+char* HOMARD_Boundary_i::GetDataFile()
 {
   ASSERT( myHomardBoundary );
-  return CORBA::string_dup( myHomardBoundary->GetMeshFile().c_str() );
+  return CORBA::string_dup( myHomardBoundary->GetDataFile().c_str() );
 }
 //=============================================================================
 void HOMARD_Boundary_i::SetCylinder( double X0, double X1, double X2, double X3, double X4, double X5, double X6 )
index ba26c743695bee61ace8a0f5e82614772b79cd3c..86485d1f1725029e41f3fdce69865f119e688b18 100644 (file)
@@ -72,8 +72,8 @@ public:
   void                   SetMeshName( const char* MeshName );
   char*                  GetMeshName();
 
-  void                   SetMeshFile( const char* MeshFile );
-  char*                  GetMeshFile();
+  void                   SetDataFile( const char* DataFile );
+  char*                  GetDataFile();
 
   void                   SetCylinder( double Xcentre, double Ycentre, double ZCentre,
                                       double Xaxe, double Yaxe, double Zaxe,
index 6558e235baf9304168e6c956a3748e8fc13ed994..74fdfa3d09714cc56f63ba906c4f5a955ca5475e 100755 (executable)
@@ -319,46 +319,140 @@ HOMARD::ListGroupType* HOMARD_Cas_i::GetGroups()
   return aResult._retn();
 }
 //=============================================================================
+void HOMARD_Cas_i::AddBoundary(const char* BoundaryName)
+{
+  MESSAGE ("HOMARD_Cas_i::AddBoundary : BoundaryName = "<< BoundaryName );
+  const char * Group = "" ;
+  AddBoundaryGroup( BoundaryName, Group) ;
+}
+//=============================================================================
 void HOMARD_Cas_i::AddBoundaryGroup( const char* BoundaryName, const char* Group)
 {
-  MESSAGE ("AddBoundaryGroup : BoundaryName = "<< BoundaryName << ", Group = " << Group );
+  MESSAGE ("HOMARD_Cas_i::AddBoundaryGroup : BoundaryName = "<< BoundaryName << ", Group = " << Group );
   ASSERT( myHomardCas );
-  // A. La liste des frontiere+groupes
+  // A. Préalables
+  // A.1. Caractéristiques de la frontière à ajouter
+  HOMARD::HOMARD_Boundary_ptr myBoundary = _gen_i->GetBoundary(BoundaryName) ;
+  ASSERT(!CORBA::is_nil(myBoundary));
+  int BoundaryType = myBoundary->GetType();
+  MESSAGE ( ". BoundaryType = " << BoundaryType );
+  // A.2. La liste des frontiere+groupes
   const std::list<std::string>& ListBoundaryGroup = myHomardCas->GetBoundaryGroup();
   std::list<std::string>::const_iterator it;
-  // B. La frontiere
-  // B.1. La frontiere est-elle deja enregistree pour ce cas ?
-  bool existe = false ;
-  for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+  // B. Controles
+  const char * boun ;
+  int erreur = 0 ;
+  while ( erreur == 0 )
   {
-//     MESSAGE ("..  Frontiere : "<< *it );
-    if ( *it == BoundaryName ) { existe = true ; }
-    it++ ;
-  }
-  // B.2. Pour une nouvelle frontiere, publication dans l'arbre d'etudes sous le cas
-  if ( !existe )
-  {
-    char* CaseName = GetName() ;
-    MESSAGE ( "AddBoundaryGroup : insertion de la frontiere dans l'arbre de " << CaseName );
-    _gen_i->PublishBoundaryUnderCase(CaseName, BoundaryName) ;
+  // B.1. Si on ajoute une frontière CAO, elle doit être la seule frontière
+    if ( BoundaryType == -1 )
+    {
+      for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+      {
+        boun = (*it).c_str() ;
+        MESSAGE ("..  Frontiere enregistrée : "<< boun );
+        if ( *it != BoundaryName )
+        { erreur = 1 ;
+          break ; }
+        // On saute le nom du groupe
+        it++ ;
+      }
+    }
+    if ( erreur != 0 ) { break ; }
+  // B.2. Si on ajoute une frontière non CAO, il ne doit pas y avoir de frontière CAO
+    if ( BoundaryType != -1 )
+    {
+      for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+      {
+        boun = (*it).c_str() ;
+        MESSAGE ("..  Frontiere enregistrée : "<< boun );
+        HOMARD::HOMARD_Boundary_ptr myBoundary_0 = _gen_i->GetBoundary(boun) ;
+        int BoundaryType_0 = myBoundary_0->GetType();
+        MESSAGE ( ".. BoundaryType_0 = " << BoundaryType_0 );
+        if ( BoundaryType_0 == -1 )
+        { erreur = 2 ;
+          break ; }
+        // On saute le nom du groupe
+        it++ ;
+      }
+      if ( erreur != 0 ) { break ; }
+    }
+  // B.3. Si on ajoute une frontière discrète, il ne doit pas y avoir d'autre frontière discrète
+    if ( BoundaryType == 0 )
+    {
+      for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+      {
+        boun = (*it).c_str() ;
+        MESSAGE ("..  Frontiere enregistrée : "<< boun );
+        if ( boun != BoundaryName )
+        {
+          HOMARD::HOMARD_Boundary_ptr myBoundary_0 = _gen_i->GetBoundary(boun) ;
+          int BoundaryType_0 = myBoundary_0->GetType();
+          MESSAGE ( ".. BoundaryType_0 = " << BoundaryType_0 );
+          if ( BoundaryType_0 == 0 )
+          { erreur = 3 ;
+            break ; }
+        }
+        // On saute le nom du groupe
+        it++ ;
+      }
+      if ( erreur != 0 ) { break ; }
+    }
+  // B.4. Pour une nouvelle frontiere, publication dans l'arbre d'etudes sous le cas
+    bool existe = false ;
+    for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+    {
+      MESSAGE ("..  Frontiere : "<< *it );
+      if ( *it == BoundaryName ) { existe = true ; }
+      // On saute le nom du groupe
+      it++ ;
+    }
+    if ( !existe )
+    {
+      char* CaseName = GetName() ;
+      MESSAGE ( "AddBoundaryGroup : insertion de la frontiere dans l'arbre de " << CaseName );
+      _gen_i->PublishBoundaryUnderCase(CaseName, BoundaryName) ;
+    }
+  // B.5. Le groupe est-il deja enregistre pour une frontiere de ce cas ?
+    for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+    {
+      boun = (*it).c_str() ;
+      it++ ;
+      MESSAGE ("..  Groupe enregistré : "<< *it );
+      if ( *it == Group )
+      { erreur = 5 ;
+        break ; }
+    }
+    if ( erreur != 0 ) { break ; }
+    //
+    break ;
   }
-  // C. Le groupe est-il deja enregistre pour une frontiere de ce cas ?
-  for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
+  // F. Si aucune erreur, enregistrement du couple (frontiere,groupe) dans la reference du cas
+  //    Sinon, arrêt
+  if ( erreur == 0 )
+  { myHomardCas->AddBoundaryGroup( BoundaryName, Group ); }
+  else
   {
-    std::string boun = *it ;
-    it++ ;
-//     MESSAGE ("..  Group : "<< *it );
-    if ( *it == Group )
-    { INFOS ("Frontiere " << boun << " Un groupe est deja associe " << Group ) ;
-      SALOME::ExceptionStruct es;
-      es.type = SALOME::BAD_PARAM;
-      es.text = "Invalid AddBoundaryGroup";
-      throw SALOME::SALOME_Exception(es);
-      return ;
-    }
+    std::stringstream ss;
+    ss << erreur;
+    std::string str = ss.str();
+    std::string texte ;
+    texte = "Erreur numéro " + str + " pour la frontière à enregistrer : " + std::string(BoundaryName) ;
+    if ( erreur == 1 ) { texte += "\nIl existe déjà la frontière " ; }
+    else if ( erreur == 2 ) { texte += "\nIl existe déjà la frontière CAO " ; }
+    else if ( erreur == 3 ) { texte += "\nIl existe déjà une frontière discrète : " ; }
+    else if ( erreur == 5 ) { texte += "\nLe groupe " + std::string(Group) + " est déjà enregistré pour la frontière " ; }
+    texte += std::string(boun) ;
+    //
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+#ifdef _DEBUG_
+    texte += "\nInvalid AddBoundaryGroup";
+#endif
+    INFOS(texte) ;
+    es.text = CORBA::string_dup(texte.c_str());
+    throw SALOME::SALOME_Exception(es);
   }
-  // D. Enregistrement du couple (frontiere,groupe) dans la reference du cas
-  myHomardCas->AddBoundaryGroup( BoundaryName, Group );
 }
 //=============================================================================
 HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup()
index 14a25ac685be92f971745fe409ca35eea95f445f..71181bf8036daf92f1e73d3fc6fc2ba9c632e5f2 100644 (file)
@@ -86,7 +86,8 @@ public:
   void                   SetGroups(const HOMARD::ListGroupType& ListGroup);
   HOMARD::ListGroupType* GetGroups();
 
-  void                   AddBoundaryGroup( const char* Boundary, const char* Group);
+  void                   AddBoundary(const char* Boundary);
+  void                   AddBoundaryGroup(const char* Boundary, const char* Group);
   HOMARD::ListBoundaryGroupType*  GetBoundaryGroup();
   void                   SupprBoundaryGroup( );
 
index 915463dfbb6380834bb5c4d0e9ed4e22ac2201e6..9602c2f934010cfa87416f70490ba954ddf9dcc0 100644 (file)
@@ -30,6 +30,8 @@
 #include "YACSDriver.hxx"
 #include "HOMARD.hxx"
 
+#include "FrontTrack.hxx"
+
 #include "HOMARD_version.h"
 
 #include "utilities.h"
@@ -121,7 +123,7 @@ HOMARD_Gen_i::~HOMARD_Gen_i()
 }
 //=============================================================================
 //=============================================================================
-// Utilitaires pour l'??tude
+// Utilitaires pour l'étude
 //=============================================================================
 //=============================================================================
 void HOMARD_Gen_i::UpdateStudy()
@@ -873,7 +875,7 @@ void HOMARD_Gen_i::AssociateIterHypo(const char* nomIter, const char* nomHypo)
   myIteration->SetHypoName(nomHypo);
   myHypo->LinkIteration(nomIter);
 
-  // On stocke les noms des champ a interpoler pour le futur controle de la donnee des pas de temps
+  // On stocke les noms des champ a interpoler pour le futur controle de la donnée des pas de temps
   myIteration->SupprFieldInterps() ;
   HOMARD::listeFieldInterpsHypo* ListField = myHypo->GetFieldInterps();
   int numberOfFieldsx2 = ListField->length();
@@ -1220,7 +1222,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char*
 HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, const char* DirNameStart)
 //
 // nomCas : nom du cas a creer
-// DirNameStart : nom du repertoire contenant l'iteration de reprise
+// DirNameStart : nom du répertoire contenant l'iteration de reprise
 //
 {
   INFOS ( "CreateCaseFromIteration : nomCas = " << nomCas << ", DirNameStart = " << DirNameStart );
@@ -1228,7 +1230,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
   int codret ;
 
   // A. Decodage du point de reprise
-  // A.1. Controle du repertoire de depart de l'iteration
+  // A.1. Controle du répertoire de depart de l'iteration
   codret = CHDIR(DirNameStart) ;
   if ( codret != 0 )
   {
@@ -1238,7 +1240,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
     throw SALOME::SALOME_Exception(es);
     return 0;
   };
-  // A.2. Reperage des fichiers du repertoire de reprise
+  // A.2. Reperage des fichiers du répertoire de reprise
   std::string file_configuration = "" ;
   std::string file_maillage_homard = "" ;
   int bilan ;
@@ -1304,13 +1306,13 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
   char* MeshFile ;
   // le constructeur de ifstream permet d'ouvrir un fichier en lecture
   std::ifstream fichier( file_configuration.c_str() );
-  if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+  if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
   {
     std::string ligne; // variable contenant chaque ligne lue
     std::string mot_cle;
     std::string argument;
     int decalage;
-    // cette boucle sur les lignes s'arr??te d??s qu'une erreur de lecture survient
+    // cette boucle sur les lignes s'arrête dès qu'une erreur de lecture survient
     while ( std::getline( fichier, ligne ) )
     {
       // B.1. Pour la ligne courante, on identifie le premier mot : le mot-cle
@@ -1391,9 +1393,9 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
   myCase->SetPyram (Pyram) ;
 
   // E. Copie du fichier de maillage homard
-  // E.1. Repertoire associe au cas
+  // E.1. Répertoire associe au cas
   char* nomDirCase = myCase->GetDirName() ;
-  // E.2. Repertoire associe a l'iteration de ce cas
+  // E.2. Répertoire associe a l'iteration de ce cas
   char* IterName ;
   IterName = myCase->GetIter0Name() ;
   HOMARD::HOMARD_Iteration_var Iter = GetIteration(IterName) ;
@@ -1441,7 +1443,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas,
 HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseLastIteration(const char* nomCas, const char* DirNameStart)
 //
 // nomCas : nom du cas a creer
-// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+// DirNameStart : nom du répertoire du cas contenant l'iteration de reprise
 //
 {
   INFOS ( "CreateCaseFromCaseLastIteration : nomCas = " << nomCas << ", DirNameStart = " << DirNameStart );
@@ -1457,7 +1459,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseLastIteration(const char*
 HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseIteration(const char* nomCas, const char* DirNameStart, CORBA::Long Number)
 //
 // nomCas : nom du cas a creer
-// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+// DirNameStart : nom du répertoire du cas contenant l'iteration de reprise
 // Number : numero de l'iteration de depart
 //
 {
@@ -1481,8 +1483,8 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromCaseIteration(const char* nom
 //=============================================================================
 std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Number)
 //
-// Retourne le nom du repertoire ou se trouve l'iteration voulue.
-// DirNameStart : nom du repertoire du cas contenant l'iteration de reprise
+// Retourne le nom du répertoire ou se trouve l'iteration voulue.
+// DirNameStart : nom du répertoire du cas contenant l'iteration de reprise
 // Number : numero de l'iteration de depart ou -1 si on cherche la derniere
 //
 {
@@ -1492,7 +1494,7 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb
   int codret ;
   int NumeIterMax = -1 ;
 
-  // A.1. Controle du repertoire de depart du cas
+  // A.1. Controle du répertoire de depart du cas
   codret = CHDIR(DirNameStart) ;
   if ( codret != 0 )
   {
@@ -1502,7 +1504,7 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb
     throw SALOME::SALOME_Exception(es);
     return 0;
   };
-  // A.2. Reperage des sous-repertoire du repertoire de reprise
+  // A.2. Reperage des sous-répertoire du répertoire de reprise
   bool existe = false ;
 #ifndef WIN32
   DIR *dp;
@@ -1525,7 +1527,7 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb
     {
       if ( CHDIR(DirName_1.c_str()) == 0 )
       {
-//      On cherche le fichier de configuration dans ce sous-repertoire
+//      On cherche le fichier de configuration dans ce sous-répertoire
         codret = CHDIR(DirNameStart);
 #ifndef WIN32
         DIR *dp_1;
@@ -1550,12 +1552,12 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb
             CHDIR(DirName_1.c_str()) ;
 
             std::ifstream fichier( file_name_1.c_str() );
-            if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+            if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
             {
               int NumeIter ;
               std::string ligne; // variable contenant chaque ligne lue
               std::string mot_cle;
-              // cette boucle sur les lignes s'arr??te d??s qu'une erreur de lecture survient
+              // cette boucle sur les lignes s'arrête dès qu'une erreur de lecture survient
               while ( std::getline( fichier, ligne ) )
               {
                 // B.1. Pour la ligne courante, on identifie le premier mot : le mot-cle
@@ -1684,8 +1686,8 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase0(const char* nomCas, const char*
   // C. Caracteristiques du maillage
   if ( existeMeshFile != 0 )
   {
-  // Les valeurs extremes des coordonnees
-//     MESSAGE ( "CreateCase0 : Les valeurs extremes des coordonnees" );
+  // Les valeurs extremes des coordonnées
+//     MESSAGE ( "CreateCase0 : Les valeurs extremes des coordonnées" );
     std::vector<double> LesExtremes =GetBoundingBoxInMedFile(MeshFile) ;
     HOMARD::extrema_var aSeq = new HOMARD::extrema() ;
     if (LesExtremes.size()!=10) { return 0; }
@@ -1845,7 +1847,7 @@ HOMARD::HOMARD_Iteration_ptr HOMARD_Gen_i::CreateIteration(const char* NomIterat
   myIteration->SetNumber(numero);
 
 // Nombre d'iterations deja connues pour le cas, permettant
-// la creation d'un sous-repertoire unique
+// la creation d'un sous-répertoire unique
   int nbitercase = myCase->GetNumberofIter();
   char* nomDirIter = CreateDirNameIter(nomDirCase, nbitercase );
   myIteration->SetDirNameLoc(nomDirIter);
@@ -1914,11 +1916,20 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundary(const char* BoundaryNam
   return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
 }
 //=============================================================================
+HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryCAO(const char* BoundaryName, const char* CAOFile)
+{
+  INFOS ("CreateBoundaryCAO : BoundaryName  = " << BoundaryName << ", CAOFile = " << CAOFile );
+  HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, -1);
+  myBoundary->SetDataFile( CAOFile ) ;
+
+  return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
+}
+//=============================================================================
 HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryDi(const char* BoundaryName, const char* MeshName, const char* MeshFile)
 {
-  INFOS ("CreateBoundaryDi : BoundaryName  = " << BoundaryName << ", MeshName = " << MeshName );
+  INFOS ("CreateBoundaryDi : BoundaryName  = " << BoundaryName << ", MeshName = " << MeshName << ", MeshFile = " << MeshFile );
   HOMARD::HOMARD_Boundary_var myBoundary = CreateBoundary(BoundaryName, 0);
-  myBoundary->SetMeshFile( MeshFile ) ;
+  myBoundary->SetDataFile( MeshFile ) ;
   myBoundary->SetMeshName( MeshName ) ;
 
   return HOMARD::HOMARD_Boundary::_duplicate(myBoundary);
@@ -2375,7 +2386,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneNam
 //=============================================================================
 //=============================================================================
 // Traitement d'une iteration
-// etatMenage = 1 : destruction du repertoire d'execution
+// etatMenage = 1 : destruction du répertoire d'execution
 // modeHOMARD  = 1 : adaptation
 //            != 1 : information avec les options modeHOMARD
 // Option1 >0 : appel depuis python
@@ -2462,10 +2473,10 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   HOMARD::HOMARD_Cas_var myCase = myStudyContext._mesCas[nomCas];
   ASSERT(!CORBA::is_nil(myCase));
 
-  // B. Les repertoires
-  // B.1. Le repertoire courant
+  // B. Les répertoires
+  // B.1. Le répertoire courant
   std::string nomDirWork = getenv("PWD") ;
-  // B.2. Le sous-repertoire de l'iteration a traiter
+  // B.2. Le sous-répertoire de l'iteration a traiter
   char* DirCompute = ComputeDirManagement(myCase, myIteration, etatMenage);
   MESSAGE( ". DirCompute = " << DirCompute );
 
@@ -2488,11 +2499,11 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   FileInfo += "." + siterp1 + ".bilan" ;
   myIteration->SetFileInfo(FileInfo.c_str());
 
-   // D. On passe dans le repertoire de l'iteration a calculer
+   // D. On passe dans le répertoire de l'iteration a calculer
   MESSAGE ( ". On passe dans DirCompute = " << DirCompute );
   CHDIR(DirCompute);
 
-  // E. Les donnees de l'execution HOMARD
+  // E. Les données de l'exécution HOMARD
   // E.1. L'objet du texte du fichier de configuration
   HomardDriver* myDriver = new HomardDriver(siter, siterp1);
   myDriver->TexteInit(DirCompute, LogFile, _Langue);
@@ -2503,7 +2514,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   const char* MeshFile = myIteration->GetMeshFile();
   MESSAGE ( ". MeshFile = " << MeshFile );
 
-  // E.3. Les donnees du traitement HOMARD
+  // E.3. Les données du traitement HOMARD
   int iaux ;
   if ( modeHOMARD == 1 )
   {
@@ -2523,7 +2534,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
   }
 
   // E.4. Ajout des informations liees a l'eventuel suivi de frontiere
-  DriverTexteBoundary(myCase, myDriver) ;
+  int BoundaryOption = DriverTexteBoundary(myCase, myDriver) ;
 
   // E.5. Ecriture du texte dans le fichier
   MESSAGE ( ". Ecriture du texte dans le fichier de configuration ; codret = "<<codret );
@@ -2532,7 +2543,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
 
 // G. Execution
 //
-  int codretexec = 12 ;
+  int codretexec = 1789 ;
   if (codret == 0)
   {
     codretexec = myDriver->ExecuteHomard(Option1);
@@ -2585,7 +2596,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
         text = "Error during the adaptation.\n" ;
         bool stopvu = false ;
         std::ifstream fichier( LogFile.c_str() );
-        if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+        if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
         {
           std::string ligne; // variable contenant chaque ligne lue
           while ( std::getline( fichier, ligne ) )
@@ -2613,7 +2624,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
     }
   }
 
-  // I. Menage et retour dans le repertoire du cas
+  // I. Menage et retour dans le répertoire du cas
   if (codret == 0)
   {
     delete myDriver;
@@ -2622,14 +2633,28 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena
     CHDIR(nomDirWork.c_str());
   }
 
+  // J. Suivi de la frontière CAO
+//   std::cout << "- codret : " << codret << std::endl;
+//   std::cout << "- modeHOMARD : " << modeHOMARD << std::endl;
+//   std::cout << "- BoundaryOption : " << BoundaryOption << std::endl;
+//   std::cout << "- codretexec : " << codretexec << std::endl;
+  if (codret == 0)
+  {
+    if ( ( modeHOMARD == 1 ) && ( BoundaryOption % 5 == 0 ) && (codretexec == 0) )
+    {
+      INFOS ( "Suivi de frontière CAO" );
+      codret = ComputeCAO(myCase, myIteration, Option1, Option2) ;
+    }
+  }
+
   return codretexec ;
 }
 //=============================================================================
-// Calcul d'une iteration : partie specifique a l'adaptation
+// Calcul d'une iteration : partie spécifique à l'adaptation
 //=============================================================================
 CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option1, CORBA::Long Option2)
 {
-  MESSAGE ( "ComputeAdap" );
+  MESSAGE ( "ComputeAdap avec Option1 = " << Option1 << ", Option2 = " << Option2 );
 
   // A. Prealable
   // A.1. Bases
@@ -2670,11 +2695,11 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
     }
   };
 
-  // C. Le sous-repertoire de l'iteration precedente
+  // C. Le sous-répertoire de l'iteration precedente
   char* DirComputePa = ComputeDirPaManagement(myCase, myIteration);
   MESSAGE( ". DirComputePa = " << DirComputePa );
 
-  // D. Les donnees de l'adaptation HOMARD
+  // D. Les données de l'adaptation HOMARD
   // D.1. Le type de conformite
   int ConfType = myCase->GetConfType();
   MESSAGE ( ". ConfType = " << ConfType );
@@ -2783,14 +2808,221 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
   return codret ;
 }
 //=============================================================================
-// Creation d'un nom de sous-repertoire pour l'iteration au sein d'un repertoire parent
-//  nomrep : nom du repertoire parent
-//  num : le nom du sous-repertoire est sous la forme 'In', n est >= num
+// Calcul d'une iteration : partie spécifique au suivi de frontière CAO
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::ComputeCAO(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2)
+{
+  MESSAGE ( "ComputeCAO avec Option1 = " << Option1 << ", Option2 = " << Option2 );
+
+  // A. Prealable
+  // A.1. Bases
+  int codret = 0;
+  // A.2. Le sous-répertoire de l'iteration en cours de traitement
+  char* DirCompute = myIteration->GetDirName();
+  // A.3. Le maillage résultat de l'iteration en cours de traitement
+  char* MeshFile = myIteration->GetMeshFile();
+
+  // B. Les données pour FrontTrack
+  // B.1. Le maillage à modifier
+  const std::string theInputMedFile = MeshFile;
+  MESSAGE ( ". theInputMedFile  = " << theInputMedFile );
+
+  // B.2. Le maillage après modification : fichier identique
+  const std::string theOutputMedFile = MeshFile ;
+  MESSAGE ( ". theOutputMedFile = " << theInputMedFile );
+
+  // B.3. La liste des fichiers contenant les numéros des noeuds à bouger
+  std::vector< std::string > theInputNodeFiles ;
+  MESSAGE ( ". DirCompute = " << DirCompute );
+  int bilan ;
+  int icpt = 0 ;
+#ifndef WIN32
+  DIR *dp;
+  struct dirent *dirp;
+  dp  = opendir(DirCompute);
+  while ( (dirp = readdir(dp)) != NULL )
+  {
+    std::string file_name(dirp->d_name);
+    bilan = file_name.find("fr") ;
+    if ( bilan != string::npos )
+    {
+      std::stringstream filename_total ;
+      filename_total << DirCompute << "/" << file_name ;
+      theInputNodeFiles.push_back(filename_total.str()) ;
+      icpt += 1 ;
+    }
+  }
+#else
+  HANDLE hFind = INVALID_HANDLE_VALUE;
+  WIN32_FIND_DATA ffd;
+  hFind = FindFirstFile(DirNameStart, &ffd);
+  if (INVALID_HANDLE_VALUE != hFind) {
+    while (FindNextFile(hFind, &ffd) != 0) {
+      std::string file_name(ffd.cFileName);
+      bilan = file_name.find("fr") ;
+      if ( bilan != string::npos )
+      {
+        std::stringstream filename_total ;
+        filename_total << DirCompute << "/" << file_name ;
+        theInputNodeFiles.push_back(filename_total.str()) ;
+        icpt += 1 ;
+      }
+    }
+    FindClose(hFind);
+  }
+#endif
+  for ( int i = 0; i < icpt; i++ )
+  { MESSAGE ( ". theInputNodeFiles["<< i << "] = " << theInputNodeFiles[i] ); }
+
+  // B.4. Le fichier de la CAO
+  HOMARD::ListBoundaryGroupType* ListBoundaryGroupType = myCase->GetBoundaryGroup();
+  std::string BoundaryName = std::string((*ListBoundaryGroupType)[0]);
+  MESSAGE ( ". BoundaryName = " << BoundaryName );
+  HOMARD::HOMARD_Boundary_var myBoundary = myStudyContext._mesBoundarys[BoundaryName];
+  const std::string theXaoFileName = myBoundary->GetDataFile();
+  MESSAGE ( ". theXaoFileName = " << theXaoFileName );
+
+  // B.5. Parallélisme
+  bool theIsParallel = false;
+
+  // C. Lancement des projections
+  MESSAGE ( ". Lancement des projections" );
+  FrontTrack* myFrontTrack = new 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, Option1, Option2) ;
+
+  return codret ;
+}
+//=============================================================================
+//=============================================================================
+// Transfert des coordonnées en suivi de frontière CAO
+// Option1 >0 : appel depuis python
+//         <0 : appel depuis GUI
+// Option2 : multiple de nombres premiers
+//         1 : aucune option
+//        x2 : publication du maillage dans SMESH
+//=============================================================================
+CORBA::Long HOMARD_Gen_i::ComputeCAObis(HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2)
+{
+  MESSAGE ( "ComputeCAObis, avec Option1 = " << Option1 << ", Option2 = " << Option2 );
+
+  // A. Prealable
+  int codret = 0;
+
+  // A.1. Controle de la possibilite d'agir
+  // A.1.1. Etat de l'iteration
+  int etat = myIteration->GetState();
+  MESSAGE ( "etat = "<<etat );
+  // A.1.2. L'iteration doit être calculee
+  if ( etat == 1 )
+  {
+    SALOME::ExceptionStruct es;
+    es.type = SALOME::BAD_PARAM;
+    es.text = "This iteration is not computed.";
+    throw SALOME::SALOME_Exception(es);
+    return 1 ;
+  }
+  // A.2. Numero de l'iteration
+  //     siterp1 : numero de l'iteration a traiter
+  int NumeIter = myIteration->GetNumber();
+  std::string siterp1 ;
+  std::stringstream saux1 ;
+  saux1 << NumeIter ;
+  siterp1 = saux1.str() ;
+  if (NumeIter < 10) { siterp1 = "0" + siterp1 ; }
+  MESSAGE ( "siterp1 = "<<siterp1 );
+
+  // A.3. Le cas
+  const char* CaseName = myIteration->GetCaseName();
+  HOMARD::HOMARD_Cas_var myCase = myStudyContext._mesCas[CaseName];
+  ASSERT(!CORBA::is_nil(myCase));
+
+  // A.4. Le sous-répertoire de l'iteration a traiter
+  char* DirCompute = myIteration->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());
+
+   // D. On passe dans le répertoire de l'iteration a calculer
+  MESSAGE ( ". On passe dans DirCompute = " << DirCompute );
+  CHDIR(DirCompute);
+
+  // E. Les données de l'exécution HOMARD
+  // E.1. L'objet du texte du fichier de configuration
+  HomardDriver* myDriver = new HomardDriver("", siterp1);
+  myDriver->TexteInit(DirCompute, LogFile, _Langue);
+
+  // E.2. Le maillage associe a l'iteration
+  const char* NomMesh = myIteration->GetMeshName();
+  MESSAGE ( ". NomMesh = " << NomMesh );
+  const char* MeshFile = myIteration->GetMeshFile();
+  MESSAGE ( ". MeshFile = " << MeshFile );
+
+  // E.3. Les données du traitement HOMARD
+  int iaux ;
+  myDriver->TexteMajCoords( NumeIter ) ;
+  iaux = 0 ;
+  myDriver->TexteMaillageHOMARD( DirCompute, siterp1, iaux ) ;
+  myDriver->TexteMaillage(NomMesh, MeshFile, 0);
+//
+  // E.4. Ecriture du texte dans le fichier
+  MESSAGE ( ". Ecriture du texte dans le fichier de configuration ; codret = "<<codret );
+  if (codret == 0)
+  { myDriver->CreeFichier(); }
+
+// F. Execution
+//
+  int codretexec = 1789 ;
+  if (codret == 0)
+  {
+    codretexec = myDriver->ExecuteHomard(Option1);
+    MESSAGE ( "Erreur en executant HOMARD : " << codretexec );
+  }
+
+  // G. Gestion des resultats
+  if (codret == 0)
+  {
+    // G.1. Le fichier des messages, dans tous les cas
+    const char* NomIteration = myIteration->GetName();
+    std::string Commentaire = "logmaj_coords" ;
+    PublishFileUnderIteration(NomIteration, LogFile.c_str(), Commentaire.c_str());
+    // G.2 Message d'erreur
+    if (codretexec != 0)
+    {
+      std::string text = "\n\nSee the file " + LogFile + "\n" ;
+      INFOS ( text ) ;
+      SALOME::ExceptionStruct es;
+      es.type = SALOME::BAD_PARAM;
+      es.text = CORBA::string_dup(text.c_str());
+      throw SALOME::SALOME_Exception(es);
+
+      // On force le succes pour pouvoir consulter le fichier log
+      codretexec = 0 ;
+    }
+  }
+
+  // H. Menage et retour dans le répertoire du cas
+  if (codret == 0) { delete myDriver; }
+
+  return codret ;
+}
+//=============================================================================
+// Creation d'un nom de sous-répertoire pour l'iteration au sein d'un répertoire parent
+//  nomrep : nom du répertoire parent
+//  num : le nom du sous-répertoire est sous la forme 'In', n est >= num
 //=============================================================================
 char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
 {
   MESSAGE ( "CreateDirNameIter : nomrep ="<< nomrep << ", num = "<<num);
-  // On verifie que le repertoire parent existe
+  // On verifie que le répertoire parent existe
   int codret = CHDIR(nomrep) ;
   if ( codret != 0 )
   {
@@ -2802,11 +3034,11 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
   };
   std::string nomDirActuel = getenv("PWD") ;
   std::string DirName ;
-  // On boucle sur tous les noms possibles jusqu'a trouver un nom correspondant a un repertoire inconnu
+  // On boucle sur tous les noms possibles jusqu'a trouver un nom correspondant a un répertoire inconnu
   bool a_chercher = true ;
   while ( a_chercher )
   {
-    // On passe dans le repertoire parent
+    // On passe dans le répertoire parent
 
     CHDIR(nomrep);
     // On recherche un nom sous la forme Iabc, avec abc representant le numero
@@ -2820,7 +3052,7 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
     iaux << std::setw(jaux) << std::setfill('0') << num ;
     std::ostringstream DirNameA ;
     DirNameA << "I" << iaux.str();
-    // Si on ne pas peut entrer dans le repertoire, on doit verifier
+    // Si on ne pas peut entrer dans le répertoire, on doit verifier
     // que c'est bien un probleme d'absence
     if ( CHDIR(DirNameA.str().c_str()) != 0 )
     {
@@ -2864,29 +3096,29 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num )
   return CORBA::string_dup( DirName.c_str() );
 }
 //=============================================================================
-// Calcul d'une iteration : gestion du repertoire de calcul
-//        Si le sous-repertoire existe :
-//         etatMenage =  0 : on sort en erreur si le repertoire n'est pas vide
-//         etatMenage =  1 : on fait le menage du repertoire
+// Calcul d'une iteration : gestion du répertoire de calcul
+//        Si le sous-répertoire existe :
+//         etatMenage =  0 : on sort en erreur si le répertoire n'est pas vide
+//         etatMenage =  1 : on fait le menage du répertoire
 //         etatMenage = -1 : on ne fait rien
 //=============================================================================
 char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage)
 {
-  MESSAGE ( "ComputeDirManagement : repertoires pour le calcul" );
-  // B.2. Le repertoire du cas
+  MESSAGE ( "ComputeDirManagement : répertoires pour le calcul" );
+  // B.2. Le répertoire du cas
   const char* nomDirCase = myCase->GetDirName();
   MESSAGE ( ". nomDirCase = " << nomDirCase );
 
-  // B.3. Le sous-repertoire de l'iteration a calculer, puis le repertoire complet a creer
-  // B.3.1. Le nom du sous-repertoire
+  // 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();
 
-  // B.3.2. Le nom complet du sous-repertoire
+  // B.3.2. Le nom complet du sous-répertoire
   std::stringstream DirCompute ;
   DirCompute << nomDirCase << "/" << nomDirIt;
   MESSAGE (". DirCompute = " << DirCompute.str() );
 
-  // B.3.3. Si le sous-repertoire n'existe pas, on le cree
+  // B.3.3. Si le sous-répertoire n'existe pas, on le cree
   if (CHDIR(DirCompute.str().c_str()) != 0)
   {
 #ifndef WIN32
@@ -2896,24 +3128,24 @@ char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::
 #endif
     {
        // GERALD -- QMESSAGE BOX
-       std::cerr << "Pb Creation du repertoire DirCompute = " << DirCompute.str() << std::endl;
-       VERIFICATION("Pb a la creation du repertoire" == 0);
+       std::cerr << "Pb Creation du répertoire DirCompute = " << DirCompute.str() << std::endl;
+       VERIFICATION("Pb a la creation du répertoire" == 0);
     }
   }
   else
   {
-//  Le repertoire existe
+//  Le répertoire existe
 //  On demande de faire le menage de son contenu :
     if (etatMenage == 1)
     {
-      MESSAGE (". Menage du repertoire DirCompute = " << DirCompute.str());
+      MESSAGE (". Menage du répertoire DirCompute = " << DirCompute.str());
       std::string commande = "rm -rf " + DirCompute.str()+"/*" ;
       int codret = system(commande.c_str());
       if (codret != 0)
       {
         // GERALD -- QMESSAGE BOX
-        std::cerr << ". Menage du repertoire de calcul" << DirCompute.str() << std::endl;
-        VERIFICATION("Pb au menage du repertoire de calcul" == 0);
+        std::cerr << ". Menage du répertoire de calcul" << DirCompute.str() << std::endl;
+        VERIFICATION("Pb au menage du répertoire de calcul" == 0);
       }
     }
 //  On n'a pas demande de faire le menage de son contenu : on sort en erreur :
@@ -2962,16 +3194,16 @@ char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::
   return CORBA::string_dup( DirCompute.str().c_str() );
 }
 //=============================================================================
-// Calcul d'une iteration : gestion du repertoire de calcul de l'iteration parent
+// Calcul d'une iteration : gestion du répertoire de calcul de l'iteration parent
 //=============================================================================
 char* HOMARD_Gen_i::ComputeDirPaManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration)
 {
-  MESSAGE ( "ComputeDirPaManagement : repertoires pour le calcul" );
-  // Le repertoire du cas
+  MESSAGE ( "ComputeDirPaManagement : répertoires pour le calcul" );
+  // Le répertoire du cas
   const char* nomDirCase = myCase->GetDirName();
   MESSAGE ( ". nomDirCase = " << nomDirCase );
 
-  // Le sous-repertoire de l'iteration precedente
+  // Le sous-répertoire de l'iteration precedente
 
   const char* nomIterationParent = myIteration->GetIterParentName();
   HOMARD::HOMARD_Iteration_var myIterationParent = myStudyContext._mesIterations[nomIterationParent];
@@ -3064,11 +3296,8 @@ void HOMARD_Gen_i::DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HO
   for (int NumeComp = 0; NumeComp< numberOfCompos; NumeComp++)
   {
     std::string nomCompo = std::string((*mescompo)[NumeComp]);
-    if ((system(nomCompo.c_str())) != 0)
-    {
-      MESSAGE( "... nomCompo = " << nomCompo );
-      myDriver->TexteCompo(NumeComp, nomCompo);
-    }
+    MESSAGE( "... nomCompo = " << nomCompo );
+    myDriver->TexteCompo(NumeComp, nomCompo);
   }
   return ;
 }
@@ -3079,7 +3308,7 @@ void HOMARD_Gen_i::DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HO
 //    2. les liens avec les groupes
 //    3. un entier resumant le type de comportement pour les frontieres
 //=============================================================================
-void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver)
+int HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver)
 {
   MESSAGE ( "... DriverTexteBoundary" );
   // 1. Recuperation des frontieres
@@ -3113,17 +3342,24 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
       int BoundaryType = myBoundary->GetType();
       MESSAGE ( "... BoundaryType = " << BoundaryType );
       // 2.2.2. Ecriture selon le type
-      // 2.2.2.1. Cas d une frontiere discrete
-      if (BoundaryType == 0)
+      // 2.2.2.1. Cas d une frontiere CAO
+      if (BoundaryType == -1)
+      {
+//         const char* CAOFile = myBoundary->GetDataFile() ;
+//         MESSAGE ( ". CAOFile = " << CAOFile );
+        if ( BoundaryOption % 5 != 0 ) { BoundaryOption = BoundaryOption*5 ; }
+      }
+      // 2.2.2.2. Cas d une frontiere discrete
+      else if (BoundaryType == 0)
       {
         const char* MeshName = myBoundary->GetMeshName() ;
         MESSAGE ( ". MeshName = " << MeshName );
-        const char* MeshFile = myBoundary->GetMeshFile() ;
+        const char* MeshFile = myBoundary->GetDataFile() ;
         MESSAGE ( ". MeshFile = " << MeshFile );
         myDriver->TexteBoundaryDi( MeshName, MeshFile);
         if ( BoundaryOption % 2 != 0 ) { BoundaryOption = BoundaryOption*2 ; }
       }
-      // 2.2.2.1. Cas d une frontiere analytique
+      // 2.2.2.3. Cas d une frontiere analytique
       else
       {
         NumBoundaryAnalytical++ ;
@@ -3171,12 +3407,17 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
     // 3.1. Recuperation du nom du groupe
     std::string GroupName = std::string((*ListBoundaryGroupType)[NumBoundary+1]);
     MESSAGE ( "... GroupName = " << GroupName);
-    // 3.2. Cas d une frontiere discrete
-    if ( BoundaryType == 0 )
+    // 3.2. Cas d une frontiere CAO
+    if ( BoundaryType == -1 )
+    {
+      if ( GroupName.size() > 0 ) { myDriver->TexteBoundaryCAOGr ( GroupName ) ; }
+    }
+    // 3.3. Cas d une frontiere discrete
+    else if ( BoundaryType == 0 )
     {
       if ( GroupName.size() > 0 ) { myDriver->TexteBoundaryDiGr ( GroupName ) ; }
     }
-    // 3.3. Cas d une frontiere analytique
+    // 3.4. Cas d une frontiere analytique
     else
     {
       NumBoundaryAnalytical++ ;
@@ -3186,7 +3427,7 @@ void HOMARD_Gen_i::DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriv
   // 4. Ecriture de l'option finale
   myDriver->TexteBoundaryOption(BoundaryOption);
 //
-  return ;
+  return BoundaryOption ;
 }
 //=============================================================================
 // Calcul d'une iteration : ecriture des interpolations dans le fichier de configuration
@@ -3259,7 +3500,7 @@ void HOMARD_Gen_i::DriverTexteFieldInterp(HOMARD::HOMARD_Iteration_var myIterati
           }
           jaux += 2 ;
         }
-        // Si aucun instant n'a ??t?? d??fini
+        // Si aucun instant n'a été défini
         if ( tsrvu == 0 )
         {
           NumField += 1 ;
@@ -3932,7 +4173,7 @@ void HOMARD_Gen_i::PublishFileUnderYACS(const char* nomYACS, const char* NomFich
 // Creation d'un schema YACS
 // nomCas : nom du cas a traiter
 // FileName : nom du fichier contenant le script de lancement du calcul
-// DirName : le repertoire de lancement des calculs du sch??ma
+// DirName : le répertoire de lancement des calculs du schéma
 //=============================================================================
 HOMARD::HOMARD_YACS_ptr HOMARD_Gen_i::CreateYACSSchema (const char* nomYACS, const char* nomCas, const char* ScriptFile, const char* DirName, const char* MeshFile)
 {
@@ -3989,7 +4230,7 @@ HOMARD::HOMARD_YACS_ptr HOMARD_Gen_i::CreateYACSSchema (const char* nomYACS, con
   myYACS->SetMaxNode( defaut_i ) ;
   defaut_i = GetYACSMaxElem() ;
   myYACS->SetMaxElem( defaut_i ) ;
-  // D.3. Fichier de sauvegarde dans le repertoire du cas
+  // D.3. Fichier de sauvegarde dans le répertoire du cas
   HOMARD::HOMARD_Cas_ptr caseyacs = GetCase(nomCas) ;
   std::string dirnamecase = caseyacs->GetDirName() ;
   std::string XMLFile ;
@@ -4004,7 +4245,7 @@ HOMARD::HOMARD_YACS_ptr HOMARD_Gen_i::CreateYACSSchema (const char* nomYACS, con
 CORBA::Long HOMARD_Gen_i::YACSWrite(const char* nomYACS)
 {
   INFOS ( "YACSWrite : Ecriture de " << nomYACS );
-// Le repertoire du cas
+// Le répertoire du cas
   HOMARD::HOMARD_YACS_var myYACS = myStudyContext._mesYACSs[nomYACS];
   ASSERT(!CORBA::is_nil(myYACS));
 // Le nom du fichier du schema
@@ -4094,7 +4335,7 @@ CORBA::Long HOMARD_Gen_i::YACSWriteOnFile(const char* nomYACS, const char* XMLFi
   MESSAGE ("pythonHypo :\n"<<pythonHypo<<"\n");
 
   // F. Le fichier du schema de reference
-  // HOMARD_ROOT_DIR : repertoire ou se trouve le module HOMARD
+  // HOMARD_ROOT_DIR : répertoire ou se trouve le module HOMARD
   std::string XMLFile_base ;
   if ( getenv("HOMARD_ROOT_DIR") != NULL ) { XMLFile_base = getenv("HOMARD_ROOT_DIR") ; }
   else
@@ -4110,12 +4351,12 @@ CORBA::Long HOMARD_Gen_i::YACSWriteOnFile(const char* nomYACS, const char* XMLFi
 //   if ( _Langue ==
   MESSAGE("XMLFile_base ="<<XMLFile_base);
 
-  // G. Lecture du schema de reference et insertion des donnees propres au fil de la rencontre des mots-cles
+  // G. Lecture du schema de reference et insertion des données propres au fil de la rencontre des mots-cles
   YACSDriver* myDriver = new YACSDriver(XMLFile, DirName);
   std::ifstream fichier( XMLFile_base.c_str() );
-  if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+  if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
   {
-    // G.1. Lecture du schema de reference et insertion des donnees propres au fil de la rencontre des mots-cles
+    // G.1. Lecture du schema de reference et insertion des données propres au fil de la rencontre des mots-cles
     std::string ligne; // variable contenant chaque ligne lue
     std::string mot_cle;
     while ( std::getline( fichier, ligne ) )
@@ -4132,7 +4373,7 @@ CORBA::Long HOMARD_Gen_i::YACSWriteOnFile(const char* nomYACS, const char* XMLFi
       // G.1.4. Les options du cas
       else if ( mot_cle == "Iter_1_Case_Options" )
       { myDriver->Texte_Iter_1_Case_Options(pythonCas); }
-      // G.1.5. Execution de HOMARD : le repertoire du cas
+      // G.1.5. Execution de HOMARD : le répertoire du cas
       else if ( mot_cle == "HOMARD_Exec_DirName" )
       { myDriver->Texte_HOMARD_Exec_DirName(); }
       // G.1.6. Execution de HOMARD : le nom du maillage
@@ -4286,16 +4527,21 @@ std::string HOMARD_Gen_i::YACSDriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase,
       int BoundaryType = myBoundary->GetType();
       MESSAGE ( "... BoundaryType = " << BoundaryType);
       const char* MeshName ;
-      const char* MeshFile ;
-      if (BoundaryType == 0)
+      const char* DataFile ;
+      if (BoundaryType == -1)
+      {
+        DataFile = myBoundary->GetDataFile() ;
+        MESSAGE ( ". CAOFile = " << DataFile );
+      }
+      else if (BoundaryType == 0)
       {
         MeshName = myBoundary->GetMeshName() ;
         MESSAGE ( ". MeshName = " << MeshName );
-        MeshFile = myBoundary->GetMeshFile() ;
-        MESSAGE ( ". MeshFile = " << MeshFile );
+        DataFile = myBoundary->GetDataFile() ;
+        MESSAGE ( ". MeshFile = " << DataFile );
       }
       std::string texte_control_0 ;
-      texte_control_0 = myDriver->Texte_Iter_1_Boundary(BoundaryType, pythonStructure, methode, BoundaryName, MeshName, MeshFile );
+      texte_control_0 = myDriver->Texte_Iter_1_Boundary(BoundaryType, pythonStructure, methode, BoundaryName, MeshName, DataFile );
       texte_control += texte_control_0 ;
       // 5. Memorisation du traitement
       ListeBoundaryTraitees.push_back( BoundaryName );
@@ -4985,7 +5231,7 @@ void HOMARD_Gen_i::SetPreferences( )
   File += "/bin/salome/VERSION" ;
   MESSAGE ( "File = "<<File ) ;
   std::ifstream fichier0( File.c_str() ) ;
-  if ( fichier0 ) // ce test ??choue si le fichier n'est pas ouvert
+  if ( fichier0 ) // ce test échoue si le fichier n'est pas ouvert
   {
     std::string ligne; // variable contenant chaque ligne lue
     while ( std::getline( fichier0, ligne ) )
@@ -5011,7 +5257,7 @@ void HOMARD_Gen_i::SetPreferences( )
     MESSAGE ( "PrefFile = "<<PrefFile ) ;
 
     std::ifstream fichier( PrefFile.c_str() );
-    if ( fichier ) // ce test ??choue si le fichier n'est pas ouvert
+    if ( fichier ) // ce test échoue si le fichier n'est pas ouvert
     {
       bool section_langue = false ;
       bool section_homard = false ;
index 856e25f148c0b497c83b9c0a3e40b10e21436e1a..d93c0cf11977818e402bca40e56b5df517a582af 100644 (file)
 #include "HOMARD_Gen.hxx"
 #include "HomardDriver.hxx"
 #include "YACSDriver.hxx"
+#include "FrontTrack.hxx"
 #include "SALOME_Component_i.hxx"
 #include "SALOME_NamingService.hxx"
 #include "Utils_CorbaException.hxx"
 
-
 #include <string>
 #include <map>
 
@@ -60,8 +60,10 @@ public:
 
 // Les creations
   HOMARD::HOMARD_Boundary_ptr     CreateBoundary (const char* nomBoundary, CORBA::Long typeBoundary);
+  HOMARD::HOMARD_Boundary_ptr     CreateBoundaryCAO(const char* nomBoundary,
+                                                    const char* DataFile);
   HOMARD::HOMARD_Boundary_ptr     CreateBoundaryDi (const char* nomBoundary,
-                                                    const char* MeshName, const char* FileName);
+                                                    const char* MeshName, const char* DataFile);
   HOMARD::HOMARD_Boundary_ptr     CreateBoundaryCylinder (const char* nomBoundary,
                                       CORBA::Double Xcentre, CORBA::Double Ycentre, CORBA::Double Zcentre,
                                       CORBA::Double Xaxis, CORBA::Double Yaxis, CORBA::Double Zaxis,
@@ -175,11 +177,13 @@ public:
 
   CORBA::Long                     Compute(const char* nomIteration, CORBA::Long etatMenage, CORBA::Long modeHOMARD, CORBA::Long Option1, CORBA::Long Option2);
   CORBA::Long                     ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage, HomardDriver* myDriver, CORBA::Long Option1, CORBA::Long Option2);
+  CORBA::Long                     ComputeCAO(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2);
+  CORBA::Long                     ComputeCAObis(HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long Option1, CORBA::Long Option2);
   char*                           ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration, CORBA::Long etatMenage);
   char*                           ComputeDirPaManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOMARD_Iteration_var myIteration);
   void                            DriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
   void                            DriverTexteField(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
-  void                            DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
+  int                             DriverTexteBoundary(HOMARD::HOMARD_Cas_var myCase, HomardDriver* myDriver);
   void                            DriverTexteFieldInterp(HOMARD::HOMARD_Iteration_var myIteration, HOMARD::HOMARD_Hypothesis_var myHypo, HomardDriver* myDriver);
 
   char*                           VerifieDir(const char* nomDir);