1 # -*- coding: latin-1 -*-
2 # Copyright (C) 2009-2019 CEA/DEN, EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # Francis KLOSS - 2011-2013 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
23 # =============================================================================================
27 doc = hexablock.addDocument("cuve")
29 # Construire la grille cylindrique
30 # --------------------------------
32 centre = doc.addVertex(0, 0, 0)
34 vecteur_px = doc.addVector(1, 0, 0)
35 vecteur_pz = doc.addVector(0, 0, 1)
37 grille = doc.makeCylindrical(centre, vecteur_px, vecteur_pz, 1, 360, 1, 3, 8, 1, False)
42 quad_0 = grille.getQuadJK(0, 0, 0)
43 quad_6 = grille.getQuadJK(0, 6, 0)
44 quad_7 = grille.getQuadJK(0, 7, 0)
46 hexa_a = doc.addHexa3Quads(quad_0, quad_6, quad_7)
48 quad_2 = grille.getQuadJK(0, 2, 0)
49 quad_3 = grille.getQuadJK(0, 3, 0)
50 quad_4 = grille.getQuadJK(0, 4, 0)
52 hexa_b = doc.addHexa3Quads(quad_2, quad_3, quad_4)
54 quad_1 = grille.getQuadJK(0, 1, 0)
55 quad_5 = grille.getQuadJK(0, 5, 0)
57 quad_a = hexa_a.getQuad(1)
58 quad_b = hexa_b.getQuad(1)
60 hexa_c = doc.addHexa4Quads(quad_1, quad_a, quad_5, quad_b)
63 law = doc.addLaw("Uniform", 3)
65 for j in range(doc.countPropagation()):
66 propa = doc.getPropagation(j)
69 mesh_hexas = hexablock.mesh (doc)