Salome HOME
InfoCompute
authornicolas <nicolas>
Tue, 27 Aug 2013 14:26:50 +0000 (14:26 +0000)
committernicolas <nicolas>
Tue, 27 Aug 2013 14:26:50 +0000 (14:26 +0000)
idl/HOMARD_Iteration.idl
src/HOMARD/HOMARD_Iteration.cxx
src/HOMARD/HOMARD_Iteration.hxx
src/HOMARD/HomardDriver.cxx
src/HOMARD/HomardDriver.hxx
src/HOMARDGUI/HOMARD_msg_fr.ts
src/HOMARDGUI/MonEditHypothesis.cxx
src/HOMARD_I/HOMARD_Gen_i.cxx
src/HOMARD_I/HOMARD_Iteration_i.cxx
src/HOMARD_I/HOMARD_Iteration_i.hxx

index dafec4492e8792b5bd93e80a6b1547c8958093ce..cbf487022a92b2523e9b729371639fc89d67ed4f 100644 (file)
@@ -104,6 +104,10 @@ module HOMARD
     void     AssociateHypo(in string NomHypo)              raises (SALOME::SALOME_Exception);
     void     SetHypoName(in string NomHypo)                raises (SALOME::SALOME_Exception);
     string   GetHypoName()                                 raises (SALOME::SALOME_Exception);
+
+// Divers
+    void     SetInfoCompute(in long MessInfo)              raises (SALOME::SALOME_Exception);
+    long     GetInfoCompute()                              raises (SALOME::SALOME_Exception);
   };
 };
 #endif
index b9f42d9221bd87f2f36c7d4c92cc4f08e0d58ba8..e9ec47322c0fc9fbd930775a9af3275e559dd6d2 100644 (file)
@@ -47,7 +47,8 @@ HOMARD_Iteration::HOMARD_Iteration():
   _LogFile( "" ),
   _IterParent( "" ),
   _NomHypo( "" ), _NomCas( "" ), _NomDir( "" ),
-  _FileInfo( "" )
+  _FileInfo( "" ),
+ _MessInfo( 1 )
 {
   MESSAGE("HOMARD_Iter");
 }
@@ -286,3 +287,17 @@ std::string HOMARD_Iteration::GetHypoName() const
 {
   return _NomHypo;
 }
+//=============================================================================
+//=============================================================================
+// Divers
+//=============================================================================
+//=============================================================================
+void HOMARD_Iteration::SetInfoCompute( int MessInfo )
+{
+  _MessInfo = MessInfo;
+}
+//=============================================================================
+int HOMARD_Iteration::GetInfoCompute() const
+{
+  return _MessInfo;
+}
index 3c76a195a81d3b0e20dc3504f0419f59226628bc..5013783dadee40f01639bd4f218322b9b96aa80f 100644 (file)
@@ -94,6 +94,10 @@ public:
   void                          SetHypoName( const char* NomHypo );
   std::string                   GetHypoName() const;
 
+// Divers
+  void                          SetInfoCompute( int MessInfo );
+  int                           GetInfoCompute() const;
+
 private:
   std::string                   _Name;
   int                           _Etat;
@@ -110,6 +114,7 @@ private:
   std::string                   _NomDir;
   std::list<std::string>        _mesIterFilles;
   std::string                   _FileInfo;
+  int                           _MessInfo;
 };
 
 #endif
