From: vsr Date: Wed, 15 Jan 2014 09:41:17 +0000 (+0000) Subject: Merge from BR_imps_2013 14/01/2014 X-Git-Tag: V7_4_0a1~111 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f7aba4830d53719b963fdb7fccc98b760fdef2d1;p=modules%2Fsmesh.git Merge from BR_imps_2013 14/01/2014 --- diff --git a/doc/salome/examples/defining_hypotheses_ex01.py b/doc/salome/examples/defining_hypotheses_ex01.py index 4bb75c56b..1d5d281c8 100644 --- a/doc/salome/examples/defining_hypotheses_ex01.py +++ b/doc/salome/examples/defining_hypotheses_ex01.py @@ -1,12 +1,11 @@ -# Arithmetic 1D +# Arithmetic 1D and Geometric Progression import salome salome.salome_init() -import GEOM + from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) -import SMESH, SALOMEDS from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) @@ -21,12 +20,20 @@ hexa = smesh.Mesh(box, "Box : hexahedrical mesh") algo1D = hexa.Segment() # optionally reverse node distribution on certain edges -allEdges = geompy.SubShapeAllSortedIDs( box, geompy.ShapeType["EDGE"]) +allEdges = geompy.SubShapeAllSorted( box, geompy.ShapeType["EDGE"]) reversedEdges = [ allEdges[0], allEdges[4] ] # define "Arithmetic1D" hypothesis to cut all edges in several segments with increasing arithmetic length algo1D.Arithmetic1D(1, 4, reversedEdges) +# define "Geometric Progression" hypothesis on one edge to cut this edge in segments with length increasing by 20% starting from 1 +gpAlgo = hexa.Segment( allEdges[1] ) +gpAlgo.GeometricProgression( 1, 1.2 ) + +# propagate distribution of nodes computed using "Geometric Progression" to parallel edges +gpAlgo.PropagationOfDistribution() + + # create a quadrangle 2D algorithm for faces hexa.Quadrangle() diff --git a/doc/salome/examples/defining_hypotheses_ex08.py b/doc/salome/examples/defining_hypotheses_ex08.py index 34fcbc377..3c877f3da 100644 --- a/doc/salome/examples/defining_hypotheses_ex08.py +++ b/doc/salome/examples/defining_hypotheses_ex08.py @@ -11,7 +11,8 @@ from salome.smesh import smeshBuilder smesh = smeshBuilder.New(salome.myStudy) # create a box -box = geompy.MakeBoxDXDYDZ(10., 10., 10.) +base = geompy.MakeSketcher("Sketcher:F 0 0:TT 10 0:TT 20 10:TT 0 10:WF", theName="F") +box = geompy.MakePrismDXDYDZ( base, 0,0,10 ) geompy.addToStudy(box, "Box") # get one edge of the box to put local hypothesis on @@ -20,7 +21,7 @@ EdgeX = geompy.GetEdgeNearPoint(box, p5) geompy.addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]") # create a hexahedral mesh on the box -hexa = smesh.Mesh(box, "Box : hexahedrical mesh") +hexa = smesh.Mesh(box, "Propagation of hypothesis") # set global algorithms and hypotheses algo1D = hexa.Segment() @@ -28,15 +29,37 @@ hexa.Quadrangle() hexa.Hexahedron() algo1D.NumberOfSegments(4) -# create a sub-mesh with local 1D hypothesis and propagation +# create a sub-mesh with local 1D hypothesis and "Propagation of 1D Hypothesis" algo_local = hexa.Segment(EdgeX) # define "Arithmetic1D" hypothesis to cut an edge in several segments with increasing length algo_local.Arithmetic1D(1, 4) -# define "Propagation" hypothesis that propagates all other 1D hypotheses -# from all edges on the opposite side of a face in case of quadrangular faces +# define "Propagation" hypothesis that propagates "Arithmetic1D" hypothesis +# from 'EdgeX' on opposite sides of all quadilateral faces algo_local.Propagation() -# compute the mesh +# compute the mesh which contains prisms hexa.Compute() + + +# create another mesh on the box +mesh = smesh.Mesh(box, "Propagation of distribution of nodes") + +# set global algorithms and hypotheses +algo1D = mesh.Segment() +mesh.Quadrangle() +mesh.Hexahedron() +algo1D.NumberOfSegments(4) + +# create a sub-mesh with local 1D hypothesis and "Propagation of Node Distribution" +algo_local = mesh.Segment(EdgeX) +algo_local.Arithmetic1D(1, 4) + +# define "Propagation Of Distribution" hypothesis that propagates +# distribution of nodes generated by "Arithmetic1D" hypothesis +# from 'EdgeX' on opposite sides of all quadilateral faces +algo_local.PropagationOfDistribution() + +# compute the mesh which contains hexahedra only +mesh.Compute() diff --git a/doc/salome/gui/SMESH/images/a-geometric1d.png b/doc/salome/gui/SMESH/images/a-geometric1d.png new file mode 100644 index 000000000..a60be94a4 Binary files /dev/null and b/doc/salome/gui/SMESH/images/a-geometric1d.png differ diff --git a/doc/salome/gui/SMESH/images/viscous_layers_hyp.png b/doc/salome/gui/SMESH/images/viscous_layers_hyp.png index 9c9930317..717819138 100644 Binary files a/doc/salome/gui/SMESH/images/viscous_layers_hyp.png and b/doc/salome/gui/SMESH/images/viscous_layers_hyp.png differ diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc index 470fe0c4d..b992bc8e2 100644 --- a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc @@ -6,6 +6,7 @@