1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2014-2021 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
20 """Mailles volumiques, groupes noeuds et edges de fond de fissure, groupe de face de fissure"""
26 def construitMaillagePipe_d(idisk, \
27 idisklim, nbsegCercle, nbsegRad, \
28 meshPipe, mptdsk, oldmpts, \
29 fondFissGroup, edgeFaceFissGroup, faceFissGroup, \
30 mEdges, mEdgeFaces, mFaces, mVols, nodesFondFissGroup):
31 """Mailles volumiques, groupes noeuds et edges de fond de fissure, groupe de face de fissure"""
32 #logging.info('start')
34 if idisk == idisklim[0]:
39 nodesFondFissGroup.Add([mptdsk[0][0]])
42 ide = meshPipe.AddEdge([oldmpts[0][0], mptdsk[0][0]])
44 fondFissGroup.Add([ide])
45 nodesFondFissGroup.Add([mptdsk[0][0]])
46 ide2 = meshPipe.AddEdge([oldmpts[0][-1], mptdsk[0][-1]])
47 mEdgeFaces.append(ide2)
48 edgeFaceFissGroup.Add([ide2])
53 for n_srad in range(nbsegRad):
54 idf = meshPipe.AddFace([oldmpts[0][n_srad], mptdsk[0][n_srad], mptdsk[0][n_srad+1], oldmpts[0][n_srad+1]])
55 faceFissGroup.Add([idf])
58 id_vol_cercle = list()
59 for n_cercle in range(nbsegCercle):
60 n_cercle_1 = n_cercle+1
61 if n_cercle == nbsegCercle-1:
64 idv = meshPipe.AddVolume([mptdsk[n_cercle][n_srad], mptdsk[n_cercle][n_srad+1], mptdsk[n_cercle_1][n_srad+1], \
65 oldmpts[n_cercle][n_srad], oldmpts[n_cercle][n_srad+1], oldmpts[n_cercle_1][n_srad+1]])
67 idv = meshPipe.AddVolume([mptdsk[n_cercle][n_srad], mptdsk[n_cercle][n_srad+1], mptdsk[n_cercle_1][n_srad+1], mptdsk[n_cercle_1][n_srad], \
68 oldmpts[n_cercle][n_srad], oldmpts[n_cercle][n_srad+1], oldmpts[n_cercle_1][n_srad+1], oldmpts[n_cercle_1][n_srad]])
69 id_vol_cercle.append(idv)
70 id_volumes.append(id_vol_cercle)
72 mFaces.append(id_faces)
73 mVols.append(id_volumes)