From: gdd Date: Thu, 19 Jan 2012 08:42:18 +0000 (+0000) Subject: From G. NICOLAS: Replace simple quotes by double quotes in Python dump X-Git-Tag: V6_5_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=93699333062e8e828f3f56778b2eb4b5abb667c4;p=modules%2Fhomard.git From G. NICOLAS: Replace simple quotes by double quotes in Python dump --- diff --git a/src/HOMARD/HOMARD_Boundary.cxx b/src/HOMARD/HOMARD_Boundary.cxx index 185be49f..ab5a5eb3 100644 --- a/src/HOMARD/HOMARD_Boundary.cxx +++ b/src/HOMARD/HOMARD_Boundary.cxx @@ -70,22 +70,22 @@ std::string HOMARD_Boundary::GetDumpPython() const case 0: { aScript << "discrete boundary " << _NomBoundary << "\n"; - aScript << "\t" << _NomBoundary << " = homard.CreateBoundaryDi('" << _NomBoundary << "', "; - aScript << "'" << _MeshName << "', "; - aScript << "'" << _MeshFile << "')\n"; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundaryDi(\"" << _NomBoundary << "\", "; + aScript << "\"" << _MeshName << "\", "; + aScript << "\"" << _MeshFile << "\")\n"; break ; } case 1: { aScript << "cylinder " << _NomBoundary << "\n"; - aScript << "\t" << _NomBoundary << " = homard.CreateBoundaryCylinder('" << _NomBoundary << "', "; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundaryCylinder(\"" << _NomBoundary << "\", "; aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _rayon << ")\n"; break ; } case 2: { aScript << "sphere" << _NomBoundary << "\n"; - aScript << "\t" << _NomBoundary << " = homard.CreateBoundarySphere('" << _NomBoundary << "', "; + aScript << "\t" << _NomBoundary << " = homard.CreateBoundarySphere(\"" << _NomBoundary << "\", "; aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _rayon << ")\n"; break ; } diff --git a/src/HOMARD/HOMARD_Cas.cxx b/src/HOMARD/HOMARD_Cas.cxx index d002e71e..30c73816 100644 --- a/src/HOMARD/HOMARD_Cas.cxx +++ b/src/HOMARD/HOMARD_Cas.cxx @@ -88,18 +88,18 @@ std::string HOMARD_Cas::GetDumpPython() const //============================================================================= { std::ostringstream aScript; - aScript << "\t" <<_NomCas << ".SetDirName('"; - aScript << _NomDir << "')\n"; + aScript << "\t" <<_NomCas << ".SetDirName(\""; + aScript << _NomDir << "\")\n"; aScript << "\t" <<_NomCas << ".SetConfType("; aScript << _ConfType << ")\n"; // Suivi de frontieres std::list::const_iterator it = _ListBoundaryGroup.begin(); while(it != _ListBoundaryGroup.end()) { - aScript << "\t" <<_NomCas << ".AddBoundaryGroup('"; - aScript << *it << "', '"; + aScript << "\t" <<_NomCas << ".AddBoundaryGroup(\""; + aScript << *it << "\", \""; it++; - aScript << *it << "')\n"; + aScript << *it << "\")\n"; it++; } diff --git a/src/HOMARD/HOMARD_Hypothesis.cxx b/src/HOMARD/HOMARD_Hypothesis.cxx index a272e97a..bc44eefe 100644 --- a/src/HOMARD/HOMARD_Hypothesis.cxx +++ b/src/HOMARD/HOMARD_Hypothesis.cxx @@ -89,27 +89,27 @@ std::string HOMARD_Hypothesis::GetDumpPython() const { std::ostringstream aScript; aScript << "\n# Creation of the hypothesis " << _NomHypo << "\n" ; - aScript << "\t" << _NomHypo << " = homard.CreateHypothesis('" << _NomHypo << "')\n"; + aScript << "\t" << _NomHypo << " = homard.CreateHypothesis(\"" << _NomHypo << "\")\n"; aScript << "\t" << _NomHypo << ".SetAdapRefinUnRef(" << _TypeAdap << ", " << _TypeRaff << ", " << _TypeDera << ")\n"; // Raffinement selon des zones geometriques std::list::const_iterator it = _ListZone.begin(); while(it != _ListZone.end()) { - aScript << "\thomard.AssociateHypoZone('"<< *it << "', '" <<_NomHypo << "')\n"; + aScript << "\thomard.AssociateHypoZone(\""<< *it << "\", \"" <<_NomHypo << "\")\n"; it++; } // Raffinement selon un champ if ( _TypeAdap == 1 ) { - aScript << "\t" << _NomHypo << ".SetField('" << _Field << "')\n"; + aScript << "\t" << _NomHypo << ".SetField(\"" << _Field << "\")\n"; aScript << "\t" << _NomHypo << ".SetUseField(" << _UsField << ")\n"; aScript << "\t" << _NomHypo << ".SetUseComp(" << _UsCmpI << ")\n"; std::list::const_iterator it_comp = _ListComposant.begin(); while(it_comp != _ListComposant.end()) { - aScript << "\t" << _NomHypo << ".AddComp('" << *it_comp << "')\n"; + aScript << "\t" << _NomHypo << ".AddComp(\"" << *it_comp << "\")\n"; it_comp++; } if ( _TypeRaff == 1 ) @@ -126,7 +126,7 @@ std::string HOMARD_Hypothesis::GetDumpPython() const // Filtrage du raffinement par des groupes for ( it=_ListGroupSelected.begin(); it!=_ListGroupSelected.end();it++) - aScript << "\t" << _NomHypo << ".AddGroup('" << (*it) << "')\n" ; + aScript << "\t" << _NomHypo << ".AddGroup(\"" << (*it) << "\")\n" ; // Interpolation champ aScript << "\t" << _NomHypo << ".SetTypeFieldInterp(" << _TypeFieldInterp << ")\n"; @@ -135,7 +135,7 @@ std::string HOMARD_Hypothesis::GetDumpPython() const std::list::const_iterator it_champ = _ListFieldInterp.begin(); while(it_champ != _ListFieldInterp.end()) { - aScript << "\t" << _NomHypo << ".AddFieldInterp('" << *it_champ << "')\n"; + aScript << "\t" << _NomHypo << ".AddFieldInterp(\"" << *it_champ << "\")\n"; it_champ++; } } diff --git a/src/HOMARD/HOMARD_Iteration.cxx b/src/HOMARD/HOMARD_Iteration.cxx index f5dd9179..87f16016 100644 --- a/src/HOMARD/HOMARD_Iteration.cxx +++ b/src/HOMARD/HOMARD_Iteration.cxx @@ -82,31 +82,31 @@ std::string HOMARD_Iteration::GetDumpPython() const aScript << "\n# Creation of the iteration " << _NomIter << "\n"; if( _NumIter == 1 ) { - aScript << "\t" << _NomIter << " = homard.CreateIteration('"; - aScript << _NomIter << "', "<< _NomCas << ".GetIter0Name() )\n"; + aScript << "\t" << _NomIter << " = homard.CreateIteration(\""; + aScript << _NomIter << "\", "<< _NomCas << ".GetIter0Name() )\n"; } else { - aScript << "\t" << _NomIter << " = homard.CreateIteration('"; - aScript << _NomIter << "', '" << _IterParent << "')\n"; + aScript << "\t" << _NomIter << " = homard.CreateIteration(\""; + aScript << _NomIter << "\", \"" << _IterParent << "\")\n"; } // Le nom du maillage produit - aScript << "\t" << _NomIter << ".SetMeshName('" << _NomMesh << "')\n" ; + aScript << "\t" << _NomIter << ".SetMeshName(\"" << _NomMesh << "\")\n" ; // Le fichier du maillage produit - aScript << "\t" << _NomIter << ".SetMeshFile('" << _MeshFile << "')\n"; + aScript << "\t" << _NomIter << ".SetMeshFile(\"" << _MeshFile << "\")\n"; if (_FieldFile != "") { - aScript << "\t" << _NomIter << ".SetFieldFile('" << _FieldFile << "')\n"; - aScript << "\t" << _NomIter << ".SetTimeStepRank(" << _Rank << ", " << _TimeStep << ")\n"; + aScript << "\t" << _NomIter << ".SetFieldFile(\"" << _FieldFile << "\")\n"; + aScript << "\t" << _NomIter << ".SetTimeStepRank(" << _TimeStep << ", " << _Rank << ")\n"; } - aScript << "\thomard.AssociateIterHypo('" <<_NomIter << "', '" << _NomHypo << "')\n"; + aScript << "\thomard.AssociateIterHypo(\"" <<_NomIter << "\", \"" << _NomHypo << "\")\n"; if (_Etat == true) { - aScript << "\tresult = homard.Compute('" <<_NomIter << "', 1)\n"; + aScript << "\tresult = homard.Compute(\"" <<_NomIter << "\", 1)\n"; } else { - aScript << "\t# result = homard.Compute('" <<_NomIter << "', 1)\n"; + aScript << "\t# result = homard.Compute(\"" <<_NomIter << "\", 1)\n"; } return aScript.str(); diff --git a/src/HOMARD/HOMARD_Zone.cxx b/src/HOMARD/HOMARD_Zone.cxx index 9adfdeb8..b26a2c8c 100644 --- a/src/HOMARD/HOMARD_Zone.cxx +++ b/src/HOMARD/HOMARD_Zone.cxx @@ -79,58 +79,58 @@ std::string HOMARD_Zone::GetDumpPython() const switch (_ZoneType) { case 11: - { aScript << "Box2D( '" << _NomZone << "', " << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", 1 )\n"; + { aScript << "Box2D( \"" << _NomZone << "\", " << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", 1 )\n"; break ; } case 12: - { aScript << "Box2D( '" << _NomZone << "', " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ", 2 )\n"; + { aScript << "Box2D( \"" << _NomZone << "\", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ", 2 )\n"; break ; } case 13: - { aScript << "Box2D( '" << _NomZone << "', " << _Zmin << ", " << _Zmax << ", " << _Xmin << ", " << _Xmax << ", 3 )\n"; + { aScript << "Box2D( \"" << _NomZone << "\", " << _Zmin << ", " << _Zmax << ", " << _Xmin << ", " << _Xmax << ", 3 )\n"; break ; } case 2: - { aScript << "Box( '" << _NomZone << "', " << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ")\n"; + { aScript << "Box( \"" << _NomZone << "\", " << _Xmin << ", " << _Xmax << ", " << _Ymin << ", " << _Ymax << ", " << _Zmin << ", " << _Zmax << ")\n"; break ; } case 4: - { aScript << "Sphere( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ")\n"; + { aScript << "Sphere( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ")\n"; break ; } case 31: - { aScript << "Disk( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Rayon << ", 1 )\n"; + { aScript << "Disk( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Rayon << ", 1 )\n"; break ; } case 32: - { aScript << "Disk( '" << _NomZone << "', " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ", 2 )\n"; + { aScript << "Disk( \"" << _NomZone << "\", " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ", 2 )\n"; break ; } case 33: - { aScript << "Disk( '" << _NomZone << "', " << _Zcentre << ", " << _Xcentre << ", " << _Rayon << ", 3 )\n"; + { aScript << "Disk( \"" << _NomZone << "\", " << _Zcentre << ", " << _Xcentre << ", " << _Rayon << ", 3 )\n"; break ; } case 5: - { aScript << "Cylinder( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon << ", " << _Haut << ")\n"; + { aScript << "Cylinder( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon << ", " << _Haut << ")\n"; break ; } case 61: - { aScript << "DiskWithHole( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Rayon << ", " << _Rayonint << ", 1 )\n"; + { aScript << "DiskWithHole( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Rayon << ", " << _Rayonint << ", 1 )\n"; break ; } case 62: - { aScript << "DiskWithHole( '" << _NomZone << "', " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ", " << _Rayonint << ", 2 )\n"; + { aScript << "DiskWithHole( \"" << _NomZone << "\", " << _Ycentre << ", " << _Zcentre << ", " << _Rayon << ", " << _Rayonint << ", 2 )\n"; break ; } case 63: - { aScript << "DiskWithHole( '" << _NomZone << "', " << _Zcentre << ", " << _Xcentre << ", " << _Rayon << ", " << _Rayonint << ", 3 )\n"; + { aScript << "DiskWithHole( \"" << _NomZone << "\", " << _Zcentre << ", " << _Xcentre << ", " << _Rayon << ", " << _Rayonint << ", 3 )\n"; break ; } case 7: - { aScript << "Pipe( '" << _NomZone << "', " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon << ", " << _Haut << ", " << _Rayonint << ")\n"; + { aScript << "Pipe( \"" << _NomZone << "\", " << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon << ", " << _Haut << ", " << _Rayonint << ")\n"; break ; } } diff --git a/src/HOMARD/HomardDriver.cxx b/src/HOMARD/HomardDriver.cxx index 5d0e6171..51bf1765 100644 --- a/src/HOMARD/HomardDriver.cxx +++ b/src/HOMARD/HomardDriver.cxx @@ -639,7 +639,7 @@ void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoun { std::stringstream saux1 ; saux1 << NumeBoundary ; saux2 = saux1.str() ; - saux += "FANom " + saux2 + " '" + NameBoundary + "'\n" ; + saux += "FANom " + saux2 + " \"" + NameBoundary + "\"\n" ; } // // Type de frontiere @@ -735,8 +735,8 @@ void HomardDriver::TexteBoundaryAnGr( const std::string NameBoundary, int NumeBo saux2 = saux1.str() ; saux = "#\n# Lien Frontiere/Groupe numero " + saux2 + "\n" ; // - saux += "FGNomFro " + saux2 + " '" + NameBoundary + "'\n" ; - saux += "FGNomGro " + saux2 + " '" + GroupName + "'\n" ; + saux += "FGNomFro " + saux2 + " \"" + NameBoundary + "\"\n" ; + saux += "FGNomGro " + saux2 + " \"" + GroupName + "\"\n" ; // _Texte += saux + "#\n" ; //