1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2014-2024 EDF
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"""
22 def construitMaillagePipe_d(idisk, \
23 idisklim, nbsegCercle, nbsegRad, \
24 meshPipe, mptdsk, oldmpts, \
25 fondFissGroup, edgeFaceFissGroup, faceFissGroup, \
26 mEdges, mEdgeFaces, mFaces, mVols, nodesFondFissGroup):
27 """Mailles volumiques, groupes noeuds et edges de fond de fissure, groupe de face de fissure"""
28 #logging.info('start')
30 if idisk == idisklim[0]:
35 nodesFondFissGroup.Add([mptdsk[0][0]])
38 ide = meshPipe.AddEdge([oldmpts[0][0], mptdsk[0][0]])
40 fondFissGroup.Add([ide])
41 nodesFondFissGroup.Add([mptdsk[0][0]])
42 ide2 = meshPipe.AddEdge([oldmpts[0][-1], mptdsk[0][-1]])
43 mEdgeFaces.append(ide2)
44 edgeFaceFissGroup.Add([ide2])
49 for n_srad in range(nbsegRad):
50 idf = meshPipe.AddFace([oldmpts[0][n_srad], mptdsk[0][n_srad], mptdsk[0][n_srad+1], oldmpts[0][n_srad+1]])
51 faceFissGroup.Add([idf])
54 id_vol_cercle = list()
55 for n_cercle in range(nbsegCercle):
56 n_cercle_1 = n_cercle+1
57 if n_cercle == nbsegCercle-1:
60 idv = meshPipe.AddVolume([mptdsk[n_cercle][n_srad], mptdsk[n_cercle][n_srad+1], mptdsk[n_cercle_1][n_srad+1], \
61 oldmpts[n_cercle][n_srad], oldmpts[n_cercle][n_srad+1], oldmpts[n_cercle_1][n_srad+1]])
63 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], \
64 oldmpts[n_cercle][n_srad], oldmpts[n_cercle][n_srad+1], oldmpts[n_cercle_1][n_srad+1], oldmpts[n_cercle_1][n_srad]])
65 id_vol_cercle.append(idv)
66 id_volumes.append(id_vol_cercle)
68 mFaces.append(id_faces)
69 mVols.append(id_volumes)