-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2011-2016 CEA/DEN, EDF R&D
"""
Exemple de couplage HOMARD-Salome
-Copyright EDF 1996, 2011, 2018
+Copyright EDF 1996, 2011, 2019
"""
-__revision__ = "V4.3"
+__revision__ = "V4.06"
#
import os
import sys
DATA_TUTORIAL = os.path.join(PATH_HOMARD, "share", "doc", "salome", "gui", "HOMARD", "fr", "_downloads")
DATA_TUTORIAL = os.path.normpath(DATA_TUTORIAL)
sys.path.append(DATA_TUTORIAL)
-from tutorial_util import gzip_gunzip
from tutorial_util import creation_dircase
# ==================================
DIRCASE = creation_dircase(6)
-gzip_gunzip(DATA_TUTORIAL, 4, -1)
-gzip_gunzip(DATA_TUTORIAL, 6, -1)
# ==================================
#
import salome
import HOMARD
#
homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD")
-homard.SetCurrentStudy(salome.myStudy)
+homard.UpdateStudy()
#
#============================= Début des commandes =============================
#
# Frontières
# ==========
-boun_6_1 = homard.CreateBoundaryDi('intersection', 'PIQUAGE', os.path.join(DATA_TUTORIAL, "tutorial_6.fr.med"))
+boun_6_1 = homard.CreateBoundaryDi('intersection', 'COURBES', os.path.join(DATA_TUTORIAL, "tutorial_6.fr.med"))
#
boun_6_2 = homard.CreateBoundaryCylinder('cyl_1_ext', 0.0, 25., -25., 25., 50., 75., 100.)
#
# Creation of the hypothesis hypo_6
l_hypothese = homard.CreateHypothesis('hypo_6')
l_hypothese.SetUnifRefinUnRef(1)
+l_hypothese.AddGroup('IN1')
+l_hypothese.AddGroup('IN2')
l_hypothese.AddGroup('T1_INT_I')
l_hypothese.AddGroup('T1_INT_O')
l_hypothese.AddGroup('T2_INT')
iter_6_3.AssociateHypo('hypo_6_bis')
erreur = iter_6_3.Compute(1, 2)
#
-# ==================================
-gzip_gunzip(DATA_TUTORIAL, 4, 1)
-gzip_gunzip(DATA_TUTORIAL, 6, 1)
-# ==================================
-
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(True)
+ salome.sg.updateObjBrowser()