1 # -*- coding: latin-1 -*-
\r
2 # Copyright (C) 2009-2016 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
\r
23 # =============================================================================================
\r
27 doc = hexablock.addDocument("cuve")
\r
29 # Construire la grille cylindrique
\r
30 # --------------------------------
\r
32 centre = doc.addVertex(0, 0, 0)
\r
34 vecteur_px = doc.addVector(1, 0, 0)
\r
35 vecteur_pz = doc.addVector(0, 0, 1)
\r
37 grille = doc.makeCylindrical(centre, vecteur_px, vecteur_pz, 1, 360, 1, 3, 8, 1, False)
\r
42 quad_0 = grille.getQuadJK(0, 0, 0)
\r
43 quad_6 = grille.getQuadJK(0, 6, 0)
\r
44 quad_7 = grille.getQuadJK(0, 7, 0)
\r
46 hexa_a = doc.addHexa3Quads(quad_0, quad_6, quad_7)
\r
48 quad_2 = grille.getQuadJK(0, 2, 0)
\r
49 quad_3 = grille.getQuadJK(0, 3, 0)
\r
50 quad_4 = grille.getQuadJK(0, 4, 0)
\r
52 hexa_b = doc.addHexa3Quads(quad_2, quad_3, quad_4)
\r
54 quad_1 = grille.getQuadJK(0, 1, 0)
\r
55 quad_5 = grille.getQuadJK(0, 5, 0)
\r
57 quad_a = hexa_a.getQuad(1)
\r
58 quad_b = hexa_b.getQuad(1)
\r
60 hexa_c = doc.addHexa4Quads(quad_1, quad_a, quad_5, quad_b)
\r
63 law = doc.addLaw("Uniform", 3)
\r
65 for j in range(doc.countPropagation()):
\r
66 propa = doc.getPropagation(j)
\r
69 mesh_hexas = hexablock.mesh (doc)
\r