Salome HOME
Copyright update 2022
[modules/homard.git] / src / HOMARD_I / HOMARD_Cas_i.cxx
1 // Copyright (C) 2011-2022  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // Remarques :
21 // L'ordre de description des fonctions est le meme dans tous les fichiers
22 // HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
23 // 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
24 // 2. Les caracteristiques
25 // 3. Le lien avec les autres structures
26 //
27 // Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
28 //
29
30 #include "HOMARD_Cas_i.hxx"
31 #include "HOMARD_Gen_i.hxx"
32 #include "HOMARD_Cas.hxx"
33 #include "HOMARD_DriverTools.hxx"
34 #include "HOMARD.hxx"
35
36 #include "utilities.h"
37 #include <vector>
38 #include <sys/stat.h>
39
40 #ifdef WIN32
41 #include <direct.h>
42 #endif
43
44 //=============================================================================
45 /*!
46  *  standard constructor
47  */
48 //=============================================================================
49 HOMARD_Cas_i::HOMARD_Cas_i()
50 {
51   MESSAGE( "Default constructor, not for use" );
52   ASSERT( 0 );
53 }
54
55 //=============================================================================
56 /*!
57  *  standard constructor
58  */
59 //=============================================================================
60 HOMARD_Cas_i::HOMARD_Cas_i( CORBA::ORB_ptr orb,
61                             HOMARD::HOMARD_Gen_var engine )
62 {
63   MESSAGE( "HOMARD_Cas_i" );
64   _gen_i = engine;
65   _orb = orb;
66   myHomardCas = new ::HOMARD_Cas();
67   ASSERT( myHomardCas );
68 }
69
70 //=============================================================================
71 /*!
72  *  standard destructor
73  */
74 //=============================================================================
75 HOMARD_Cas_i::~HOMARD_Cas_i()
76 {
77 }
78 //=============================================================================
79 //=============================================================================
80 // Generalites
81 //=============================================================================
82 //=============================================================================
83 void HOMARD_Cas_i::SetName( const char* Name )
84 {
85   ASSERT( myHomardCas );
86   myHomardCas->SetName( Name );
87 }
88 //=============================================================================
89 char* HOMARD_Cas_i::GetName()
90 {
91   ASSERT( myHomardCas );
92   return CORBA::string_dup( myHomardCas->GetName().c_str() );
93 }
94 //=============================================================================
95 CORBA::Long  HOMARD_Cas_i::Delete( CORBA::Long Option )
96 {
97   ASSERT( myHomardCas );
98   char* CaseName = GetName() ;
99   MESSAGE ( "Delete : destruction du cas " << CaseName << ", Option = " << Option );
100   return _gen_i->DeleteCase(CaseName, Option) ;
101 }
102 //=============================================================================
103 char* HOMARD_Cas_i::GetDumpPython()
104 {
105   ASSERT( myHomardCas );
106   return CORBA::string_dup( myHomardCas->GetDumpPython().c_str() );
107 }
108 //=============================================================================
109 std::string HOMARD_Cas_i::Dump() const
110 {
111   return HOMARD::Dump( *myHomardCas );
112 }
113 //=============================================================================
114 bool HOMARD_Cas_i::Restore( const std::string& stream )
115 {
116   return HOMARD::Restore( *myHomardCas, stream );
117 }
118 //=============================================================================
119 //=============================================================================
120 // Caracteristiques
121 //=============================================================================
122 //=============================================================================
123 void HOMARD_Cas_i::SetDirName( const char* NomDir )
124 {
125   ASSERT( myHomardCas );
126   int codret ;
127   // A. recuperation du nom ; on ne fait rien si c'est le meme
128   char* oldrep = GetDirName() ;
129   if ( strcmp(oldrep,NomDir) == 0 )
130   {
131    return ;
132   }
133   MESSAGE ( "SetDirName : passage de oldrep = "<< oldrep << " a NomDir = "<<NomDir);
134   // B. controle de l'usage du repertoire
135   char* CaseName = GetName() ;
136   char* casenamedir = _gen_i->VerifieDir(NomDir) ;
137   if ( ( std::string(casenamedir).size() > 0 ) & ( strcmp(CaseName,casenamedir)!=0 ) )
138   {
139     INFOS ( "Le repertoire " << NomDir << " est deja utilise pour le cas "<< casenamedir );
140     SALOME::ExceptionStruct es;
141     es.type = SALOME::BAD_PARAM;
142     std::string text ;
143     text = "The directory " + std::string(NomDir) + " is already used for the case " + std::string(casenamedir) ;
144     es.text = CORBA::string_dup(text.c_str());
145     throw SALOME::SALOME_Exception(es);
146   }
147   // C. Changement/creation du repertoire
148   codret = myHomardCas->SetDirName( NomDir );
149   if ( codret != 0 )
150   {
151     SALOME::ExceptionStruct es;
152     es.type = SALOME::BAD_PARAM;
153     std::string text ;
154     if ( codret == 1 ) { text = "The directory for the case cannot be modified because some iterations are already defined." ; }
155     else               { text = "The directory for the case cannot be reached." ; }
156     es.text = CORBA::string_dup(text.c_str());
157     throw SALOME::SALOME_Exception(es);
158   }
159   // D. En cas de reprise, deplacement du point de depart
160   if ( GetState() != 0 )
161   {
162     MESSAGE ( "etat : " << GetState() ) ;
163     // D.1. Nom local du repertoire de l'iteration de depart dans le repertoire actuel du cas
164     HOMARD::HOMARD_Iteration_ptr Iter = GetIter0() ;
165     char* DirNameIter = Iter->GetDirNameLoc() ;
166     MESSAGE ( "SetDirName : nom actuel pour le repertoire de l iteration, DirNameIter = "<< DirNameIter);
167     // D.2. Recherche d'un nom local pour l'iteration de depart dans le futur repertoire du cas
168     char* nomDirIter = _gen_i->CreateDirNameIter(NomDir, 0 );
169     MESSAGE ( "SetDirName : nom futur pour le repertoire de l iteration, nomDirIter = "<< nomDirIter);
170     // D.3. Creation du futur repertoire local pour l'iteration de depart
171     std::string nomDirIterTotal ;
172     nomDirIterTotal = std::string(NomDir) + "/" + std::string(nomDirIter) ;
173 #ifndef WIN32
174     if (mkdir(nomDirIterTotal.c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0)
175 #else
176     if (_mkdir(nomDirIterTotal.c_str()) != 0)
177 #endif
178     {
179       MESSAGE ( "nomDirIterTotal : " << nomDirIterTotal ) ;
180       SALOME::ExceptionStruct es;
181       es.type = SALOME::BAD_PARAM;
182       std::string text = "The directory for the starting iteration cannot be created." ;
183       es.text = CORBA::string_dup(text.c_str());
184       throw SALOME::SALOME_Exception(es);
185     }
186     // D.4. Deplacement du contenu du repertoire
187     std::string oldnomDirIterTotal ;
188     oldnomDirIterTotal = std::string(oldrep) + "/" + std::string(DirNameIter) ;
189     std::string commande = "mv " + std::string(oldnomDirIterTotal) + "/*" + " " + std::string(nomDirIterTotal) ;
190     codret = system(commande.c_str()) ;
191     if ( codret != 0 )
192     {
193       SALOME::ExceptionStruct es;
194       es.type = SALOME::BAD_PARAM;
195       std::string text = "The starting point for the case cannot be moved into the new directory." ;
196       es.text = CORBA::string_dup(text.c_str());
197       throw SALOME::SALOME_Exception(es);
198     }
199     commande = "rm -rf " + std::string(oldnomDirIterTotal) ;
200     codret = system(commande.c_str()) ;
201     if ( codret != 0 )
202     {
203       SALOME::ExceptionStruct es;
204       es.type = SALOME::BAD_PARAM;
205       std::string text = "The starting point for the case cannot be deleted." ;
206       es.text = CORBA::string_dup(text.c_str());
207       throw SALOME::SALOME_Exception(es);
208     }
209     // D.5. Memorisation du nom du repertoire de l'iteration
210     Iter->SetDirNameLoc(nomDirIter) ;
211   }
212   return ;
213 }
214 //=============================================================================
215 char* HOMARD_Cas_i::GetDirName()
216 {
217   ASSERT( myHomardCas );
218   return CORBA::string_dup( myHomardCas->GetDirName().c_str() );
219 }
220 //=============================================================================
221 CORBA::Long HOMARD_Cas_i::GetState()
222 {
223   ASSERT( myHomardCas );
224 // Nom de l'iteration initiale
225   char* Iter0Name = GetIter0Name() ;
226   HOMARD::HOMARD_Iteration_ptr Iter = _gen_i->GetIteration(Iter0Name) ;
227   int state = Iter->GetNumber() ;
228   return state ;
229 }
230 //=============================================================================
231 CORBA::Long HOMARD_Cas_i::GetNumberofIter()
232 {
233   ASSERT( myHomardCas );
234   return myHomardCas->GetNumberofIter();
235 }
236 //=============================================================================
237 void HOMARD_Cas_i::SetConfType( CORBA::Long ConfType )
238 {
239   ASSERT( myHomardCas );
240 //   VERIFICATION( (ConfType>=-2) && (ConfType<=3) );
241   myHomardCas->SetConfType( ConfType );
242 }
243 //=============================================================================
244 CORBA::Long HOMARD_Cas_i::GetConfType()
245 {
246   ASSERT( myHomardCas );
247   return myHomardCas->GetConfType();
248 }
249 //=============================================================================
250 void HOMARD_Cas_i::SetExtType( CORBA::Long ExtType )
251 {
252   ASSERT( myHomardCas );
253 //   VERIFICATION( (ExtType>=0) && (ExtType<=2) );
254   myHomardCas->SetExtType( ExtType );
255 }
256 //=============================================================================
257 CORBA::Long HOMARD_Cas_i::GetExtType()
258 {
259   ASSERT( myHomardCas );
260   return myHomardCas->GetExtType();
261 }
262 //=============================================================================
263 void HOMARD_Cas_i::SetBoundingBox( const HOMARD::extrema& LesExtrema )
264 {
265   ASSERT( myHomardCas );
266   std::vector<double> VExtrema;
267   ASSERT( LesExtrema.length() == 10 );
268   VExtrema.resize( LesExtrema.length() );
269   for ( int i = 0; i < LesExtrema.length(); i++ )
270   {
271     VExtrema[i] = LesExtrema[i];
272   }
273   myHomardCas->SetBoundingBox( VExtrema );
274 }
275 //=============================================================================
276 HOMARD::extrema* HOMARD_Cas_i::GetBoundingBox()
277 {
278   ASSERT(myHomardCas );
279   HOMARD::extrema_var aResult = new HOMARD::extrema();
280   std::vector<double> LesExtremes = myHomardCas->GetBoundingBox();
281   ASSERT( LesExtremes.size() == 10 );
282   aResult->length( 10 );
283   for ( int i = 0; i < LesExtremes.size(); i++ )
284   {
285     aResult[i] = LesExtremes[i];
286   }
287   return aResult._retn();
288 }
289 //=============================================================================
290 void HOMARD_Cas_i::AddGroup( const char* Group)
291 {
292   ASSERT( myHomardCas );
293   myHomardCas->AddGroup( Group );
294 }
295 //=============================================================================
296 void HOMARD_Cas_i::SetGroups( const HOMARD::ListGroupType& ListGroup )
297 {
298   ASSERT( myHomardCas );
299   std::list<std::string> ListString ;
300   for ( int i = 0; i < ListGroup.length(); i++ )
301   {
302     ListString.push_back(std::string(ListGroup[i]));
303   }
304   myHomardCas->SetGroups( ListString );
305 }
306 //=============================================================================
307 HOMARD::ListGroupType* HOMARD_Cas_i::GetGroups()
308 {
309   ASSERT(myHomardCas );
310   const std::list<std::string>& ListString = myHomardCas->GetGroups();
311   HOMARD::ListGroupType_var aResult = new HOMARD::ListGroupType();
312   aResult->length( ListString.size() );
313   std::list<std::string>::const_iterator it;
314   int i = 0;
315   for ( it = ListString.begin(); it != ListString.end(); it++ )
316   {
317     aResult[i++] = CORBA::string_dup( (*it).c_str() );
318   }
319   return aResult._retn();
320 }
321 //=============================================================================
322 void HOMARD_Cas_i::AddBoundary(const char* BoundaryName)
323 {
324   MESSAGE ("HOMARD_Cas_i::AddBoundary : BoundaryName = "<< BoundaryName );
325   const char * Group = "" ;
326   AddBoundaryGroup( BoundaryName, Group) ;
327 }
328 //=============================================================================
329 void HOMARD_Cas_i::AddBoundaryGroup( const char* BoundaryName, const char* Group)
330 {
331   MESSAGE ("HOMARD_Cas_i::AddBoundaryGroup : BoundaryName = "<< BoundaryName << ", Group = " << Group );
332   ASSERT( myHomardCas );
333   // A. Préalables
334   // A.1. Caractéristiques de la frontière à ajouter
335   HOMARD::HOMARD_Boundary_ptr myBoundary = _gen_i->GetBoundary(BoundaryName) ;
336   ASSERT(!CORBA::is_nil(myBoundary));
337   int BoundaryType = myBoundary->GetType();
338   MESSAGE ( ". BoundaryType = " << BoundaryType );
339   // A.2. La liste des frontiere+groupes
340   const std::list<std::string>& ListBoundaryGroup = myHomardCas->GetBoundaryGroup();
341   std::list<std::string>::const_iterator it;
342   // B. Controles
343   const char * boun ;
344   int erreur = 0 ;
345   while ( erreur == 0 )
346   {
347   // B.1. Si on ajoute une frontière CAO, elle doit être la seule frontière
348     if ( BoundaryType == -1 )
349     {
350       for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
351       {
352         boun = (*it).c_str() ;
353         MESSAGE ("..  Frontiere enregistrée : "<< boun );
354         if ( *it != BoundaryName )
355         { erreur = 1 ;
356           break ; }
357         // On saute le nom du groupe
358         it++ ;
359       }
360     }
361     if ( erreur != 0 ) { break ; }
362   // B.2. Si on ajoute une frontière non CAO, il ne doit pas y avoir de frontière CAO
363     if ( BoundaryType != -1 )
364     {
365       for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
366       {
367         boun = (*it).c_str() ;
368         MESSAGE ("..  Frontiere enregistrée : "<< boun );
369         HOMARD::HOMARD_Boundary_ptr myBoundary_0 = _gen_i->GetBoundary(boun) ;
370         int BoundaryType_0 = myBoundary_0->GetType();
371         MESSAGE ( ".. BoundaryType_0 = " << BoundaryType_0 );
372         if ( BoundaryType_0 == -1 )
373         { erreur = 2 ;
374           break ; }
375         // On saute le nom du groupe
376         it++ ;
377       }
378       if ( erreur != 0 ) { break ; }
379     }
380   // B.3. Si on ajoute une frontière discrète, il ne doit pas y avoir d'autre frontière discrète
381     if ( BoundaryType == 0 )
382     {
383       for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
384       {
385         boun = (*it).c_str() ;
386         MESSAGE ("..  Frontiere enregistrée : "<< boun );
387         if ( boun != BoundaryName )
388         {
389           HOMARD::HOMARD_Boundary_ptr myBoundary_0 = _gen_i->GetBoundary(boun) ;
390           int BoundaryType_0 = myBoundary_0->GetType();
391           MESSAGE ( ".. BoundaryType_0 = " << BoundaryType_0 );
392           if ( BoundaryType_0 == 0 )
393           { erreur = 3 ;
394             break ; }
395         }
396         // On saute le nom du groupe
397         it++ ;
398       }
399       if ( erreur != 0 ) { break ; }
400     }
401   // B.4. Pour une nouvelle frontiere, publication dans l'arbre d'etudes sous le cas
402     bool existe = false ;
403     for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
404     {
405       MESSAGE ("..  Frontiere : "<< *it );
406       if ( *it == BoundaryName ) { existe = true ; }
407       // On saute le nom du groupe
408       it++ ;
409     }
410     if ( !existe )
411     {
412       char* CaseName = GetName() ;
413       MESSAGE ( "AddBoundaryGroup : insertion de la frontiere dans l'arbre de " << CaseName );
414       _gen_i->PublishBoundaryUnderCase(CaseName, BoundaryName) ;
415     }
416   // B.5. Le groupe est-il deja enregistre pour une frontiere de ce cas ?
417     for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
418     {
419       boun = (*it).c_str() ;
420       it++ ;
421       MESSAGE ("..  Groupe enregistré : "<< *it );
422       if ( *it == Group )
423       { erreur = 5 ;
424         break ; }
425     }
426     if ( erreur != 0 ) { break ; }
427     //
428     break ;
429   }
430   // F. Si aucune erreur, enregistrement du couple (frontiere,groupe) dans la reference du cas
431   //    Sinon, arrêt
432   if ( erreur == 0 )
433   { myHomardCas->AddBoundaryGroup( BoundaryName, Group ); }
434   else
435   {
436     std::stringstream ss;
437     ss << erreur;
438     std::string str = ss.str();
439     std::string texte ;
440     texte = "Erreur numéro " + str + " pour la frontière à enregistrer : " + std::string(BoundaryName) ;
441     if ( erreur == 1 ) { texte += "\nIl existe déjà la frontière " ; }
442     else if ( erreur == 2 ) { texte += "\nIl existe déjà la frontière CAO " ; }
443     else if ( erreur == 3 ) { texte += "\nIl existe déjà une frontière discrète : " ; }
444     else if ( erreur == 5 ) { texte += "\nLe groupe " + std::string(Group) + " est déjà enregistré pour la frontière " ; }
445     texte += std::string(boun) ;
446     //
447     SALOME::ExceptionStruct es;
448     es.type = SALOME::BAD_PARAM;
449 #ifdef _DEBUG_
450     texte += "\nInvalid AddBoundaryGroup";
451 #endif
452     INFOS(texte) ;
453     es.text = CORBA::string_dup(texte.c_str());
454     throw SALOME::SALOME_Exception(es);
455   }
456 }
457 //=============================================================================
458 HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup()
459 {
460   MESSAGE ("GetBoundaryGroup");
461   ASSERT(myHomardCas );
462   const std::list<std::string>& ListBoundaryGroup = myHomardCas->GetBoundaryGroup();
463   HOMARD::ListBoundaryGroupType_var aResult = new HOMARD::ListBoundaryGroupType();
464   aResult->length( ListBoundaryGroup.size() );
465   std::list<std::string>::const_iterator it;
466   int i = 0;
467   for ( it = ListBoundaryGroup.begin(); it != ListBoundaryGroup.end(); it++ )
468   {
469     aResult[i++] = CORBA::string_dup( (*it).c_str() );
470   }
471   return aResult._retn();
472 }
473 //=============================================================================
474 void HOMARD_Cas_i::SupprBoundaryGroup()
475 {
476   MESSAGE ("SupprBoundaryGroup");
477   ASSERT(myHomardCas );
478   myHomardCas->SupprBoundaryGroup();
479 }
480 //=============================================================================
481 void HOMARD_Cas_i::SetPyram( CORBA::Long Pyram )
482 {
483   MESSAGE ("SetPyram, Pyram = " << Pyram );
484   ASSERT( myHomardCas );
485   myHomardCas->SetPyram( Pyram );
486 }
487 //=============================================================================
488 CORBA::Long HOMARD_Cas_i::GetPyram()
489 {
490   MESSAGE ("GetPyram");
491   ASSERT( myHomardCas );
492   return myHomardCas->GetPyram();
493 }
494 //=============================================================================
495 void HOMARD_Cas_i::MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte)
496 {
497   MESSAGE ( "MeshInfo : information sur le maillage initial du cas" );
498   ASSERT( myHomardCas );
499 //
500 // Nom de l'iteration
501   char* IterName = GetIter0Name() ;
502   CORBA::Long etatMenage = -1 ;
503   CORBA::Long modeHOMARD = 7 ;
504   CORBA::Long Option1 = 1 ;
505   CORBA::Long Option2 = 1 ;
506   if ( Qual != 0 ) { modeHOMARD = modeHOMARD*5 ; }
507   if ( Diam != 0 ) { modeHOMARD = modeHOMARD*19 ; }
508   if ( Conn != 0 ) { modeHOMARD = modeHOMARD*11 ; }
509   if ( Tail != 0 ) { modeHOMARD = modeHOMARD*13 ; }
510   if ( Inte != 0 ) { modeHOMARD = modeHOMARD*3 ; }
511   CORBA::Long codret = _gen_i->Compute(IterName, etatMenage, modeHOMARD, Option1, Option2) ;
512   MESSAGE ( "MeshInfo : codret = " << codret );
513   return ;
514 }
515 //=============================================================================
516 //=============================================================================
517 // Liens avec les autres structures
518 //=============================================================================
519 //=============================================================================
520 char* HOMARD_Cas_i::GetIter0Name()
521 {
522   ASSERT( myHomardCas );
523   return CORBA::string_dup( myHomardCas->GetIter0Name().c_str() );
524 }
525 //=============================================================================
526 HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::GetIter0()
527 {
528 // Nom de l'iteration initiale
529   char* Iter0Name = GetIter0Name() ;
530   MESSAGE ( "GetIter0 : Iter0Name      = " << Iter0Name );
531   return _gen_i->GetIteration(Iter0Name) ;
532 }
533 //=============================================================================
534 HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::NextIteration( const char* IterName )
535 {
536 // Nom de l'iteration parent
537   char* NomIterParent = GetIter0Name() ;
538   MESSAGE ( "NextIteration : IterName      = " << IterName );
539   MESSAGE ( "NextIteration : NomIterParent = " << NomIterParent );
540   return _gen_i->CreateIteration(IterName, NomIterParent) ;
541 }
542 //=============================================================================
543 HOMARD::HOMARD_Iteration_ptr HOMARD_Cas_i::LastIteration( )
544 {
545   HOMARD::HOMARD_Iteration_ptr Iter ;
546   HOMARD::listeIterFilles_var ListeIterFilles ;
547   char* IterName ;
548 // Iteration initiale du cas
549   IterName = GetIter0Name() ;
550 // On va explorer la descendance de cette iteration initiale
551 // jusqu'a trouver celle qui n'a pas de filles
552   int nbiterfilles = 1 ;
553   while ( nbiterfilles == 1 )
554   {
555 // L'iteration associee
556 //     MESSAGE ( ".. IterName = " << IterName );
557     Iter = _gen_i->GetIteration(IterName) ;
558 // Les filles de cette iteration
559     ListeIterFilles = Iter->GetIterations() ;
560     nbiterfilles = ListeIterFilles->length() ;
561 //     MESSAGE ( ".. nbiterfilles = " << nbiterfilles );
562 // S'il y a au moins 2 filles, arret : on ne sait pas faire
563     VERIFICATION( nbiterfilles <= 1 ) ;
564 // S'il y a une fille unique, on recupere le nom de la fille et on recommence
565     if ( nbiterfilles == 1 )
566     { IterName = ListeIterFilles[0] ; }
567   }
568 //
569   return Iter ;
570 }
571 //=============================================================================
572 void HOMARD_Cas_i::AddIteration( const char* NomIteration )
573 {
574   ASSERT( myHomardCas );
575   myHomardCas->AddIteration( NomIteration );
576 }
577 //=============================================================================
578 //=============================================================================
579 // YACS
580 //=============================================================================
581 //=============================================================================
582 //=============================================================================
583 // Creation d'un schema YACS
584 // YACSName : nom du schema
585 // ScriptFile : nom du fichier contenant le script de lancement du calcul
586 // DirName : le repertoire de lancement des calculs du sch?ma
587 // MeshFile : nom du fichier contenant le maillage pour le premier calcul
588 //=============================================================================
589 HOMARD::HOMARD_YACS_ptr HOMARD_Cas_i::CreateYACSSchema( const char* YACSName, const char* ScriptFile, const char* DirName, const char* MeshFile )
590 {
591 // Nom du cas
592   const char* CaseName = GetName() ;
593   MESSAGE ( "CreateYACSSchema : Schema YACS pour le cas " << YACSName);
594   MESSAGE ( "nomCas     : " << CaseName);
595   MESSAGE ( "ScriptFile : " << ScriptFile);
596   MESSAGE ( "DirName    : " << DirName);
597   MESSAGE ( "MeshFile   : " << MeshFile);
598   return _gen_i->CreateYACSSchema(YACSName, CaseName, ScriptFile, DirName, MeshFile) ;
599 }