mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
simplification
This commit is contained in:
parent
eb7885b577
commit
2cf6435f14
@ -180,7 +180,7 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
|
||||
# --- maillage effectif du pipe
|
||||
|
||||
(meshPipe, meshPipeGroups, edgesCircPipeGroup) = \
|
||||
(meshPipe, edgeFaceFissGroup, edgesCircPipeGroup) = \
|
||||
construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad, \
|
||||
nro_cas)
|
||||
|
||||
@ -195,7 +195,7 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
(meshFaceFiss, _, grpEdgesPeauFissureExterne, _) = \
|
||||
mailleFacesFissure(faceFissureExterne, \
|
||||
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
|
||||
meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
|
||||
edgeFaceFissGroup, areteFaceFissure, rayonPipe, nbsegRad, \
|
||||
mailleur, nro_cas)
|
||||
|
||||
# --- maillage faces de peau
|
||||
|
@ -41,14 +41,12 @@ def construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad, \
|
||||
meshPipe = smesh.Mesh(None, "meshPipe")
|
||||
putName(meshPipe, "meshPipe", i_pref=nro_cas)
|
||||
|
||||
edgesCircPipeGroup = list()
|
||||
|
||||
fondFissGroup = meshPipe.CreateEmptyGroup(SMESH.EDGE, "FONDFISS")
|
||||
nodesFondFissGroup = meshPipe.CreateEmptyGroup(SMESH.NODE, "nfondfis")
|
||||
faceFissGroup = meshPipe.CreateEmptyGroup(SMESH.FACE, "fisInPi")
|
||||
edgeFaceFissGroup = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeFaceFiss")
|
||||
edgeCircPipe0Group = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe0")
|
||||
edgeCircPipe1Group = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe1")
|
||||
faceCircPipe0Group = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe0")
|
||||
faceCircPipe1Group = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe1")
|
||||
|
||||
mptdsk = list() # vertices de chaque disque au fur et à mesure
|
||||
mptsdisks = list() # vertices maillage de tous les disques
|
||||
@ -75,7 +73,7 @@ def construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad, \
|
||||
construitMaillagePipe_b(idisk, \
|
||||
idisklim, nbsegCercle, \
|
||||
meshPipe, mptdsk, \
|
||||
edgeCircPipe0Group, edgeCircPipe1Group)
|
||||
edgesCircPipeGroup)
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# --- Les groupes des faces débouchantes
|
||||
@ -83,8 +81,7 @@ def construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad, \
|
||||
if idisk in (idisklim[0],idisklim[1]):
|
||||
construitMaillagePipe_c(idisk, \
|
||||
idisklim, nbsegCercle, \
|
||||
meshPipe, mptdsk, nbsegRad, \
|
||||
faceCircPipe0Group, faceCircPipe1Group)
|
||||
meshPipe, mptdsk, nbsegRad)
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# --- mailles volumiques, groupes noeuds et edges de fond de fissure, groupe de face de fissure
|
||||
@ -100,23 +97,10 @@ def construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad, \
|
||||
_ = pipeFissGroup.AddFrom( meshPipe.GetMesh() )
|
||||
|
||||
_, _, _ = meshPipe.MakeBoundaryElements(SMESH.BND_2DFROM3D, "pipeBoundaries")
|
||||
edgesCircPipeGroup = [edgeCircPipe0Group, edgeCircPipe1Group]
|
||||
|
||||
meshPipeGroups = dict(fondFissGroup = fondFissGroup, \
|
||||
nodesFondFissGroup = nodesFondFissGroup, \
|
||||
faceFissGroup = faceFissGroup, \
|
||||
edgeFaceFissGroup = edgeFaceFissGroup, \
|
||||
edgeCircPipe0Group = edgeCircPipe0Group, \
|
||||
edgeCircPipe1Group = edgeCircPipe1Group, \
|
||||
faceCircPipe0Group = faceCircPipe0Group, \
|
||||
faceCircPipe1Group = faceCircPipe1Group, \
|
||||
pipeFissGroup = pipeFissGroup, \
|
||||
edgesCircPipeGroup = edgesCircPipeGroup \
|
||||
)
|
||||
|
||||
#if meshPipe:
|
||||
#text = "Arrêt rapide.\n"
|
||||
#logging.info(text)
|
||||
#raise Exception(text)
|
||||
|
||||
return (meshPipe, meshPipeGroups, edgesCircPipeGroup)
|
||||
return (meshPipe, edgeFaceFissGroup, edgesCircPipeGroup)
|
||||
|
@ -19,16 +19,19 @@
|
||||
#
|
||||
"""Les groupes des edges des cercles débouchants"""
|
||||
|
||||
import SMESH
|
||||
|
||||
def construitMaillagePipe_b(idisk, \
|
||||
idisklim, nbsegCercle, \
|
||||
meshPipe, mptdsk, \
|
||||
edgeCircPipe0Group, edgeCircPipe1Group):
|
||||
edgesCircPipeGroup):
|
||||
"""Les groupes des edges des cercles débouchants"""
|
||||
#logging.info('start')
|
||||
|
||||
pts = list()
|
||||
for n_cercle in range(nbsegCercle):
|
||||
pts.append(mptdsk[n_cercle][-1])
|
||||
|
||||
edges = list()
|
||||
nb_pts = len(pts)
|
||||
for n_cercle in range(nb_pts):
|
||||
@ -37,8 +40,11 @@ def construitMaillagePipe_b(idisk, \
|
||||
edges.append(id_edge)
|
||||
|
||||
if idisk == idisklim[0]:
|
||||
edgeCircPipe0Group.Add(edges)
|
||||
groupe = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe0")
|
||||
else:
|
||||
edgeCircPipe1Group.Add(edges)
|
||||
groupe = meshPipe.CreateEmptyGroup(SMESH.EDGE, "edgeCircPipe1")
|
||||
|
||||
groupe.Add(edges)
|
||||
edgesCircPipeGroup.append(groupe)
|
||||
|
||||
return
|
||||
|
@ -19,10 +19,11 @@
|
||||
#
|
||||
"""Les groupes des faces débouchantes"""
|
||||
|
||||
import SMESH
|
||||
|
||||
def construitMaillagePipe_c(idisk, \
|
||||
idisklim, nbsegCercle, \
|
||||
meshPipe, mptdsk, nbsegRad, \
|
||||
faceCircPipe0Group, faceCircPipe1Group):
|
||||
meshPipe, mptdsk, nbsegRad):
|
||||
"""Les groupes des faces débouchantes"""
|
||||
#logging.info('start')
|
||||
|
||||
@ -39,8 +40,10 @@ def construitMaillagePipe_c(idisk, \
|
||||
faces.append(id_face)
|
||||
|
||||
if idisk == idisklim[0]:
|
||||
faceCircPipe0Group.Add(faces)
|
||||
groupe = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe0")
|
||||
else:
|
||||
faceCircPipe1Group.Add(faces)
|
||||
groupe = meshPipe.CreateEmptyGroup(SMESH.FACE, "faceCircPipe1")
|
||||
|
||||
groupe.Add(faces)
|
||||
|
||||
return
|
||||
|
@ -30,7 +30,7 @@ from .putName import putName
|
||||
|
||||
def mailleFacesFissure(faceFissureExterne, \
|
||||
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
|
||||
meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
|
||||
edgeFaceFissGroup, areteFaceFissure, rayonPipe, nbsegRad, \
|
||||
mailleur="MeshGems", nro_cas=None):
|
||||
"""maillage faces de fissure"""
|
||||
logging.info('start')
|
||||
@ -62,7 +62,7 @@ def mailleFacesFissure(faceFissureExterne, \
|
||||
|
||||
logging.info("UseExisting1DElements depuis '%s'", edgesPipeFissureExterneC.GetName())
|
||||
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
|
||||
hypo1d = algo1d.SourceEdges([ meshPipeGroups['edgeFaceFissGroup'] ],0,0)
|
||||
hypo1d = algo1d.SourceEdges([ edgeFaceFissGroup ],0,0)
|
||||
putName(algo1d.GetSubMesh(), "edgeFissPeau", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_edgeFissPeau", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_edgeFissPeau", i_pref=nro_cas)
|
||||
|
Loading…
Reference in New Issue
Block a user