-std::string HOMARD_Iteration::GetDumpPython() const
-{
- if (_IterParent == "") return std::string(" ") ; // Pas de creation explicite de iteration 0";
-
- MESSAGE (". Ecriture de l iteration " << _Name );
- std::ostringstream aScript;
- aScript << "\n# Creation of the iteration " << _Name << "\n";
- if( _NumIter == 1 )
- {
- aScript << "\t" << _Name << " = " << _NomCas << ".NextIteration(\"" << _Name << "\")\n";
- }
- else
- {
- aScript << "\t" << _Name << " = " << _IterParent << ".NextIteration(\"" << _Name << "\")\n";
- }
-// L'hypothese (doit etre au debut)
- aScript << "\t" << _Name << ".AssociateHypo(\"" << _NomHypo << "\")\n";
-// Le nom du maillage produit
-// MESSAGE (".. maillage produit " << _NomMesh );
- aScript << "\t" << _Name << ".SetMeshName(\"" << _NomMesh << "\")\n" ;
-// Le fichier du maillage produit
- aScript << "\t" << _Name << ".SetMeshFile(\"" << _MeshFile << "\")\n";
-// Le fichier des champs
- if ( _FieldFile != "" )
- {
- aScript << "\t" << _Name << ".SetFieldFile(\"" << _FieldFile << "\")\n";
- }
-// Si champ de pilotage, valeurs de pas de temps
- MESSAGE (". champ de pilotage : _TimeStep = " << _TimeStep << ", _Rank : " << _Rank);
- if ( _TimeStep != -1 )
- {
- if ( _TimeStep == -2 ) {
- aScript << "\t" << _Name << ".SetTimeStepRankLast()\n";
- }
- else
- {
- if ( _TimeStep != -1 )
- {
- if ( _Rank == -1 )
- {
- aScript << "\t" << _Name << ".SetTimeStep( " << _TimeStep << " )\n";
- }
- else
- {
- aScript << "\t" << _Name << ".SetTimeStepRank( " << _TimeStep << ", " << _Rank << " )\n";
- }
- }
- }
- }
-// Les instants d'interpolation
- MESSAGE (". instants d'interpolation ");
- std::list<std::string>::const_iterator it = _ListFieldInterpTSR.begin() ;
- while(it != _ListFieldInterpTSR.end())
- {
- std::string FieldName = std::string((*it)) ;
-// MESSAGE ("... FieldName = "<< FieldName);
- (*it++);
- std::string TimeStepstr = std::string((*it)) ;
-// MESSAGE ("... TimeStepstr = "<< TimeStepstr);
- (*it++);
- std::string Rankstr = std::string((*it)) ;
-// MESSAGE ("... Rankstr = "<< Rankstr);
- (*it++);
- aScript << "\t" << _Name << ".SetFieldInterpTimeStepRank( \"" << FieldName << "\"" ;
- aScript << ", " << TimeStepstr ;
- aScript << ", " << Rankstr << " )\n" ;
- }
-
-// Compute
- MESSAGE (". Compute ");
- if ( _Etat == 2 ) { aScript << "\tcodret = " <<_Name << ".Compute(1, 1)\n"; }
- else { aScript << "\t#codret = " <<_Name << ".Compute(1, 1)\n"; }
-// MESSAGE (". Fin de l ecriture de l iteration " << _Name );
-
- return aScript.str();
-}
-//=============================================================================