]> SALOME platform Git repositories - modules/homard.git/blobdiff - src/HOMARD/HOMARD_Iteration.cxx
Salome HOME
integration of modifications from Gerald Nicolas
[modules/homard.git] / src / HOMARD / HOMARD_Iteration.cxx
index 2633b4b151394a68c80dd71f1e2cd731f6a5c8b6..c65ad8237711790efbd52cf2174486a2555eb992 100644 (file)
 //  File   : HOMARD_Iteration.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
 
 #include "HOMARD_Iteration.hxx"
 #include "utilities.h"
@@ -51,28 +60,20 @@ HOMARD_Iteration::~HOMARD_Iteration()
 {
   MESSAGE("~HOMARD_Iteration");
 }
-
 //=============================================================================
-/*!
-*/
+//=============================================================================
+// Generalites
+//=============================================================================
 //=============================================================================
 void HOMARD_Iteration::SetName( const char* Name )
 {
   _Name = std::string( Name );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 std::string HOMARD_Iteration::GetName() const
 {
   return _Name;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 std::string HOMARD_Iteration::GetDumpPython() const
 {
@@ -118,221 +119,155 @@ std::string HOMARD_Iteration::GetDumpPython() const
   return aScript.str();
 }
 //=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetEtat( bool etat )
-{
-  _Etat = etat;
-}
-
+// Caracteristiques
 //=============================================================================
-/*!
-*/
 //=============================================================================
-bool HOMARD_Iteration::GetEtat() const
+void HOMARD_Iteration::SetDirName( const char* NomDir )
 {
-  return _Etat;
+  _NomDir = std::string( NomDir );
 }
-
 //=============================================================================
-/*!
-*/
+std::string HOMARD_Iteration::GetDirName() const
+{
+   return _NomDir;
+}
 //=============================================================================
 void HOMARD_Iteration::SetNumber( int NumIter )
 {
   _NumIter = NumIter;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 int HOMARD_Iteration::GetNumber() const
 {
   return _NumIter;
 }
-
 //=============================================================================
-/*!
-*/
+void HOMARD_Iteration::SetEtat( bool etat )
+{
+  _Etat = etat;
+}
+//=============================================================================
+bool HOMARD_Iteration::GetEtat() const
+{
+  return _Etat;
+}
 //=============================================================================
 void HOMARD_Iteration::SetMeshName( const char* NomMesh )
 {
   _NomMesh = std::string( NomMesh );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
 std::string HOMARD_Iteration::GetMeshName() const
 {
   return _NomMesh;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetIterParentName( const char* IterParent )
+void HOMARD_Iteration::SetMeshFile( const char* MeshFile )
 {
-  _IterParent = IterParent;
+  _MeshFile = std::string( MeshFile );
 }
-
 //=============================================================================
-/*!
-*/
-//=============================================================================
-std::string HOMARD_Iteration::GetIterParentName() const
+std::string HOMARD_Iteration::GetMeshFile() const
 {
-  return _IterParent;
+  return _MeshFile;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::AddIteration( const char* NomIteration )
+void HOMARD_Iteration::SetFieldFile( const char* FieldFile )
 {
-  _mesIterFilles.push_back( std::string( NomIteration ) );
+  _FieldFile = std::string( FieldFile );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-const std::list<std::string>& HOMARD_Iteration::GetIterations() const
+std::string HOMARD_Iteration::GetFieldFile() const
 {
-  return _mesIterFilles;
+  return _FieldFile;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SupprIterations()
+void HOMARD_Iteration::SetTimeStepRank( int TimeStep, int Rank )
 {
-  _mesIterFilles.clear();
+  _TimeStep = TimeStep;
+  _Rank = Rank;
 }
-
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetHypoName( const char* NomHypo )
+int HOMARD_Iteration::GetTimeStep() const
 {
-  _NomHypo = std::string( NomHypo );
+  return _TimeStep;
 }
-
 //=============================================================================
-/*!
-*/
-//=============================================================================
-std::string HOMARD_Iteration::GetHypoName() const
+int HOMARD_Iteration::GetRank() const
 {
-  return _NomHypo;
+  return _Rank;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetMeshFile( const char* MeshFile )
+void HOMARD_Iteration::SetMessFile( const char* MessFile )
 {
-  _MeshFile = std::string( MeshFile );
+  _MessFile = std::string( MessFile );
 }
-
 //=============================================================================
-/*!
-*/
-//=============================================================================
-std::string HOMARD_Iteration::GetMeshFile() const
+std::string HOMARD_Iteration::GetMessFile() const
 {
-  return _MeshFile;
+  return _MessFile;
 }
-
 //=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetFieldFile( const char* FieldFile )
+// Liens avec les autres iterations
+//=============================================================================
+//=============================================================================
+void HOMARD_Iteration::LinkNextIteration( const char* NomIteration )
 {
-  _FieldFile = std::string( FieldFile );
+  _mesIterFilles.push_back( std::string( NomIteration ) );
 }
 //=============================================================================
-std::string HOMARD_Iteration::GetFieldFile() const
+void HOMARD_Iteration::UnLinkNextIteration( const char* NomIteration )
 {
-  return _FieldFile;
+  std::list<std::string>::iterator it = find( _mesIterFilles.begin(), _mesIterFilles.end(), NomIteration ) ;
+  if ( it != _mesIterFilles.end() )
+  {
+    MESSAGE ("Dans UnLinkNextIteration pour " << NomIteration) ;
+    _mesIterFilles.erase( it ) ;
+  }
 }
-
 //=============================================================================
-/*!
-*/
-//=============================================================================
-void HOMARD_Iteration::SetTimeStepRank( int TimeStep, int Rank )
+void HOMARD_Iteration::UnLinkNextIterations()
 {
-  _TimeStep = TimeStep;
-  _Rank = Rank;
+  _mesIterFilles.clear();
 }
 //=============================================================================
-int HOMARD_Iteration::GetTimeStep() const
+const std::list<std::string>& HOMARD_Iteration::GetIterations() const
 {
-  return _TimeStep;
+  return _mesIterFilles;
 }
 //=============================================================================
-int HOMARD_Iteration::GetRank() const
+void HOMARD_Iteration::SetIterParentName( const char* IterParent )
 {
-  return _Rank;
+  _IterParent = IterParent;
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetCaseName( const char* NomCas )
+std::string HOMARD_Iteration::GetIterParentName() const
 {
-  _NomCas = std::string( NomCas );
+  return _IterParent;
 }
-
 //=============================================================================
-/*!
-*/
 //=============================================================================
-std::string HOMARD_Iteration::GetCaseName() const
-{
-  return _NomCas;
-}
+// Liens avec les autres structures
 //=============================================================================
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetDirName( const char* NomDir )
+void HOMARD_Iteration::SetCaseName( const char* NomCas )
 {
-  _NomDir = std::string( NomDir );
+  _NomCas = std::string( NomCas );
 }
 //=============================================================================
-/*!
-*/
-//=============================================================================
-std::string HOMARD_Iteration::GetDirName() const
+std::string HOMARD_Iteration::GetCaseName() const
 {
-   return _NomDir;
+  return _NomCas;
 }
-/*!
-*/
 //=============================================================================
-void HOMARD_Iteration::SetMessFile( const char* MessFile )
+void HOMARD_Iteration::SetHypoName( const char* NomHypo )
 {
-  _MessFile = std::string( MessFile );
+  _NomHypo = std::string( NomHypo );
 }
-
-//=============================================================================
-/*!
-*/
 //=============================================================================
-std::string HOMARD_Iteration::GetMessFile() const
+std::string HOMARD_Iteration::GetHypoName() const
 {
-  return _MessFile;
+  return _NomHypo;
 }