From: nicolas Date: Wed, 23 Oct 2013 07:16:51 +0000 (+0000) Subject: Reorganisation des cas-tests et des tutoriaux X-Git-Tag: V7_3_0a1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aefa0dcae786b058ecbbf88c7446392f5eed1b38;p=modules%2Fhomard.git Reorganisation des cas-tests et des tutoriaux Elimination de messages inutiles --- diff --git a/doc/files/tutorial_1.py b/doc/files/tutorial_1.py index 20d1b331..bfb2d857 100644 --- a/doc/files/tutorial_1.py +++ b/doc/files/tutorial_1.py @@ -24,7 +24,7 @@ Exemple de couplage HOMARD-Salome Copyright EDF-R&D 1996, 2010, 2013 """ -__revision__ = "V1.6" +__revision__ = "V1.7" # import os # @@ -67,26 +67,26 @@ Case_1.SetConfType(1) # # Iterations # ========== -# Iteration "Iter_1_0" -Iter_1_0 = Case_1.NextIteration('Iter_1_0') -Iter_1_0.SetMeshName('MESH') -Iter_1_0.SetMeshFile(dircase+'/maill.01.med') -Iter_1_0.AssociateHypo('Hypo_1') -codret = Iter_1_0.Compute(1, 2) - # Iteration "Iter_1_1" -Iter_1_1 = Iter_1_0.NextIteration('Iter_1_1') +Iter_1_1 = Case_1.NextIteration('Iter_1_1') Iter_1_1.SetMeshName('MESH') -Iter_1_1.SetMeshFile(dircase+'/maill.02.med') +Iter_1_1.SetMeshFile(dircase+'/maill.01.med') Iter_1_1.AssociateHypo('Hypo_1') codret = Iter_1_1.Compute(1, 2) # Iteration "Iter_1_2" Iter_1_2 = Iter_1_1.NextIteration('Iter_1_2') Iter_1_2.SetMeshName('MESH') -Iter_1_2.SetMeshFile(dircase+'/maill.03.med') +Iter_1_2.SetMeshFile(dircase+'/maill.02.med') Iter_1_2.AssociateHypo('Hypo_1') codret = Iter_1_2.Compute(1, 2) +# Iteration "Iter_1_3" +Iter_1_3 = Iter_1_2.NextIteration('Iter_1_3') +Iter_1_3.SetMeshName('MESH') +Iter_1_3.SetMeshFile(dircase+'/maill.03.med') +Iter_1_3.AssociateHypo('Hypo_1') +codret = Iter_1_3.Compute(1, 2) + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(1) diff --git a/doc/files/tutorial_2.py b/doc/files/tutorial_2.py index 6d0ee6bf..d5caeebc 100644 --- a/doc/files/tutorial_2.py +++ b/doc/files/tutorial_2.py @@ -24,7 +24,7 @@ Exemple de couplage HOMARD-Salome Copyright EDF-R&D 1996, 2010, 2013 """ -__revision__ = "V1.7" +__revision__ = "V1.8" # import os # @@ -84,21 +84,21 @@ Hypo_2_bis.AddZone('Zone_2', 1) Case_2 = homard.CreateCase('Case_2', 'MZERO', data_dir+'/tutorial_2.00.med') Case_2.SetDirName(dircase) # -# Iteration "Iter_2_0" -# ==================== -Iter_2_0 = Case_2.NextIteration('Iter_2_0') -Iter_2_0.SetMeshName('M_1') -Iter_2_0.SetMeshFile(dircase+'/maill.01.med') -Iter_2_0.AssociateHypo('Hypo_2') -codret = Iter_2_0.Compute(1, 2) -# # Iteration "Iter_2_1" # ==================== -Iter_2_1 = Iter_2_0.NextIteration('Iter_2_1') -Iter_2_1.SetMeshName('M_2') -Iter_2_1.SetMeshFile(dircase+'/maill.02.med') -Iter_2_1.AssociateHypo('Hypo_2_bis') +Iter_2_1 = Case_2.NextIteration('Iter_2_1') +Iter_2_1.SetMeshName('M_1') +Iter_2_1.SetMeshFile(dircase+'/maill.01.med') +Iter_2_1.AssociateHypo('Hypo_2') codret = Iter_2_1.Compute(1, 2) +# +# Iteration "Iter_2_2" +# ==================== +Iter_2_2 = Iter_2_1.NextIteration('Iter_2_2') +Iter_2_2.SetMeshName('M_2') +Iter_2_2.SetMeshFile(dircase+'/maill.02.med') +Iter_2_2.AssociateHypo('Hypo_2_bis') +codret = Iter_2_2.Compute(1, 2) if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(1) diff --git a/idl/HOMARD_Gen.idl b/idl/HOMARD_Gen.idl index 29eabb24..1c134945 100644 --- a/idl/HOMARD_Gen.idl +++ b/idl/HOMARD_Gen.idl @@ -181,7 +181,7 @@ module HOMARD string CreateDirNameIter(in string NomDir, in long option ) raises(SALOME::SALOME_Exception); - boolean VerifieDir (in string IterName) raises (SALOME::SALOME_Exception); + string VerifieDir (in string NomDir) raises (SALOME::SALOME_Exception); // void PublishFileUnderIteration(in string IterName, in string FileName, in string Comment) diff --git a/src/HOMARD/HOMARD_Hypothesis.cxx b/src/HOMARD/HOMARD_Hypothesis.cxx index 09020465..efa92d3d 100644 --- a/src/HOMARD/HOMARD_Hypothesis.cxx +++ b/src/HOMARD/HOMARD_Hypothesis.cxx @@ -173,8 +173,6 @@ int HOMARD_Hypothesis::GetAdapType() const //============================================================================= void HOMARD_Hypothesis::SetRefinTypeDera( int TypeRaff, int TypeDera ) { - INFOS("SetRefinTypeDera TypeRaff="<VerifieDir( aDirName.toStdString().c_str()) ; if ( CaseNameDir != "" ) { - INFOS(CaseNameDir.toStdString().c_str()); QString texte ; texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ; QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), diff --git a/src/HOMARDGUI/MonMeshInfo.cxx b/src/HOMARDGUI/MonMeshInfo.cxx index e0277bf5..ab6b5b10 100644 --- a/src/HOMARDGUI/MonMeshInfo.cxx +++ b/src/HOMARDGUI/MonMeshInfo.cxx @@ -105,7 +105,6 @@ bool MonMeshInfo::PushOnApply() { QString CaseNameDir = myHomardGen->VerifieDir( aDirName.toStdString().c_str()) ; if ( CaseNameDir != "" ) { - INFOS(CaseNameDir.toStdString().c_str()); QString texte ; texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ; QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), diff --git a/src/HOMARDGUI/MonPursueIteration.cxx b/src/HOMARDGUI/MonPursueIteration.cxx index 91c7ac02..7235710f 100644 --- a/src/HOMARDGUI/MonPursueIteration.cxx +++ b/src/HOMARDGUI/MonPursueIteration.cxx @@ -98,7 +98,6 @@ bool MonPursueIteration::PushOnApply() { QString CaseNameDir = myHomardGen->VerifieDir( aDirName.toStdString().c_str()) ; if ( CaseNameDir != "" ) { - INFOS(CaseNameDir.toStdString().c_str()); QString texte ; texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ; QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), diff --git a/tests/test_1.py b/tests/test_1.py index faab0704..17e5eb1b 100644 --- a/tests/test_1.py +++ b/tests/test_1.py @@ -22,7 +22,7 @@ Python script for HOMARD Copyright EDF-R&D 2010, 2013 Test test_1 """ -__revision__ = "V1.12" +__revision__ = "V1.13" #======================================================================== Test_Name = "test_1" @@ -117,63 +117,63 @@ Copyright EDF-R&D 2010, 2013 # # Creation of the cases # ===================== - # Creation of the case Case_1 - CaseName = "Case_1" - print "-------- Creation of the hypothesis", CaseName + # Creation of the case + CaseName = "Case_" + Test_Name + print "-------- Creation of the case", CaseName MeshFile = os.path.join(Rep_Test, Test_Name + '.00.med') - Case_1 = homard.CreateCase(CaseName, 'MAILL', MeshFile) - Case_1.SetDirName(Rep_Test_Resu) - Case_1.SetConfType(1) + Case_test_1 = homard.CreateCase(CaseName, 'MAILL', MeshFile) + Case_test_1.SetDirName(Rep_Test_Resu) + Case_test_1.SetConfType(1) # # Creation of the iterations # ========================== - # Creation of the iteration I1_1 - IterName_1 = "I1_1" - print "-------- Creation of the iteration", IterName_1 - I1_1 = Case_1.NextIteration(IterName_1) - I1_1.AssociateHypo(HypoName_1) + # Creation of the iteration 1 + IterName = "I_" + Test_Name + "_1" + print "-------- Creation of the iteration", IterName + Iter_test_1_1 = Case_test_1.NextIteration(IterName) + Iter_test_1_1.AssociateHypo(HypoName_1) print ". Hypothese :", HypoName_1 - I1_1.SetMeshName('M1') - I1_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med')) - I1_1.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.00.med')) - I1_1.SetTimeStepRank(1, 1) - I1_1.SetFieldInterpTimeStep('RESU____DEPL____________________', 1) - I1_1.SetFieldInterpTimeStepRank('RESU____ERRE_ELEM_SIGM__________', 1, 1) - print ". Instants d'interpolation :", I1_1.GetFieldInterpsTimeStepRank() - error = I1_1.Compute(1, 1) + Iter_test_1_1.SetMeshName('M1') + Iter_test_1_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med')) + Iter_test_1_1.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.00.med')) + Iter_test_1_1.SetTimeStepRank(1, 1) + Iter_test_1_1.SetFieldInterpTimeStep('RESU____DEPL____________________', 1) + Iter_test_1_1.SetFieldInterpTimeStepRank('RESU____ERRE_ELEM_SIGM__________', 1, 1) + print ". Instants d'interpolation :", Iter_test_1_1.GetFieldInterpsTimeStepRank() + error = Iter_test_1_1.Compute(1, 1) if error : error = 1 break - # Creation of the iteration I1_2 - IterName_2 = "I1_2" - print "-------- Creation of the iteration", IterName_2 - I1_2 = I1_1.NextIteration(IterName_2) - I1_2.AssociateHypo(HypoName_1) + # Creation of the iteration 2 + IterName = "I_" + Test_Name + "_2" + print "-------- Creation of the iteration", IterName + Iter_test_1_2 = Iter_test_1_1.NextIteration(IterName) + Iter_test_1_2.AssociateHypo(HypoName_1) print ". Hypothese :", HypoName_1 - I1_2.SetMeshName('M2') - I1_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med')) - I1_2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.01.med')) - I1_2.SetTimeStepRank(1, 1) - I1_2.SetFieldInterpTimeStep('RESU____DEPL____________________', 1) - I1_2.SetFieldInterpTimeStepRank('RESU____ERRE_ELEM_SIGM__________', 1, 1) - print ". Instants d'interpolation :", I1_2.GetFieldInterpsTimeStepRank() - error = I1_2.Compute(1, 1) + Iter_test_1_2.SetMeshName('M2') + Iter_test_1_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med')) + Iter_test_1_2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.01.med')) + Iter_test_1_2.SetTimeStepRank(1, 1) + Iter_test_1_2.SetFieldInterpTimeStep('RESU____DEPL____________________', 1) + Iter_test_1_2.SetFieldInterpTimeStepRank('RESU____ERRE_ELEM_SIGM__________', 1, 1) + print ". Instants d'interpolation :", Iter_test_1_2.GetFieldInterpsTimeStepRank() + error = Iter_test_1_2.Compute(1, 1) if error : error = 2 break - # Creation of the iteration I1_3 - IterName_3 = "I1_3" - print "-------- Creation of the iteration", IterName_3 - I1_3 = I1_2.NextIteration(IterName_3) - I1_3.AssociateHypo(HypoName_2) + # Creation of the iteration 3 + IterName = "I_" + Test_Name + "_3" + print "-------- Creation of the iteration", IterName + Iter_test_1_3 = Iter_test_1_2.NextIteration(IterName) + Iter_test_1_3.AssociateHypo(HypoName_2) print ". Hypothese :", HypoName_2 - I1_3.SetMeshName('M3') - I1_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med')) - I1_2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.02.med')) - print ". Instants d'interpolation :", I1_3.GetFieldInterpsTimeStepRank() - error = I1_3.Compute(1, 1) + Iter_test_1_3.SetMeshName('M3') + Iter_test_1_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med')) + Iter_test_1_2.SetFieldFile(os.path.join(Rep_Test, Test_Name + '.02.med')) + print ". Instants d'interpolation :", Iter_test_1_3.GetFieldInterpsTimeStepRank() + error = Iter_test_1_3.Compute(1, 1) if error : error = 3 break @@ -183,8 +183,8 @@ Copyright EDF-R&D 2010, 2013 ScriptFile = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script.py") ScriptFile = os.path.normpath(ScriptFile) DirName = Rep_Test_Resu - YACS_1 = Case_1.CreateYACSSchema("YACS_1", ScriptFile, DirName, MeshFile) - error = YACS_1.Write() + YACS_test_1 = Case_test_1.CreateYACSSchema("YACS_test_1", ScriptFile, DirName, MeshFile) + error = YACS_test_1.Write() if error : error = 4 break diff --git a/tests/test_2.py b/tests/test_2.py index e8371e46..8633102f 100644 --- a/tests/test_2.py +++ b/tests/test_2.py @@ -22,7 +22,7 @@ Python script for HOMARD Copyright EDF-R&D 2010, 2013 Test test_2 """ -__revision__ = "V1.11" +__revision__ = "V1.12" #======================================================================== Test_Name = "test_2" @@ -82,68 +82,72 @@ Copyright EDF-R&D 2010, 2013 # # Creation of the hypotheses # ========================== - # Creation of the hypothesis Hypo_2_1 - HypoName_1 = "Hypo_2_1" + # Creation of the hypothesis 1 + HypoName_1 = "Hypo_" + Test_Name + "_1" print "-------- Creation of the hypothesis", HypoName_1 - Hypo_2_1 = homard.CreateHypothesis(HypoName_1) - Hypo_2_1.SetAdapRefinUnRef(-1, 1, 0) - Hypo_2_1.AddGroup('EG') - Hypo_2_1.AddGroup('BANDE') - print HypoName_1, " : zones utilisées :", Hypo_2_1.GetZones() - print HypoName_1, " : champ utilisé :", Hypo_2_1.GetFieldName() - print HypoName_1, " : composantes utilisées :", Hypo_2_1.GetComps() - if ( len (Hypo_2_1.GetFieldName()) > 0 ) : - print ".. caractéristiques de l'adaptation :", Hypo_2_1.GetField() + Hypo_test_2_1 = homard.CreateHypothesis(HypoName_1) + Hypo_test_2_1.SetAdapRefinUnRef(-1, 1, 0) + Hypo_test_2_1.AddGroup('EG') + Hypo_test_2_1.AddGroup('BANDE') + print HypoName_1, " : zones utilisées :", Hypo_test_2_1.GetZones() + print HypoName_1, " : champ utilisé :", Hypo_test_2_1.GetFieldName() + print HypoName_1, " : composantes utilisées :", Hypo_test_2_1.GetComps() + if ( len (Hypo_test_2_1.GetFieldName()) > 0 ) : + print ".. caractéristiques de l'adaptation :", Hypo_test_2_1.GetField() - # Creation of the hypothesis Hypo_2_2 - HypoName_2 = "Hypo_2_2" + # Creation of the hypothesis 2 + HypoName_2 = "Hypo_" + Test_Name + "_2" print "-------- Creation of the hypothesis", HypoName_2 - Hypo_2_2 = homard.CreateHypothesis(HypoName_2) - Hypo_2_2.SetAdapRefinUnRef(-1, 1, 0) - Hypo_2_2.AddGroup('M_D') - print HypoName_2, " : zones utilisées :", Hypo_2_2.GetZones() - print HypoName_2, " : champ utilisé :", Hypo_2_2.GetFieldName() - print HypoName_2, " : composantes utilisées :", Hypo_2_2.GetComps() - if ( len (Hypo_2_2.GetFieldName()) > 0 ) : - print ".. caractéristiques de l'adaptation :", Hypo_2_2.GetField() + Hypo_test_2_2 = homard.CreateHypothesis(HypoName_2) + Hypo_test_2_2.SetAdapRefinUnRef(-1, 1, 0) + Hypo_test_2_2.AddGroup('M_D') + print HypoName_2, " : zones utilisées :", Hypo_test_2_2.GetZones() + print HypoName_2, " : champ utilisé :", Hypo_test_2_2.GetFieldName() + print HypoName_2, " : composantes utilisées :", Hypo_test_2_2.GetComps() + if ( len (Hypo_test_2_2.GetFieldName()) > 0 ) : + print ".. caractéristiques de l'adaptation :", Hypo_test_2_2.GetField() # # Creation of the cases # ===================== - # Creation of the case Case_2 + # Creation of the case + CaseName = "Case_" + Test_Name MeshFile = os.path.join(Rep_Test, Test_Name + '.00.med') - Case_2 = homard.CreateCase('Case_2', 'PLAQUE_0', MeshFile) - Case_2.SetDirName(Rep_Test_Resu) - Case_2.SetConfType(1) - Case_2.AddBoundaryGroup('internal_boundary', '') + Case_test_2 = homard.CreateCase(CaseName, 'PLAQUE_0', MeshFile) + Case_test_2.SetDirName(Rep_Test_Resu) + Case_test_2.SetConfType(1) + Case_test_2.AddBoundaryGroup('internal_boundary', '') # # Creation of the iterations # ========================== - # Creation of the iteration Iter_2_1 - Iter_2_1 = Case_2.NextIteration('Iter_2_1') - Iter_2_1.SetMeshName('PLAQUE_1') - Iter_2_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med')) - Iter_2_1.AssociateHypo(HypoName_1) - error = Iter_2_1.Compute(1, 1) + # Creation of the iteration 1 + IterName = "I_" + Test_Name + "_1" + Iter_test_2_1 = Case_test_2.NextIteration(IterName) + Iter_test_2_1.SetMeshName('PLAQUE_1') + Iter_test_2_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med')) + Iter_test_2_1.AssociateHypo(HypoName_1) + error = Iter_test_2_1.Compute(1, 1) if error : error = 1 break - # Creation of the iteration Iter_2_2 - Iter_2_2 = Iter_2_1.NextIteration('Iter_2_2') - Iter_2_2.SetMeshName('PLAQUE_2') - Iter_2_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med')) - Iter_2_2.AssociateHypo(HypoName_1) - error = Iter_2_2.Compute(1, 1) + # Creation of the iteration 2 + IterName = "I_" + Test_Name + "_2" + Iter_test_2_2 = Iter_test_2_1.NextIteration(IterName) + Iter_test_2_2.SetMeshName('PLAQUE_2') + Iter_test_2_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med')) + Iter_test_2_2.AssociateHypo(HypoName_1) + error = Iter_test_2_2.Compute(1, 1) if error : error = 2 break - # Creation of the iteration Iter_2_3 - Iter_2_3 = Iter_2_2.NextIteration('Iter_2_3') - Iter_2_3.SetMeshName('PLAQUE_3') - Iter_2_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med')) - Iter_2_3.AssociateHypo(HypoName_2) - error = Iter_2_3.Compute(1, 1) + # Creation of the iteration 3 + IterName = "I_" + Test_Name + "_3" + Iter_test_2_3 = Iter_test_2_2.NextIteration(IterName) + Iter_test_2_3.SetMeshName('PLAQUE_3') + Iter_test_2_3.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.03.med')) + Iter_test_2_3.AssociateHypo(HypoName_2) + error = Iter_test_2_3.Compute(1, 1) if error : error = 3 break @@ -153,10 +157,10 @@ Copyright EDF-R&D 2010, 2013 ScriptFile = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script.py") ScriptFile = os.path.normpath(ScriptFile) DirName = Rep_Test_Resu - YACS_2 = Case_2.CreateYACSSchema("YACS_2", ScriptFile, DirName, MeshFile) - YACS_2.SetType(1) - filexml = os.path.join(Rep_Test_Resu, 'YACS_2.xml') - error = YACS_2.WriteOnFile(filexml) + YACS_test_2 = Case_test_2.CreateYACSSchema("YACS_test_2", ScriptFile, DirName, MeshFile) + YACS_test_2.SetType(1) + filexml = os.path.join(Rep_Test_Resu, 'YACS_test_2.xml') + error = YACS_test_2.WriteOnFile(filexml) if error : error = 4 break diff --git a/tests/test_3.py b/tests/test_3.py index b8583acd..1277520c 100644 --- a/tests/test_3.py +++ b/tests/test_3.py @@ -22,7 +22,7 @@ Python script for HOMARD Copyright EDF-R&D 2011, 2013 Test test_3 """ -__revision__ = "V1.11" +__revision__ = "V1.12" #======================================================================== Test_Name = "test_3" @@ -96,55 +96,55 @@ Copyright EDF-R&D 2010, 2013 # Creation of the hypotheses # ========================== # Uniform refinement - HypoName = "Hypo_3" + HypoName = "Hypo_" + Test_Name print "-------- Creation of the hypothesis", HypoName - Hypo_3 = homard.CreateHypothesis(HypoName) - Hypo_3.SetAdapRefinUnRef(-1, 1, 0) - print HypoName, " : zones utilisées :", Hypo_3.GetZones() - print HypoName, " : champ utilisé :", Hypo_3.GetFieldName() - print HypoName, " : composantes utilisées :", Hypo_3.GetComps() + Hypo_test_3 = homard.CreateHypothesis(HypoName) + Hypo_test_3.SetAdapRefinUnRef(-1, 1, 0) + print HypoName, " : zones utilisées :", Hypo_test_3.GetZones() + print HypoName, " : champ utilisé :", Hypo_test_3.GetFieldName() + print HypoName, " : composantes utilisées :", Hypo_test_3.GetComps() # for num in range (n_boucle+1) : # print "-------- num =", num, "--------" # -# Creation of the case Case_3 +# Creation of the case Case_test_3 # =========================== if ( num <= 1 ) : - CaseName = "Case_3" + CaseName = "Case_" + Test_Name print "-------- Creation of the case", CaseName MeshFile = os.path.join(Rep_Test, Test_Name + '.00.med') - Case_3 = homard.CreateCase(CaseName, 'MOYEU', MeshFile) - Case_3.SetDirName(Rep_Test_Resu) - Case_3.SetConfType(1) - Case_3.AddBoundaryGroup('courbes', '') - Case_3.AddBoundaryGroup('cyl_ext', 'EXT') - Case_3.AddBoundaryGroup('cyl_int', 'INT') - Case_3.AddBoundaryGroup('sphere_1', 'END_1') - Case_3.AddBoundaryGroup('sphere_2', 'END_2') + Case_test_3 = homard.CreateCase(CaseName, 'MOYEU', MeshFile) + Case_test_3.SetDirName(Rep_Test_Resu) + Case_test_3.SetConfType(1) + Case_test_3.AddBoundaryGroup('courbes', '') + Case_test_3.AddBoundaryGroup('cyl_ext', 'EXT') + Case_test_3.AddBoundaryGroup('cyl_int', 'INT') + Case_test_3.AddBoundaryGroup('sphere_1', 'END_1') + Case_test_3.AddBoundaryGroup('sphere_2', 'END_2') # # Creation of the iterations # ========================== - # Creation of the iteration Iter_3_1 - IterName = "Iter_3_1" + # Creation of the iteration 1 + IterName = "I_" + Test_Name + "_1" print "-------- Creation of the iteration", IterName - Iter_3_1 = Case_3.NextIteration(IterName) - Iter_3_1.SetMeshName('MOYEU_1') - Iter_3_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med')) - Iter_3_1.AssociateHypo('Hypo_3') - error = Iter_3_1.Compute(1, 1) + Iter_test_3_1 = Case_test_3.NextIteration(IterName) + Iter_test_3_1.SetMeshName('MOYEU_1') + Iter_test_3_1.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.01.med')) + Iter_test_3_1.AssociateHypo('Hypo_test_3') + error = Iter_test_3_1.Compute(1, 1) if error : error = 10*num + 1 break - # Creation of the iteration Iter_3_2Iter_3_1 - IterName = "Iter_3_2" + # Creation of the iteration 2 + IterName = "I_" + Test_Name + "_2" print "-------- Creation of the iteration", IterName - Iter_3_2 = Iter_3_1.NextIteration(IterName) - Iter_3_2.SetMeshName('MOYEU_2') - Iter_3_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med')) - Iter_3_2.AssociateHypo('Hypo_3') - error = Iter_3_2.Compute(1, 1) + Iter_test_3_2 = Iter_test_3_1.NextIteration(IterName) + Iter_test_3_2.SetMeshName('MOYEU_2') + Iter_test_3_2.SetMeshFile(os.path.join(Rep_Test_Resu, 'maill.02.med')) + Iter_test_3_2.AssociateHypo('Hypo_test_3') + error = Iter_test_3_2.Compute(1, 1) if error : error = 10*num + 2 break @@ -154,11 +154,11 @@ Copyright EDF-R&D 2010, 2013 ScriptFile = os.path.join(pathHomard, "share", "doc", "salome", "gui", "HOMARD", "en", "_downloads", "yacs_script.py") ScriptFile = os.path.normpath(ScriptFile) DirName = Rep_Test_Resu - YACSName = "YACS_3" + YACSName = "YACS_" + Test_Name print "-------- Creation of the schema", YACSName - YACS_3 = Case_3.CreateYACSSchema(YACSName, ScriptFile, DirName, MeshFile) - YACS_3.SetType(2) - error = YACS_3.Write() + YACS_test_3 = Case_test_3.CreateYACSSchema(YACSName, ScriptFile, DirName, MeshFile) + YACS_test_3.SetType(2) + error = YACS_test_3.Write() if error : error = 10*num + 5 break @@ -167,37 +167,37 @@ Copyright EDF-R&D 2010, 2013 # ============ # Destruction of the schema, sauf a la fin if ( num < n_boucle ) : - print "-------- Destruction of the schema", YACS_3.GetName() - error = YACS_3.Delete(1) + print "-------- Destruction of the schema", YACS_test_3.GetName() + error = YACS_test_3.Delete(1) if error : error = 10*num + 6 break # After the first loop, the case is deleted, except the final mesh files # All the iterations are deleted if ( num == 0 ) : - print "-------- Destruction of the case", Case_3.GetName() - error = Case_3.Delete(0) + print "-------- Destruction of the case", Case_test_3.GetName() + error = Case_test_3.Delete(0) if error : break # After the second loop, the iterations are deleted, with the final mesh files elif ( num == 1 ) : # Recursive destruction of the iterations - print "-------- Recursive destruction of the iteration", Iter_3_1.GetName() - error = Iter_3_1.Delete(1) + print "-------- Recursive destruction of the iteration", Iter_test_3_1.GetName() + error = Iter_test_3_1.Delete(1) if error : error = 10*num + 3 break # Destruction and creation of the hypothese if ( num == 1 ) : - print "-------- Destruction of the hypothese", Hypo_3.GetName() - error = Hypo_3.Delete() + print "-------- Destruction of the hypothese", Hypo_test_3.GetName() + error = Hypo_test_3.Delete() if error : error = 10*num + 4 break - HypoName = "Hypo_3" + HypoName = "Hypo_test_3" print "-------- Creation of the hypothesis", HypoName - Hypo_3 = homard.CreateHypothesis(HypoName) - Hypo_3.SetAdapRefinUnRef(-1, 1, 0) + Hypo_test_3 = homard.CreateHypothesis(HypoName) + Hypo_test_3.SetAdapRefinUnRef(-1, 1, 0) # break #