From: GERALD NICOLAS Date: Fri, 16 Apr 2021 08:51:45 +0000 (+0200) Subject: Prise en compte de la courbure de la face à mailler X-Git-Tag: V9_7_0a1~2^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0d112416152988a5d1c45db2a0b5cb5336c18250;p=modules%2Fsmesh.git Prise en compte de la courbure de la face à mailler --- diff --git a/src/Tools/blocFissure/CasTests/execution_Cas.py b/src/Tools/blocFissure/CasTests/execution_Cas.py index 313135681..983899999 100644 --- a/src/Tools/blocFissure/CasTests/execution_Cas.py +++ b/src/Tools/blocFissure/CasTests/execution_Cas.py @@ -30,7 +30,7 @@ from blocFissure.gmu.casStandard import casStandard # ----------------------------------------------------------------------------------------------- LOGFILE = os.path.join(tempfile.gettempdir(),"blocFissure.log") #initLog.setDebug(LOGFILE) # debug = 10 -initLog.setVerbose(LOGFILE) # info = 20 +#initLog.setVerbose(LOGFILE) # info = 20 #initLog.setRelease(LOGFILE) # warning = 30 #initLog.setPerfTests(LOGFILE) # critical = 50 #initLog.setAlways(LOGFILE) # critical = 50 diff --git a/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py b/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py index f245e9c8e..3ab7cf814 100644 --- a/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py +++ b/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py @@ -75,6 +75,9 @@ def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize, \ hypo2d.SetOptimize( 1 ) hypo2d.SetFineness( 2 ) hypo2d.SetMinSize( minSize ) + hypo2d.SetChordalErrorEnabled (True) + hypo2d.SetChordalError( maxSize*0.25 ) + hypo2d.SetUseSurfaceCurvature (True) hypo2d.SetQuadAllowed( 0 ) putName(algo2d, "{}_2d_zoneFiss".format(mailleur), i_pref=nro_cas) putName(hypo2d, "hypo1d_zoneFiss", i_pref=nro_cas) diff --git a/src/Tools/blocFissure/gmu/insereFissureLongue_d.py b/src/Tools/blocFissure/gmu/insereFissureLongue_d.py index 206b71c6b..cff54376a 100644 --- a/src/Tools/blocFissure/gmu/insereFissureLongue_d.py +++ b/src/Tools/blocFissure/gmu/insereFissureLongue_d.py @@ -55,6 +55,9 @@ def insereFissureLongue_d (facePeau, edgePeauFiss, groupEdgesBordPeau, bordsLibr hypo2d.SetOptimize( 1 ) hypo2d.SetFineness( 2 ) hypo2d.SetMinSize( 2 ) + hypo2d.SetChordalErrorEnabled (True) + hypo2d.SetChordalError( 250. ) + hypo2d.SetUseSurfaceCurvature (True) hypo2d.SetQuadAllowed( 0 ) putName(algo2d.GetSubMesh(), "facePeau", i_pref=nro_cas) putName(algo2d, "{}_2d_facePeau".format(mailleur), i_pref=nro_cas) diff --git a/src/Tools/blocFissure/gmu/insereFissureLongue_e.py b/src/Tools/blocFissure/gmu/insereFissureLongue_e.py index 3a505845e..6cfd268ff 100644 --- a/src/Tools/blocFissure/gmu/insereFissureLongue_e.py +++ b/src/Tools/blocFissure/gmu/insereFissureLongue_e.py @@ -55,6 +55,9 @@ def insereFissureLongue_e (faceFiss, edgePeauFiss, groupEdgesPeauFiss, group_gen hypo2d.SetOptimize( 1 ) hypo2d.SetFineness( 2 ) hypo2d.SetMinSize( 2 ) + hypo2d.SetChordalErrorEnabled (True) + hypo2d.SetChordalError( mesh_size*0.25 ) + hypo2d.SetUseSurfaceCurvature (True) hypo2d.SetQuadAllowed( 0 ) putName(algo2d.GetSubMesh(), "faceFiss", i_pref=nro_cas) putName(algo2d, "{}_2d_faceFiss".format(mailleur), i_pref=nro_cas) diff --git a/src/Tools/blocFissure/gmu/mailleFacesFissure.py b/src/Tools/blocFissure/gmu/mailleFacesFissure.py index 0b63cfa9d..ac01b8cd1 100644 --- a/src/Tools/blocFissure/gmu/mailleFacesFissure.py +++ b/src/Tools/blocFissure/gmu/mailleFacesFissure.py @@ -37,7 +37,7 @@ def mailleFacesFissure(faceFissureExterne, \ logging.info("Maillage avec %s pour le cas n°%s", mailleur, nro_cas) meshFaceFiss = smesh.Mesh(faceFissureExterne) - logging.info("Maillage avec %s", mailleur) + putName(meshFaceFiss.GetMesh(), "faceFiss", i_pref=nro_cas) if ( mailleur == "MeshGems"): algo2d = meshFaceFiss.Triangle(algo=smeshBuilder.MG_CADSurf) hypo2d = algo2d.Parameters() @@ -54,22 +54,23 @@ def mailleFacesFissure(faceFissureExterne, \ hypo2d.SetOptimize( 1 ) hypo2d.SetFineness( 2 ) hypo2d.SetMinSize( rayonPipe/float(nbsegRad) ) + hypo2d.SetChordalErrorEnabled (True) hypo2d.SetChordalError( areteFaceFissure*0.25 ) + hypo2d.SetUseSurfaceCurvature (True) hypo2d.SetQuadAllowed( 0 ) - putName(algo2d.GetSubMesh(), "faceFiss", i_pref=nro_cas) putName(algo2d, "{}_2d_faceFiss".format(mailleur), i_pref=nro_cas) putName(hypo2d, "hypo2d_faceFiss", i_pref=nro_cas) logging.info("UseExisting1DElements depuis '%s'", edgesPipeFissureExterneC.GetName()) algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC) - 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) + putName(algo1d, "edgeFissPeau_UseExisting1DElements", i_pref=nro_cas) + hypo1d = algo1d.SourceEdges([ edgeFaceFissGroup ],0,0) + putName(hypo1d, "edgeFissPeau_SourceEdges", i_pref=nro_cas) - grpFaceFissureExterne = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE) - grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE) grpEdgesPipeFissureExterne = meshFaceFiss.GroupOnGeom(edgesPipeFissureExterneC,'edgesPipeFissureExterne',SMESH.EDGE) + grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE) + grpFaceFissureExterne = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE) is_done = meshFaceFiss.Compute() text = "meshFaceFiss.Compute" diff --git a/src/Tools/blocFissure/gmu/mailleFacesPeau.py b/src/Tools/blocFissure/gmu/mailleFacesPeau.py index e8289c22f..d216abbdf 100644 --- a/src/Tools/blocFissure/gmu/mailleFacesPeau.py +++ b/src/Tools/blocFissure/gmu/mailleFacesPeau.py @@ -79,7 +79,9 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \ hypo2d.SetOptimize( 1 ) hypo2d.SetFineness( 2 ) hypo2d.SetMinSize( rayonPipe/float(nbsegRad) ) + hypo2d.SetChordalErrorEnabled (True) hypo2d.SetChordalError( dmoyen*0.25 ) + hypo2d.SetUseSurfaceCurvature (True) hypo2d.SetQuadAllowed( 0 ) putName(algo2d, "{}_2d_facePeau".format(mailleur), ifil, nro_cas) putName(hypo2d, "hypo2d_facePeau", ifil, nro_cas)