index b9136cf2c612a2ad5ac4ef02dbbff947d1450512..dc65e673689f44eb7f592608f45d5a95fcdd7d0e 100644 (file)
@@ -932,7 +932,6 @@ void HomardDriver::TexteFieldInterpName( int NumeChamp, const std::string FieldN
 void HomardDriver::TexteAdvanced( int Pyram, int NivMax, double DiamMin, int AdapInit, int LevelOutput )
 {
   MESSAGE("TexteAdvanced, Pyram ="<<Pyram<<", NivMax ="<<NivMax<<", DiamMin ="<<DiamMin<<", AdapInit ="<<AdapInit<<", LevelOutput ="<<LevelOutput);
-  std::string saux ;
 
   if ( Pyram > 0 )
   {
@@ -977,6 +976,21 @@ void HomardDriver::TexteAdvanced( int Pyram, int NivMax, double DiamMin, int Ada
   }
 }
 //===============================================================================
+void HomardDriver::TexteInfoCompute( int MessInfo )
+{
+  MESSAGE("TexteAdvanced, MessInfo ="<<MessInfo);
+
+  if ( MessInfo != 0 )
+  {
+     _Texte += "# Messages d'informations\n" ;
+    { std::stringstream saux1 ;
+      saux1 << MessInfo ;
+      std::string saux2 = saux1.str() ;
+      _Texte += "MessInfo " + saux2  + "\n" ;
+    }
+   }
+}
+//===============================================================================
 void HomardDriver::CreeFichier( )
 {
 //
index 7377aa25eff229db0f34425d88234f569d6338ff..55f8180f46fb54c8c5e6e5ade96bcf675facf9f1 100644 (file)
@@ -55,8 +55,9 @@ public:
 
   void        TexteFieldInterp( int TypeFieldInterp, const std::string FieldFile, const std::string MeshFile,
                                 int TimeStep, int Rank );
-  void        TexteFieldInterpName( int NumeChamp, const std::string FieldName);
-  void        TexteAdvanced( int Pyram, int NivMax, double DiamMin, int AdapInit, int LevelOutput);
+  void        TexteFieldInterpName( int NumeChamp, const std::string FieldName );
+  void        TexteAdvanced( int Pyram, int NivMax, double DiamMin, int AdapInit, int LevelOutput );
+  void        TexteInfoCompute( int MessInfo );
   void        CloseFichier();
   //
   int         ExecuteHomard(int option);
index 440c580896f79974467b1cc00a857fafc053a092..630ec5d5312548f79dd268739f7ebf3a1cffcb77 100644 (file)
@@ -21,7 +21,7 @@
     </message>
     <message>
         <source>HOM_MEN_NEW_ITERATION</source>
-        <translation>Nouvelle itération</translation>
+        <translation>Itération suivante</translation>
     </message>
     <message>
         <source>HOM_MEN_PURSUE_ITERATION</source>
@@ -57,7 +57,7 @@
     </message>
     <message>
         <source>HOM_TOP_NEW_ITERATION</source>
-        <translation>Nouvelle itération</translation>
+        <translation>Itération suivante</translation>
     </message>
     <message>
         <source>HOM_TOP_PURSUE_ITERATION</source>
@@ -89,7 +89,7 @@
     </message>
     <message>
         <source>HOM_STB_NEW_ITERATION</source>
-        <translation>Nouvelle itération</translation>
+        <translation>Itération suivante</translation>
     </message>
     <message>
         <source>HOM_STB_PURSUE_ITERATION</source>
index 737e051210fe1738b479c31f3fcb2a5a9bd74349..cef6f6ca72da793c2680d15110bdce9f5a5162f5 100644 (file)
@@ -194,21 +194,21 @@ void MonEditHypothesis::InitAdaptZone()
     HOMARD::listeZonesHypo_var mesZonesAvant = _aHypothesis->GetZones();
     for (int i=0; i<mesZonesAvant->length(); i++)
     {
-    MESSAGE ("i"<<i<<", zone :"<<string(mesZonesAvant[i])<<", type :"<<string(mesZonesAvant[i+1]));
+      MESSAGE ("i"<<i<<", zone :"<<string(mesZonesAvant[i])<<", type :"<<string(mesZonesAvant[i+1]));
       for ( int j =0 ; j < TWZone->rowCount(); j++)
       {
-    MESSAGE (". j"<<j<<", zone :"<<TWZone->item(j,2)->text().toStdString());
+        MESSAGE (". j"<<j<<", zone :"<<TWZone->item(j,2)->text().toStdString());
         if ( TWZone->item(j,2)->text().toStdString() == string(mesZonesAvant[i]) )
         {
-    MESSAGE ("OK avec "<<string(mesZonesAvant[i]));
+          MESSAGE ("OK avec "<<string(mesZonesAvant[i]));
           if ( string(mesZonesAvant[i+1]) == "1" )
           {
-    MESSAGE ("... RAFF");
+            MESSAGE ("... RAFF");
             TWZone->item( j,0 )->setCheckState( Qt::Checked );
             TWZone->item( j,1 )->setCheckState( Qt::Unchecked ); }
           else
           {
-    MESSAGE ("... DERA");
+            MESSAGE ("... DERA");
             TWZone->item( j,0 )->setCheckState( Qt::Unchecked );
             TWZone->item( j,1 )->setCheckState( Qt::Checked ); }
           break;
@@ -246,8 +246,6 @@ void MonEditHypothesis::InitAdaptChamps()
     RBChamp->setEnabled(false);
     RBZone->setEnabled(false);
 
-
-
     HOMARD::InfosHypo_var  aInfosHypo = _aHypothesis->GetField();
     _aFieldName =  aInfosHypo->FieldName;
     _TypeThR = aInfosHypo->TypeThR;
@@ -257,7 +255,6 @@ void MonEditHypothesis::InitAdaptChamps()
     _UsField = aInfosHypo->UsField;
     _UsCmpI  = aInfosHypo->UsCmpI;
 
-
     CBFieldName->insertItem(0,_aFieldName);
     CBFieldName->setCurrentIndex(0);
     CBFieldName->setEnabled(false);
index 02407cd15c09f02bd4cf67781372e995fdd7ad16..f76c9d4032268eea5209fc5973b39f03b0779f58 100755 (executable)
@@ -2493,6 +2493,11 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM
   MESSAGE ( ". LevelOutput = " << LevelOutput );
   myDriver->TexteAdvanced(Pyram, NivMax, DiamMin, AdapInit, LevelOutput);
 
+  // E.7. Ajout des informations sur le deroulement de l'execution
+  int MessInfo = myIteration->GetInfoCompute();
+  MESSAGE ( ". MessInfo = " << MessInfo );
+  myDriver->TexteInfoCompute(MessInfo);
+
   return codret ;
 }
 //=============================================================================
index 136228c1e2356e3319d652c4f8135e0f8962fa25..3779a729f7c476f5c87c69eb598c6f209d6de7b8 100644 (file)
@@ -384,3 +384,19 @@ char* HOMARD_Iteration_i::GetHypoName()
   ASSERT( myHomardIteration );
   return CORBA::string_dup( myHomardIteration->GetHypoName().c_str() );
 }
+//=============================================================================
+//=============================================================================
+// Divers
+//=============================================================================
+//=============================================================================
+void HOMARD_Iteration_i::SetInfoCompute( CORBA::Long MessInfo )
+{
+  ASSERT( myHomardIteration );
+  myHomardIteration->SetInfoCompute( MessInfo );
+}
+//=============================================================================
+CORBA::Long HOMARD_Iteration_i::GetInfoCompute()
+{
+  ASSERT( myHomardIteration );
+  return  myHomardIteration->GetInfoCompute() ;
+}
index bf57bee90807f90fa79eeca4384fb8517c021aa7..aaaa2018e58aca879d7f1495cdb5d20a32c984a3 100644 (file)
@@ -120,6 +120,10 @@ public:
   void                   SetHypoName( const char* NomHypo );
   char*                  GetHypoName();
 
+// Divers
+  void                   SetInfoCompute( CORBA::Long MessInfo );
+  CORBA::Long            GetInfoCompute();
+
 private:
   ::HOMARD_Iteration*    myHomardIteration;