+ while not erreur :
+ #
+ # HOMARD.UpdateStudy()
+ #
+ # Frontières
+ # ==========
+ if verbose :
+ print(". Frontières")
+ cao_name = "CAO_" + nom
+ la_frontiere = HOMARD.CreateBoundaryCAO(cao_name, xao_file)
+ #
+ # Hypotheses
+ # ==========
+ if verbose :
+ print(". Hypothèses")
+ # Creation of the hypothesis hypo_0_1
+ l_hypothese_0_1 = HOMARD.CreateHypothesis('hypo_4_0_1')
+ l_hypothese_0_1.SetUnifRefinUnRef(1)
+ l_hypothese_0_1.AddGroup('IN1')
+ l_hypothese_0_1.AddGroup('IN2')
+ l_hypothese_0_1.AddGroup('T1_INT_I')
+ l_hypothese_0_1.AddGroup('T1_INT_O')
+ l_hypothese_0_1.AddGroup('T2_INT')
+ # Creation of the hypothesis hypo_1_2
+ l_hypothese_1_2 = HOMARD.CreateHypothesis('hypo_4_1_2')
+ l_hypothese_1_2.SetUnifRefinUnRef(1)
+ l_hypothese_1_2.AddGroup('T1_EXT_I')
+ l_hypothese_1_2.AddGroup('T1_EXT_O')
+ l_hypothese_1_2.AddGroup('T2_EXT')
+ # Creation of the hypothesis hypo_2_3
+ l_hypothese_2_3 = HOMARD.CreateHypothesis('hypo_4_2_3')
+ l_hypothese_2_3.SetUnifRefinUnRef(1)
+ l_hypothese_2_3.AddGroup('INT_I')
+ l_hypothese_2_3.AddGroup('INT_E')
+ l_hypothese_2_3.AddGroup('IN1')
+ l_hypothese_2_3.AddGroup('IN2')
+ #
+ # Cas
+ # ===
+ if verbose :
+ print(". Cas")
+ le_cas = HOMARD.CreateCase('case_'+nom, nom, ficmed)
+ le_cas.SetDirName(DIRCASE)
+ le_cas.AddBoundary(cao_name)
+ #
+ # Itérations
+ # ==========
+ if verbose :
+ option = 2
+ else :
+ option = 1
+ if verbose :
+ print(". Itérations")
+ # Iteration iter_4_1 : raffinement selon les faces internes
+ iter_4_1 = le_cas.NextIteration('iter_4_1')
+ iter_4_1.SetMeshName('PIQUAGE_1')
+ iter_4_1.SetMeshFile(os.path.join(DIRCASE, "maill.01.med"))
+ iter_4_1.AssociateHypo('hypo_4_0_1')
+ erreur = iter_4_1.Compute(1, option)
+ print ("erreur = %d" % erreur)
+ if erreur :
+ break
+ # Iteration iter_4_2 : raffinement selon les faces externes
+ iter_4_2 = iter_4_1.NextIteration('iter_4_2')
+ iter_4_2.SetMeshName('PIQUAGE_2')
+ iter_4_2.SetMeshFile(os.path.join(DIRCASE, "maill.02.med"))
+ iter_4_2.AssociateHypo('hypo_4_1_2')
+ erreur = iter_4_2.Compute(1, option)
+ if erreur :
+ break
+ # Iteration iter_4_3 : second raffinement selon les faces externes
+ iter_4_3 = iter_4_2.NextIteration('iter_4_3')
+ iter_4_3.SetMeshName('PIQUAGE_3')
+ iter_4_3.SetMeshFile(os.path.join(DIRCASE, "maill.03.med"))
+ iter_4_3.AssociateHypo('hypo_4_2_3')
+ erreur = iter_4_3.Compute(1, option)
+ if erreur :
+ break