X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHOMARD%2FYACSDriver.cxx;h=3a559bcdc9fec98f80d96436b9755c7350367add;hb=refs%2Ftags%2FV9_13_0b1;hp=c7c572536f697fce36e7e28cf4a8e9c2251cfe0b;hpb=f10e5af20a8a60e551c453e3882e3f78209c38d0;p=modules%2Fhomard.git diff --git a/src/HOMARD/YACSDriver.cxx b/src/HOMARD/YACSDriver.cxx index c7c57253..3a559bcd 100644 --- a/src/HOMARD/YACSDriver.cxx +++ b/src/HOMARD/YACSDriver.cxx @@ -1,6 +1,6 @@ // HOMARD HOMARD : implementation of HOMARD idl descriptions // -// Copyright (C) 2011-2016 CEA/DEN, EDF R&D +// Copyright (C) 2011-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -34,16 +34,18 @@ //============================================================================= //============================================================================= -YACSDriver::YACSDriver(const std::string XMLFile, const std::string DirName): +YACSDriver::YACSDriver(const std::string XMLFile, const std::string DirName, const std::string LangueShort): _XMLFile( "" ), _DirName( "" ), _Texte( "" ), _Texte_parametres( "" ), _noeud_1( "CreateCase" ), + _LangueShort( "" ), _bLu( false ) { MESSAGE("XMLFile = "<\n" ; - _Texte += " Etude_Initialisation.SetCurrentStudy\n" ; + INFOS("_LangueShort = "<<_LangueShort ); + if ( _LangueShort == "fr" ) { motcle = "Etude_Initialisation" ; } + else { motcle = "Study_Initialisation" ; } + INFOS("motcle = "<\n" ; _Texte += " " + methode + "\n" ; // 4. Les inports // 4.1. Le nom de la zone @@ -163,7 +173,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho // La derniere valeur est toujours mise dans x8 x8 = GetStringInTexte ( ligne, ")", 0 ) ; MESSAGE("coor = "<< x0<<","< 10 ) && ( ZoneType < 14 ) ) { _Texte += Texte_inport( "double", "Umini" ) ; @@ -195,7 +205,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho TexteParametre( node, "Orient", "int", x8 ) ; } // -// 4.2. Cas du disque (31, 32, 33) ou du disque perce (61, 62, 63) +// 4.2.4. Cas du disque (31, 32, 33) ou du disque perce (61, 62, 63) else if ( ( ( ZoneType > 30 ) && ( ZoneType < 34 ) ) || ( ( ZoneType > 60 ) && ( ZoneType < 64 ) ) ) { _Texte += Texte_inport( "double", "Ucentre" ) ; @@ -213,7 +223,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho TexteParametre( node, "Orient", "int", x8 ) ; } // -// 4.2. Cas de la sphere (4) +// 4.2.5. Cas de la sphere (4) else if ( ZoneType == 4 ) { _Texte += Texte_inport( "double", "Xcentre" ) ; @@ -226,7 +236,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho TexteParametre( node, "Radius", "double", x8 ) ; } // -// 4.2. Cas du cylindre (5) ou du tuyau (7) +// 4.2.6. Cas du cylindre (5) ou du tuyau (7) else if ( ZoneType == 5 || ZoneType == 7 ) { _Texte += Texte_inport( "double", "Xcentre" ) ; @@ -256,7 +266,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho } } // -// 4.2. Erreur +// 4.2.7. Erreur else { VERIFICATION("Type de zone inconnu." == 0); } @@ -285,15 +295,21 @@ std::string YACSDriver::Texte_Iter_1_Boundary( int BoundaryType, const std::stri // // 1. Le nom du noeud std::string noeud_2 = methode + "_" + BoundaryName ; - std::string node = "Boucle_de_convergence.Alternance_Calcul_HOMARD.Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1." ; + std::string node ; + if ( _LangueShort == "fr" ) { node = "Boucle_de_convergence.Alternance_Calcul_HOMARD" ; } + else { node = "Convergence_Loop.Alternation_Computation_HOMARD" ; } + node += ".Adaptation.p0_Adaptation_HOMARD.HOMARD_Initialisation.p1_Iter_1." ; node += noeud_2 ; // 2. Texte de controle : le noeud precedent est _noeud_1, le noeud courant noeud_2. // A la fin, on bascule le courant dans le precedent std::string texte_control = Texte_control (_noeud_1, noeud_2, 1) ; _noeud_1 = noeud_2 ; // 3. Definition du service + std::string motcle ; _Texte += " \n" ; - _Texte += " Etude_Initialisation.SetCurrentStudy\n" ; + if ( _LangueShort == "fr" ) { motcle = "Etude_Initialisation" ; } + else { motcle = "Study_Initialisation" ; } + _Texte += " " + motcle + ".UpdateStudy\n" ; _Texte += " " + methode + "\n" ; // 4. Les inports // ATTENTION : les noms doivent etre les memes que dans Gen.xml, donc HOMARD_Gen.idl