]> SALOME platform Git repositories - modules/homard.git/blobdiff - src/HOMARD/HOMARD_Iteration.cxx
Salome HOME
Selection of the last time step; Back to the current directory after a computation...
[modules/homard.git] / src / HOMARD / HOMARD_Iteration.cxx
index c65ad8237711790efbd52cf2174486a2555eb992..922a5a2a8762da9d8afb1fd28c9e5062c60d2ac7 100644 (file)
@@ -98,8 +98,14 @@ std::string HOMARD_Iteration::GetDumpPython() const
 // Le fichier des champs, avec l'instant eventuel
   if ( _FieldFile != "" ) {
     aScript << "\t" << _Name << ".SetFieldFile(\"" << _FieldFile << "\")\n";
-    if ( ( _TimeStep != -1 ) and ( _Rank != -1 ) ) {
-      aScript << "\t" << _Name << ".SetTimeStepRank( " << _TimeStep << ", " << _Rank << " )\n";
+    if ( _TimeStep == -2 ) {
+      aScript << "\t" << _Name << ".SetTimeStepRankLast()\n";
+    }
+    else
+    {
+      if ( ( _TimeStep != -1 ) and ( _Rank != -1 ) ) {
+        aScript << "\t" << _Name << ".SetTimeStepRank( " << _TimeStep << ", " << _Rank << " )\n";
+      }
     }
   }
 
@@ -189,6 +195,11 @@ void HOMARD_Iteration::SetTimeStepRank( int TimeStep, int Rank )
   _Rank = Rank;
 }
 //=============================================================================
+void HOMARD_Iteration::SetTimeStepRankLast()
+{
+  _TimeStep = -2;
+}
+//=============================================================================
 int HOMARD_Iteration::GetTimeStep() const
 {
   return _TimeStep;