+ [thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore],
+ toAdd=False)
+ hyp.SetTotalThickness( thickness )
+ hyp.SetNumberLayers( numberOfLayers )
+ hyp.SetStretchFactor( stretchFactor )
+ hyp.SetFaces( faces, isFacesToIgnore )
+ hyp.SetMethod( extrMethod )
+ self.mesh.AddHypothesis( hyp, self.geom )
+ return hyp
+
+ ## Defines "ViscousLayers2D" hypothesis to give parameters of layers of quadrilateral
+ # elements to build near mesh boundary. This hypothesis can be used by several 2D algorithms:
+ # NETGEN 2D, NETGEN 1D-2D, Quadrangle (mapping), MEFISTO, MG-CADSurf
+ # @param thickness total thickness of layers of quadrilaterals
+ # @param numberOfLayers number of layers
+ # @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh
+ # @param edges list of geometrical edges (or their ids).
+ # Viscous layers are either generated on these edges or not, depending on
+ # the value of \a isEdgesToIgnore parameter.
+ # @param isEdgesToIgnore if \c True, the Viscous layers are not generated on the
+ # edges specified by the previous parameter (\a edges).
+ # @ingroup l3_hypos_additi
+ def ViscousLayers2D(self, thickness, numberOfLayers, stretchFactor,
+ edges=[], isEdgesToIgnore=True ):
+ if not isinstance(self.algo, SMESH._objref_SMESH_2D_Algo):
+ raise TypeError, "ViscousLayers2D are supported by 2D algorithms only"
+ if not "ViscousLayers2D" in self.GetCompatibleHypothesis():
+ raise TypeError, "ViscousLayers2D are not supported by %s"%self.algo.GetName()
+ if edges and isinstance( edges[0], geomBuilder.GEOM._objref_GEOM_Object ):
+ edges = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f) for f in edges ]
+ hyp = self.Hypothesis("ViscousLayers2D",
+ [thickness, numberOfLayers, stretchFactor, edges, isEdgesToIgnore],
+ toAdd=False)